changeset 39799:f28812c708a5 stable

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
author Valentin Gatien-Baron <vgatien-baron@janestreet.com>
date Tue, 25 Sep 2018 16:03:14 -0400
parents 41ac8ea1bdd7
children 572cd30eaffb
files tests/test-revset.t
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-revset.t	Tue Sep 11 13:52:17 2018 -0400
+++ b/tests/test-revset.t	Tue Sep 25 16:03:14 2018 -0400
@@ -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