view 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
line wrap: on
line source

#!/usr/bin/make -f
#export DH_VERBOSE=1

%:
	dh $@ --with python2,python3,sphinxdoc --buildsystem=pybuild

ifeq (,$(filter nodoc, $(DEB_BUILD_OPTIONS)))
override_dh_auto_build:
	dh_auto_build
	# Workaround for Sphinx in Debian Buster defaulting to Python 3
	SPHINXBUILD="python -m sphinx -bhtml" $(MAKE) -C docs
endif

hgsrc_defined:
	# Use "! -z" instead of "-n", because "-n" without arguments is true
	test ! -z $(HGSRC) && test -d $(HGSRC) || (echo "$(HGSRC) is not a directory"; false)

ifeq (,$(filter nocheck, $(DEB_BUILD_OPTIONS)))
override_dh_auto_test: hgsrc_defined
	cd tests && python $(HGSRC)/tests/run-tests.py --with-hg=$(HGSRC)/hg --blacklist=$(CURDIR)/debian/test-blacklist
endif

override_dh_python2:
	# avoid conflict with mercurial's own hgext3rd/__init__.py
	find debian -path '*/hgext3rd/__init__.py' -delete
	dh_python2

override_dh_python3:
	# avoid conflict with mercurial's own hgext3rd/__init__.py
	find debian -path '*/hgext3rd/__init__.py' -delete
	dh_python3

override_dh_auto_clean:
	dh_auto_clean
	rm -f tests/*.err
	$(MAKE) -C docs clean