Makefile
author Alain Leufroy
Fri, 08 Sep 2017 12:10:21 +0200
changeset 2957 586c9ace20b3
parent 2270 b53343c8d692
permissions -rw-r--r--
obslog: simplify formatter keys The formatter field keys are all prefixed with `debugobshistory.'. This is annoyingly useless as they are already in the `debughistory` topic. This patch simplify these keys. For examle, on this repository `hg obslog -Tdebug -r 31cbace4c0f1` : ``` debugobshistory = [ { 'node':'31cbace4c0f1', 'shortdescription':'topics: make sure we have some restrictions on topic names', 'rev':2904, 'markers':[ ] }, { 'node':'d439a6087434', 'markers':[ { 'date':(1504176329.83902, -7200 ), 'verb':'rewritten', 'succnodes':[ '31cbace4c0f1' ], 'effect':[ 'parent' ], 'user':'Pierre-Yves David <pierre-yves.david@octobus.net>' } ] }, { 'node':'1e1f651704d4', 'markers':[ { 'date':(1504175088.811924, -7200 ), 'verb':'rewritten', 'succnodes':[ 'd439a6087434' ], 'effect':[ 'parent' ], 'user':'Pierre-Yves David <pierre-yves.david@octobus.net>' } ] }, { 'node':'eb6495cf6cb1', 'markers':[ { 'date':(1504015275.001643, -19800 ), 'verb':'rewritten', 'succnodes':[ '1e1f651704d4' ], 'effect':[ 'parent', 'content' ], 'user':'Pulkit Goyal <7895pulkit@gmail.com>' } ] }, { 'node':'761e446e0112', 'markers':[ { 'date':(1504015201.780276, -19800 ), 'verb':'rewritten', 'succnodes':[ 'eb6495cf6cb1' ], 'effect':[ 'content' ], 'user':'Pulkit Goyal <7895pulkit@gmail.com>' } ] }, { 'node':'531a626950bd', 'markers':[ { 'date':(1504015017.897054, -19800 ), 'verb':'rewritten', 'succnodes':[ '761e446e0112' ], 'effect':[ 'meta', 'parent', 'content' ], 'user':'Pulkit Goyal <7895pulkit@gmail.com>' } ] }, { 'node':'c2f9ba7329ea', 'markers':[ { 'date':(1504014136.876537, -19800 ), 'verb':'rewritten', 'succnodes':[ '531a626950bd' ], 'effect':[ 'meta' ], 'user':'Pulkit Goyal <7895pulkit@gmail.com>' } ] }, ] ``` We now able to ask `hg obslog -r 78debdfb3e4d -T '{label("log.summary", shortdescription)}\n{if(markers, markers % " {date|age} {user|person}\n")}'` ``` doc: simplify the reference to in-core features 9 days ago Pierre-Yves David 9 days ago Pierre-Yves David 9 days ago Pierre-Yves David 9 days ago Pierre-Yves David 9 days ago Philippe Pepiot 9 days ago Philippe Pepiot ```

VERSION=$(shell python setup.py --version)

PYTHON=python

all: help

deb-prepare:
	python setup.py sdist --dist-dir ..
	mv -f ../hg-evolve-$(VERSION).tar.gz ../mercurial-evolve_$(VERSION).orig.tar.gz
	tar xf ../mercurial-evolve_$(VERSION).orig.tar.gz
	rm -rf ../mercurial-evolve_$(VERSION).orig
	mv hg-evolve-$(VERSION) ../mercurial-evolve_$(VERSION).orig
	cp -r debian/ ../mercurial-evolve_$(VERSION).orig/
	@cd ../mercurial-evolve_$(VERSION).orig && echo 'debian build directory ready at' `pwd`

install-home:
	$(PYTHON) setup.py install --home="$(HOME)" --prefix="" --force

# test targets
TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)

HGTESTS=$(HGROOT)/tests

help:
	@echo 'Commonly used make targets:'
	@echo '  deb-prepare        - prepare the build of a debian package'
	@echo '  tests              - run all tests in the automatic test suite'
	@echo '  all-version-tests - run all tests against many hg versions'
	@echo '  tests-%s           - run all tests in the specified hg version'

all: help

_check_hgroot:
ifeq ($(HGROOT),)
	$(error HGROOT is not set to the root of the hg source tree)
endif

tests: _check_hgroot
	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)

# /!\ run outside of the compatibility branch output test will likely fails

test-%: _check_hgroot
	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@

tests-%: _check_hgroot
	hg -R $(HGROOT) checkout $$(echo $@ | sed s/tests-//) && \
	(cd $(HGROOT) ; $(MAKE) clean ) && \
	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)

# build a script to extract declared version
all-version-tests: tests-@

.PHONY: tests all-version-tests