annotate debian/rules @ 6665:d2b90c9e5829 stable

uncommit: set uncommit_source extra consistently in interactive mode Previously, the uncommit_source extra was only explicitly set on the temporary changeset created during the uncommit command. Due to a contract mismatch because the extra() method returned a dict that might be reused for multiple callers and this call site expected a fresh dict, the resulting changeset produced by the uncommit command might or might not have had the correct extra nonetheless. This changeset ensures that it will be set consistently. There is a discussion whether the extra() method (in core) should always return a fresh dict. Independent of the outcome of the discussion, this fix should work. I checked that the tests work no matter whether extra() returns a fresh dict or a reused one (current core behavior).
author Manuel Jacob <me@manueljacob.de>
date Thu, 01 Feb 2024 19:13:24 +0100
parents 623517b1d83b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
531
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
1 #!/usr/bin/make -f
1123
d6c065a7a6b1 debian: Add DH_VERBOSE, commented out, for debugging convenience
Faheem Mitha <faheem@faheem.info>
parents: 999
diff changeset
2 #export DH_VERBOSE=1
531
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
3
1124
25e8f9c43f8a debian: remove clean target before implicit match rule
Faheem Mitha <faheem@faheem.info>
parents: 1123
diff changeset
4 %:
6136
95500f2f0966 debian: changes to build only for Python 3
Faheem Mitha <faheem@faheem.info>
parents: 5406
diff changeset
5 dh $@ --with python3,sphinxdoc --buildsystem=pybuild
531
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
6
4911
ddfc0b16c9d7 debian: make it possible to by-pass doc build
Denis Laxalde <denis@laxalde.org>
parents: 4909
diff changeset
7 ifeq (,$(filter nodoc, $(DEB_BUILD_OPTIONS)))
1125
f14163c7275a debian: replace build line with a override_dh_auto_build line
Faheem Mitha <faheem@faheem.info>
parents: 1124
diff changeset
8 override_dh_auto_build:
f14163c7275a debian: replace build line with a override_dh_auto_build line
Faheem Mitha <faheem@faheem.info>
parents: 1124
diff changeset
9 dh_auto_build
6137
0562705ae984 debian: drop all python2
Kim Alvefur <zash@zash.se>
parents: 6136
diff changeset
10 $(MAKE) -C docs
4911
ddfc0b16c9d7 debian: make it possible to by-pass doc build
Denis Laxalde <denis@laxalde.org>
parents: 4909
diff changeset
11 endif
531
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
12
1565
9590332b26c8 debian: don't refer to deleted tests/run-tests.py in debian/rules
Martin von Zweigbergk <martinvonz@google.com>
parents: 1165
diff changeset
13 hgsrc_defined:
9590332b26c8 debian: don't refer to deleted tests/run-tests.py in debian/rules
Martin von Zweigbergk <martinvonz@google.com>
parents: 1165
diff changeset
14 # Use "! -z" instead of "-n", because "-n" without arguments is true
9590332b26c8 debian: don't refer to deleted tests/run-tests.py in debian/rules
Martin von Zweigbergk <martinvonz@google.com>
parents: 1165
diff changeset
15 test ! -z $(HGSRC) && test -d $(HGSRC) || (echo "$(HGSRC) is not a directory"; false)
9590332b26c8 debian: don't refer to deleted tests/run-tests.py in debian/rules
Martin von Zweigbergk <martinvonz@google.com>
parents: 1165
diff changeset
16
725
235a942eba3f debian: honor nocheck in DEB_BUILD_OPTIONS
Julien Cristau <julien.cristau@logilab.fr>
parents: 535
diff changeset
17 ifeq (,$(filter nocheck, $(DEB_BUILD_OPTIONS)))
1565
9590332b26c8 debian: don't refer to deleted tests/run-tests.py in debian/rules
Martin von Zweigbergk <martinvonz@google.com>
parents: 1165
diff changeset
18 override_dh_auto_test: hgsrc_defined
6485
623517b1d83b packaging: use python3 instead of python in debian/rules
Anton Shestakov <av6@dwimlabs.net>
parents: 6137
diff changeset
19 cd tests && python3 $(HGSRC)/tests/run-tests.py --with-hg=$(HGSRC)/hg --blacklist=$(CURDIR)/debian/test-blacklist
725
235a942eba3f debian: honor nocheck in DEB_BUILD_OPTIONS
Julien Cristau <julien.cristau@logilab.fr>
parents: 535
diff changeset
20 endif
535
47246c32e0fb pkg-debian: remove conflicting __init__.py files
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
21
4913
cac7e750422f debian: also build with python3
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 4911
diff changeset
22 override_dh_python3:
cac7e750422f debian: also build with python3
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 4911
diff changeset
23 # avoid conflict with mercurial's own hgext3rd/__init__.py
cac7e750422f debian: also build with python3
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 4911
diff changeset
24 find debian -path '*/hgext3rd/__init__.py' -delete
cac7e750422f debian: also build with python3
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 4911
diff changeset
25 dh_python3
cac7e750422f debian: also build with python3
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 4911
diff changeset
26
5406
187bd6ade465 packaging: move docs cleanup target from debian/rules to docs/makefile
Anton Shestakov <av6@dwimlabs.net>
parents: 4913
diff changeset
27 override_dh_auto_clean:
1126
aef5e42a4fde debian: replace clean with override_dh_auto_clean
Faheem Mitha <faheem@faheem.info>
parents: 1125
diff changeset
28 dh_auto_clean
999
38099dfdcbbe debian: add line to clean target to delete error files caused by failing tests
Faheem Mitha <faheem@faheem.info>
parents: 735
diff changeset
29 rm -f tests/*.err
5406
187bd6ade465 packaging: move docs cleanup target from debian/rules to docs/makefile
Anton Shestakov <av6@dwimlabs.net>
parents: 4913
diff changeset
30 $(MAKE) -C docs clean