annotate debian/rules @ 5687:d24669df9a4a

topic: look for topic heads only when necessary Before this patch, if repo.branchheads() were asked to return heads of a branch and if there is any active topic, it would append that topic name to branch name and search heads for it and return wrong results. Because of this behavior we get wrong results for "hg heads" command because, this command make a list of heads of each branch in branchmap. So if wdir parent has an active topic, it would search for "branch:topic" instead of "branch" for each branch. Now we append topic only when branch is not passed to the function. Changes in test-topic.t file reflect the fixed behavior. Changes in test-topic-stack-data.t are obvious but not correct for `hg sum` output, which is because that's what the expected behavior acc. to the current logic in `hg sum` as it looks for the heads of branch of wdir parent and calculate new commits like this: new = ancestor(all branch heads) - ancestor(current parent) So, it doesn't really care if wdir parent has a topic which is why we are getting wrong result for "update:" in `hg sum`. You might be wondering why it was returning the correct output before, but I digged into it and can tell you that it's just a false combination of current cset and code bits which gave the correct results. If we want to correctly fix the issue we probably need to wrap `hg sum` command.
author Sushil khanchi <sushilkhanchi97@gmail.com>
date Tue, 01 Dec 2020 00:56:39 +0530
parents 187bd6ade465
children 95500f2f0966
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 %:
4913
cac7e750422f debian: also build with python3
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 4911
diff changeset
5 dh $@ --with python2,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
4632
a1d191feaa84 debian: Override default value for SPHINXBUILD in docs/makefile
Faheem Mitha <faheem@faheem.info>
parents: 3745
diff changeset
10 # Workaround for Sphinx in Debian Buster defaulting to Python 3
4645
6292fe564b20 debian: override default value for SPHINXBUILD in docs/makefile
Faheem Mitha <faheem@faheem.info>
parents: 4632
diff changeset
11 SPHINXBUILD="python -m sphinx -bhtml" $(MAKE) -C docs
4911
ddfc0b16c9d7 debian: make it possible to by-pass doc build
Denis Laxalde <denis@laxalde.org>
parents: 4909
diff changeset
12 endif
531
b18b00036355 pkg/debian: Debian packaging
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents:
diff changeset
13
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
14 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
15 # 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
16 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
17
725
235a942eba3f debian: honor nocheck in DEB_BUILD_OPTIONS
Julien Cristau <julien.cristau@logilab.fr>
parents: 535
diff changeset
18 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
19 override_dh_auto_test: 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
20 cd tests && python $(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
21 endif
535
47246c32e0fb pkg-debian: remove conflicting __init__.py files
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
22
47246c32e0fb pkg-debian: remove conflicting __init__.py files
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
23 override_dh_python2:
2072
c0a685c67c5c debian: don't delete evolve and topic extensions
Martin von Zweigbergk <martinvonz@google.com>
parents: 1565
diff changeset
24 # avoid conflict with mercurial's own hgext3rd/__init__.py
c0a685c67c5c debian: don't delete evolve and topic extensions
Martin von Zweigbergk <martinvonz@google.com>
parents: 1565
diff changeset
25 find debian -path '*/hgext3rd/__init__.py' -delete
535
47246c32e0fb pkg-debian: remove conflicting __init__.py files
Pierre-Yves David <pierre-yves.david@logilab.fr>
parents: 531
diff changeset
26 dh_python2
735
d3bfd03cb26e debian: properly clean the docs build
Julien Cristau <julien.cristau@logilab.fr>
parents: 725
diff changeset
27
4913
cac7e750422f debian: also build with python3
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 4911
diff changeset
28 override_dh_python3:
cac7e750422f debian: also build with python3
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 4911
diff changeset
29 # 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
30 find debian -path '*/hgext3rd/__init__.py' -delete
cac7e750422f debian: also build with python3
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 4911
diff changeset
31 dh_python3
cac7e750422f debian: also build with python3
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 4911
diff changeset
32
5406
187bd6ade465 packaging: move docs cleanup target from debian/rules to docs/makefile
Anton Shestakov <av6@dwimlabs.net>
parents: 4913
diff changeset
33 override_dh_auto_clean:
1126
aef5e42a4fde debian: replace clean with override_dh_auto_clean
Faheem Mitha <faheem@faheem.info>
parents: 1125
diff changeset
34 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
35 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
36 $(MAKE) -C docs clean