Makefile
author Pierre-Yves David <pierre-yves.david@fb.com>
Sat, 12 Mar 2016 15:36:17 +0000
changeset 1885 d49f75eab6a3
parent 1883 ebf146c77709
child 1893 9d1157fcdc6c
permissions -rw-r--r--
topic: take topic in account for all branch head computation This changeset introduce a "topicmap" that is tracking not just the head of all branches, but the heads of all branch+topic pair. Including the head of the part of the branch without any topic. In practice this means that BRANCHNAME now resolve to the tipmost part for the branch without topic and impact various other logic like head checking during push and default destination for update and merge (these aspect will need adjustment in later changesets). The on-the-fly-temporary-monkey-patching process is pretty horrible, but allow to move forward without waiting on having core patched. We use 'branch:topic' as the branchmap key, this is a small and easy hack that help use a lot for (future) support of heads discovery/checking and on disc cache. I'm not sure it is worthwhile to improve this until an implementation into core. Note that this changeset change the branchmap in all cases, including during exchange, see next changeset for improved behavior. We also currently have the on-disk cache disabled because the core branchmap is lacking phase information in its cache key. This will get done in a later changesets
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     1
PYTHON=python
1879
bd5c2922a8ad Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents: 1839
diff changeset
     2
ifeq ($(HGROOT),)
bd5c2922a8ad Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents: 1839
diff changeset
     3
  $(error HGROOT is not set to the root of the hg source tree)
bd5c2922a8ad Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents: 1839
diff changeset
     4
endif
bd5c2922a8ad Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents: 1839
diff changeset
     5
TESTFLAGS ?= $(shell echo $$HGTESTFLAGS)
bd5c2922a8ad Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents: 1839
diff changeset
     6
bd5c2922a8ad Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents: 1839
diff changeset
     7
HGTESTS=$(HGROOT)/tests
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     8
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
     9
help:
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    10
	@echo 'Commonly used make targets:'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    11
	@echo '  tests              - run all tests in the automatic test suite'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    12
	@echo '  all-version-tests - run all tests against many hg versions'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    13
	@echo '  tests-%s           - run all tests in the specified hg version'
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    14
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    15
all: help
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    16
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    17
tests:
1879
bd5c2922a8ad Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents: 1839
diff changeset
    18
	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    19
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    20
test-%:
1879
bd5c2922a8ad Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents: 1839
diff changeset
    21
	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    22
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    23
tests-%:
1879
bd5c2922a8ad Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents: 1839
diff changeset
    24
	hg -R $(HGROOT) checkout $$(echo $@ | sed s/tests-//) && \
bd5c2922a8ad Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents: 1839
diff changeset
    25
	(cd $(HGROOT) ; $(MAKE) clean ) && \
bd5c2922a8ad Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents: 1839
diff changeset
    26
	cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS)
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    27
1883
ebf146c77709 Makefile: update all-version-tests to explicitly test 3.7
Augie Fackler <raf@durin42.com>
parents: 1879
diff changeset
    28
all-version-tests: tests-3.7 tests-tip
1839
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    29
1bc5e62fc0c7 Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff changeset
    30
.PHONY: tests all-version-tests