D4736: revset: fix commonancestor test so it demonstrates correct behavior
valentin.gatienbaron (Valentin Gatien-Baron)
phabricator at mercurial-scm.org
Tue Sep 25 21:18:52 UTC 2018
valentin.gatienbaron created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
The problem is that hg log -r 'head()' is every changeset in the
repository, because in this test repository, every changeset has a
different branch. The author probably assumed all commits were on the
default branch, and that they were getting topological heads, 7 and 9.
As a result, this test was showing that the common ancestors of
0:9 are 0+1+2+4, which is not correct (next commit will test this).
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D4736
AFFECTED FILES
tests/test-revset.t
CHANGE DETAILS
diff --git a/tests/test-revset.t b/tests/test-revset.t
--- a/tests/test-revset.t
+++ b/tests/test-revset.t
@@ -1049,7 +1049,7 @@
2
4
- $ hg log -T '{rev}\n' -r 'commonancestors(head())'
+ $ hg log -T '{rev}\n' -r 'commonancestors(heads(all()))'
0
1
2
To: valentin.gatienbaron, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list