changeset 28135:ecfa82447162

tests: have a more elaborated test for _destrebase The previous repo had a single lineage and a single head, pretty boring for rebase related testing.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 09 Feb 2016 22:47:20 +0000
parents df206e030c59
children 5853878bbc2a
files tests/test-rebase-scenario-global.t
diffstat 1 files changed, 59 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-rebase-scenario-global.t	Sun Feb 14 21:15:59 2016 +0000
+++ b/tests/test-rebase-scenario-global.t	Tue Feb 09 22:47:20 2016 +0000
@@ -762,12 +762,69 @@
   saved backup bundle to $TESTTMP/cwd-vanish/.hg/strip-backup/779a07b1b7a0-853e0073-backup.hg (glob)
 
 Test experimental revset
+========================
 
   $ cd ..
+
+Make the repo a bit more interresting
+
+  $ hg up 1
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ echo aaa > aaa
+  $ hg add aaa
+  $ hg commit -m aaa
+  created new head
+  $ hg log -G
+  @  changeset:   4:5f7bc9025ed2
+  |  tag:         tip
+  |  parent:      1:58d79cc1cf43
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     aaa
+  |
+  | o  changeset:   3:1910d5ff34ea
+  | |  user:        test
+  | |  date:        Thu Jan 01 00:00:00 1970 +0000
+  | |  summary:     second source with subdir
+  | |
+  | o  changeset:   2:82901330b6ef
+  |/   user:        test
+  |    date:        Thu Jan 01 00:00:00 1970 +0000
+  |    summary:     first source commit
+  |
+  o  changeset:   1:58d79cc1cf43
+  |  user:        test
+  |  date:        Thu Jan 01 00:00:00 1970 +0000
+  |  summary:     dest commit
+  |
+  o  changeset:   0:e94b687f7da3
+     user:        test
+     date:        Thu Jan 01 00:00:00 1970 +0000
+     summary:     initial commit
+  
+
+Testing from lower head
+
+  $ hg up 3
+  2 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg log -r '_destrebase()'
-  changeset:   3:1910d5ff34ea
+  changeset:   4:5f7bc9025ed2
   tag:         tip
+  parent:      1:58d79cc1cf43
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     second source with subdir
+  summary:     aaa
   
+
+Testing from upper head
+
+  $ hg up 4
+  1 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ hg log -r '_destrebase()'
+  changeset:   4:5f7bc9025ed2
+  tag:         tip
+  parent:      1:58d79cc1cf43
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     aaa
+