Makefile
author Laurent Charignon <lcharignon@fb.com>
Sat, 13 Jun 2015 11:14:07 -0700
changeset 1363 2eaa2943f9f3
parent 542 ca5bb72d14ae
child 1524 bfbd99b50f8f
permissions -rw-r--r--
directaccess: use cached filteredrevs Before this patch we were calling directly repoview.computehidden(repo) to compute the revisions visible with direct access, without going through the caching mechanism for the filtered revisions. There was two issues with that: (1) Performance: We were not leverating the cached values of the 'visible' revs (2) Stability: If there were to be a cache inconsistency with the computation of 'visible' we would crash in the branchmap consistency check partial.validfor. Consider the scenario of rebase with bookmarks: - when we delete a bookmark on an obsolete changeset (like what rebase does when moving the bookmark after rebasing the changesets) - then this changes the value returned by repoview.computehidden(repo) as bookmarks are used as dynamic blockers in repoview.computehidden(repo) - as of now, we don't invalidate the cache in the case of bookmark change - if we have a cached value from before the bookmark change, repoview.filterrevs(repo, 'visible') considers the cached value correct and returns something different than repoview.computehidden(repo) - in turn, if we use repoview.computehidden(repo) in directaccess, the subset relationship is broken and the cache consistency assertion (parial.validfor) fails if branchmap.updatecache is called in this time window This patch leverages the caching infrastructure in place to speed up the computation of the filteredrevs for visible-directaccess-nowarn and visible-directaccess-warn. Incidentally it prevents the bug discussed in (2) from crashing when running a rebase with a bookmark. Note that there still needs to be a fix in core for the case discussed in (2). The test for this side of the fix (not core's fix for (2) is very hard to implement without introducing a lot of dependencies and does not belong here. It is much easier to have the test of the fix for the scenario (2) in core along with the fix.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     1
PYTHON=python
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     2
HG=`which hg`
542
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
     3
VERSION=$(shell python setup.py --version)
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
     4
0
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     5
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     6
help:
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     7
	@echo 'Commonly used make targets:'
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     8
	@echo '  tests              - run all tests in the automatic test suite'
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
     9
	@echo '  all-version-tests - run all tests against many hg versions'
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    10
	@echo '  tests-%s           - run all tests in the specified hg version'
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    11
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    12
all: help
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    13
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    14
tests:
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    15
	cd tests && $(PYTHON) run-tests.py --with-hg=$(HG) $(TESTFLAGS)
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    16
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    17
test-%:
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    18
	cd tests && $(PYTHON) run-tests.py --with-hg=$(HG) $(TESTFLAGS) $@
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    19
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    20
tests-%:
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    21
	@echo "Path to crew repo is $(CREW) - set this with CREW= if needed."
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    22
	hg -R $(CREW) checkout $$(echo $@ | sed s/tests-//) && \
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    23
	(cd $(CREW) ; $(MAKE) clean ) && \
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    24
	cd tests && $(PYTHON) $(CREW)/tests/run-tests.py $(TESTFLAGS)
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    25
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    26
all-version-tests: tests-1.3.1 tests-1.4.3 tests-1.5.4 \
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    27
                   tests-1.6.4 tests-1.7.5 tests-1.8 tests-tip
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    28
531
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    29
deb-prepare:
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    30
	python setup.py sdist --dist-dir ..
542
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
    31
	mv -f ../hg-evolve-$(VERSION).tar.gz ../mercurial-evolve_$(VERSION).orig.tar.gz
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
    32
	tar xf ../mercurial-evolve_$(VERSION).orig.tar.gz
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
    33
	rm -rf ../mercurial-evolve_$(VERSION).orig
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
    34
	mv hg-evolve-$(VERSION) ../mercurial-evolve_$(VERSION).orig
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
    35
	cp -r debian/ ../mercurial-evolve_$(VERSION).orig/
ca5bb72d14ae pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
    36
	@cd ../mercurial-evolve_$(VERSION).orig && echo 'debian build directory ready at' `pwd`
531
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 0
diff changeset
    37
0
bbeef801409c minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
    38
.PHONY: tests all-version-tests