Mercurial > hg
diff tests/test-merge-criss-cross.t @ 38625:52f19a840543
revset: add optimization for heads(commonancestors())
Previously, the only way to get these commits were (tested on
mozilla-central):
hg perfrevset 'heads(::a7cf55 and ::d8b15)'
! wall 4.988366 comb 4.960000 user 4.780000 sys 0.180000 (best of 3)
After this patch:
(python)
hg perfrevset 'heads(commonancestors(a7cf55 + d8b15))'
! wall 0.002155 comb 0.000000 user 0.000000 sys 0.000000 (best of 1107)
(C)
hg perfrevset 'heads(commonancestors(a7cf55 + d8b15))'
! wall 0.000568 comb 0.000000 user 0.000000 sys 0.000000 (best of 4646)
author | Sean Farley <sean@farley.io> |
---|---|
date | Tue, 26 Jun 2018 15:26:21 -0700 |
parents | 41ef02ba329b |
children | f2fe7cf4ebb6 |
line wrap: on
line diff
--- a/tests/test-merge-criss-cross.t Mon Jun 18 19:41:54 2018 -0700 +++ b/tests/test-merge-criss-cross.t Tue Jun 26 15:26:21 2018 -0700 @@ -410,6 +410,21 @@ 3 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) +Test the greatest common ancestor returning multiple changesets + + $ hg log -r 'heads(commonancestors(head()))' + changeset: 1:0f6b37dbe527 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: 1 first change f1 + + changeset: 2:d1d156401c1b + parent: 0:40494bf2444c + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: 2 first change f2 + + $ cd .. http://stackoverflow.com/questions/9350005/how-do-i-specify-a-merge-base-to-use-in-a-hg-merge/9430810