Mercurial > evolve
annotate Makefile @ 6935:954d7ea5cd67 stable tip
stack: when stack base is obsolete, pick any successor, even if at random
There are situations when s0 is obsolete and we also cannot pick just one
successor for it to use in stack. In such a case, let's pick the "latest"
successor from the first set.
We're assuming that obsutil.successorssets() returns data in the same order (it
should, since it makes sure to sort data internally). Keeping that in mind,
while the successor picked for s0 by this code is not based on any sort of
sophisticated logic, it should nonetheless be the same every time.
This patch is probably not going to completely break anything that was
previously working fine, because the previous behavior was to just abort with
an exception.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 16 Nov 2024 17:01:02 +0400 |
parents | a80ed2e4745b |
children |
rev | line source |
---|---|
5846
a86c2682f608
make: default to using python3
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
5386
diff
changeset
|
1 PYTHON ?= python3 |
6132
7da0f8128d90
makefile: cleaned up the last hardcoded python calls
Georges Racinet <georges.racinet@octobus.net>
parents:
5846
diff
changeset
|
2 VERSION = $(shell $(PYTHON) setup.py --version) |
5381
7cdbe18838bc
makefile: move all definitions to the top
Anton Shestakov <av6@dwimlabs.net>
parents:
2270
diff
changeset
|
3 TESTFLAGS ?= $(shell echo $$HGTESTFLAGS) |
7cdbe18838bc
makefile: move all definitions to the top
Anton Shestakov <av6@dwimlabs.net>
parents:
2270
diff
changeset
|
4 HGTESTS = $(HGROOT)/tests |
542
ca5bb72d14ae
pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
531
diff
changeset
|
5 |
5386
77729ad7cb0c
makefile: make all non-file targets phony
Anton Shestakov <av6@dwimlabs.net>
parents:
5385
diff
changeset
|
6 .PHONY: help |
5382
2e90cd9feec8
makefile: move help target to be the first target (i.e. default goal)
Anton Shestakov <av6@dwimlabs.net>
parents:
5381
diff
changeset
|
7 help: |
2e90cd9feec8
makefile: move help target to be the first target (i.e. default goal)
Anton Shestakov <av6@dwimlabs.net>
parents:
5381
diff
changeset
|
8 @echo 'Commonly used make targets:' |
2e90cd9feec8
makefile: move help target to be the first target (i.e. default goal)
Anton Shestakov <av6@dwimlabs.net>
parents:
5381
diff
changeset
|
9 @echo ' deb-prepare - prepare the build of a debian package' |
5383
38de9f5f5b40
makefile: mention install-home in the help output
Anton Shestakov <av6@dwimlabs.net>
parents:
5382
diff
changeset
|
10 @echo ' install-home - install with setup.py install --home=$$HOME ($(HOME))' |
5382
2e90cd9feec8
makefile: move help target to be the first target (i.e. default goal)
Anton Shestakov <av6@dwimlabs.net>
parents:
5381
diff
changeset
|
11 @echo ' tests - run all tests in the automatic test suite' |
0
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
12 |
5386
77729ad7cb0c
makefile: make all non-file targets phony
Anton Shestakov <av6@dwimlabs.net>
parents:
5385
diff
changeset
|
13 .PHONY: all |
0
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
14 all: help |
bbeef801409c
minimalistic state concept.
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff
changeset
|
15 |
5386
77729ad7cb0c
makefile: make all non-file targets phony
Anton Shestakov <av6@dwimlabs.net>
parents:
5385
diff
changeset
|
16 .PHONY: deb-prepare |
531
b18b00036355
pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
0
diff
changeset
|
17 deb-prepare: |
6132
7da0f8128d90
makefile: cleaned up the last hardcoded python calls
Georges Racinet <georges.racinet@octobus.net>
parents:
5846
diff
changeset
|
18 $(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
|
19 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
|
20 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
|
21 rm -rf ../mercurial-evolve_$(VERSION).orig |
ca5bb72d14ae
pkg: abstract version in makefile
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
531
diff
changeset
|
22 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
|
23 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
|
24 @cd ../mercurial-evolve_$(VERSION).orig && echo 'debian build directory ready at' `pwd` |
2020
143c8e4dc22d
topic: merge the topic extension in the evolve repository
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
diff
changeset
|
25 |
5386
77729ad7cb0c
makefile: make all non-file targets phony
Anton Shestakov <av6@dwimlabs.net>
parents:
5385
diff
changeset
|
26 .PHONY: install-home |
2040
934d70e3be97
makefile: add an 'install-home' target
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2039
diff
changeset
|
27 install-home: |
6456
a80ed2e4745b
makefile: get setup tools out of the equation
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
6132
diff
changeset
|
28 $(PYTHON) setup.py install --home="$(HOME)" --prefix="" --force --old-and-unmanageable --single-version-externally-managed |
2040
934d70e3be97
makefile: add an 'install-home' target
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2039
diff
changeset
|
29 |
5386
77729ad7cb0c
makefile: make all non-file targets phony
Anton Shestakov <av6@dwimlabs.net>
parents:
5385
diff
changeset
|
30 .PHONY: doc |
5384
18a6f5ffab1b
makefile: add doc target, since it's easy enough
Anton Shestakov <av6@dwimlabs.net>
parents:
5383
diff
changeset
|
31 doc: |
18a6f5ffab1b
makefile: add doc target, since it's easy enough
Anton Shestakov <av6@dwimlabs.net>
parents:
5383
diff
changeset
|
32 $(MAKE) -C docs |
18a6f5ffab1b
makefile: add doc target, since it's easy enough
Anton Shestakov <av6@dwimlabs.net>
parents:
5383
diff
changeset
|
33 |
5386
77729ad7cb0c
makefile: make all non-file targets phony
Anton Shestakov <av6@dwimlabs.net>
parents:
5385
diff
changeset
|
34 .PHONY: _check_hgroot |
2039
103da16f3be2
makefile: only check for HGROOT when running tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2020
diff
changeset
|
35 _check_hgroot: |
2269
b838c069bf4e
make: fix indent of ifeq-endif
Yuya Nishihara <yuya@tcha.org>
parents:
2040
diff
changeset
|
36 ifeq ($(HGROOT),) |
b838c069bf4e
make: fix indent of ifeq-endif
Yuya Nishihara <yuya@tcha.org>
parents:
2040
diff
changeset
|
37 $(error HGROOT is not set to the root of the hg source tree) |
b838c069bf4e
make: fix indent of ifeq-endif
Yuya Nishihara <yuya@tcha.org>
parents:
2040
diff
changeset
|
38 endif |
2039
103da16f3be2
makefile: only check for HGROOT when running tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2020
diff
changeset
|
39 |
5386
77729ad7cb0c
makefile: make all non-file targets phony
Anton Shestakov <av6@dwimlabs.net>
parents:
5385
diff
changeset
|
40 .PHONY: tests |
2039
103da16f3be2
makefile: only check for HGROOT when running tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2020
diff
changeset
|
41 tests: _check_hgroot |
1879
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
42 cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) |
1839
1bc5e62fc0c7
Initial dumb version of topics.
Augie Fackler <augie@google.com>
parents:
diff
changeset
|
43 |
2039
103da16f3be2
makefile: only check for HGROOT when running tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2020
diff
changeset
|
44 test-%: _check_hgroot |
1879
bd5c2922a8ad
Makefile: rework running of tests
Augie Fackler <raf@durin42.com>
parents:
1839
diff
changeset
|
45 cd tests && $(PYTHON) $(HGTESTS)/run-tests.py $(TESTFLAGS) $@ |