# HG changeset patch # User Valentin Gatien-Baron # Date 1537905794 14400 # Node ID f28812c708a5cac724e0b963f7dbf669d48457f7 # Parent 41ac8ea1bdd751303e49d5a98def025f78dbbf0c revset: fix commonancestor test so it demonstrates correct behavior 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). Differential Revision: https://phab.mercurial-scm.org/D4736 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