changeset 23515:7856a87bbb02

tests: stabilise mq rebase tests Prepare for including hashes in output ... and less globbing make the tests easier to update.
author Mads Kiilerich <madski@unity3d.com>
date Tue, 09 Dec 2014 03:37:06 +0100
parents 3575f42e1b7b
children 328afbad6e57
files tests/test-rebase-mq-skip.t tests/test-rebase-mq.t
diffstat 2 files changed, 41 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-rebase-mq-skip.t	Tue Dec 09 14:45:12 2014 -0500
+++ b/tests/test-rebase-mq-skip.t	Tue Dec 09 03:37:06 2014 +0100
@@ -28,12 +28,12 @@
 
   $ hg up -q 0
 
-  $ hg qnew p0.patch
+  $ hg qnew p0.patch -d '1 0'
   $ echo p0 > p0
   $ hg add p0
   $ hg qref -m P0
 
-  $ hg qnew p1.patch
+  $ hg qnew p1.patch -d '2 0'
   $ echo p1 > p1
   $ hg add p1
   $ hg qref -m P1
@@ -50,7 +50,7 @@
   $ hg up -q -C qtip
 
   $ hg rebase
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/13a46ce44f60-backup.hg (glob)
 
   $ hg tglog
   @  3: 'P0' tags: p0.patch qbase qtip tip
@@ -114,7 +114,7 @@
   (no more unresolved files)
 
   $ hg rebase --continue
-  saved backup bundle to $TESTTMP/b/.hg/strip-backup/*-backup.hg (glob)
+  saved backup bundle to $TESTTMP/b/.hg/strip-backup/b4bffa6e4776-backup.hg (glob)
 
   $ hg tglog
   @  8: 'r5' tags: 5.diff qtip tip
--- a/tests/test-rebase-mq.t	Tue Dec 09 14:45:12 2014 -0500
+++ b/tests/test-rebase-mq.t	Tue Dec 09 03:37:06 2014 +0100
@@ -24,13 +24,13 @@
 
   $ hg up -q 0
 
-  $ hg qnew f.patch
+  $ hg qnew f.patch -d '1 0'
   $ echo mq1 > f
   $ hg qref -m P0
 
   $ hg qnew f2.patch
   $ echo mq2 > f
-  $ hg qref -m P1
+  $ hg qref -m P1 -d '2 0'
 
   $ hg tglog
   @  3: 'P1' tags: f2.patch qtip tip
@@ -83,7 +83,7 @@
   $ hg resolve -m f
   (no more unresolved files)
   $ hg rebase -c
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/3504f44bffc0-backup.hg (glob)
 
   $ hg tglog
   @  3: 'P1' tags: f2.patch qtip tip
@@ -102,15 +102,15 @@
   $ cat .hg/patches/f.patch
   # HG changeset patch
   # User test
-  # Date ?????????? ? (glob)
-  #      * (glob)
-  # Node ID ???????????????????????????????????????? (glob)
+  # Date 1 0
+  #      Thu Jan 01 00:00:01 1970 +0000
+  # Node ID ebe9914c0d1c3f60096e952fa4dbb3d377dea3ab
   # Parent  bac9ed9960d8992bcad75864a879fa76cadaf1b0
   P0
   
-  diff -r bac9ed9960d8 -r ???????????? f (glob)
+  diff -r bac9ed9960d8 -r ebe9914c0d1c f
   --- a/f	Thu Jan 01 00:00:00 1970 +0000
-  +++ b/f	??? ??? ?? ??:??:?? ???? ????? (glob)
+  +++ b/f	Thu Jan 01 00:00:01 1970 +0000
   @@ -1,1 +1,1 @@
   -r1
   +mq1r1
@@ -125,15 +125,15 @@
   $ cat .hg/patches/f2.patch
   # HG changeset patch
   # User test
-  # Date ?????????? ? (glob)
-  #      * (glob)
-  # Node ID ???????????????????????????????????????? (glob)
-  # Parent  ???????????????????????????????????????? (glob)
+  # Date 2 0
+  #      Thu Jan 01 00:00:02 1970 +0000
+  # Node ID 462012cf340c97d44d62377c985a423f6bb82f07
+  # Parent  ebe9914c0d1c3f60096e952fa4dbb3d377dea3ab
   P1
   
-  diff -r ???????????? -r ???????????? f (glob)
-  --- a/f	??? ??? ?? ??:??:?? ???? ????? (glob)
-  +++ b/f	??? ??? ?? ??:??:?? ???? ????? (glob)
+  diff -r ebe9914c0d1c -r 462012cf340c f
+  --- a/f	Thu Jan 01 00:00:01 1970 +0000
+  +++ b/f	Thu Jan 01 00:00:02 1970 +0000
   @@ -1,1 +1,1 @@
   -mq1r1
   +mq1r1mq2
@@ -150,12 +150,12 @@
 
   $ hg up -q 0
 
-  $ hg qnew --git f_git.patch
+  $ hg qnew --git f_git.patch -d '3 0'
   $ echo mq1 > p
   $ hg add p
   $ hg qref --git -m 'P0 (git)'
 
-  $ hg qnew f.patch
+  $ hg qnew f.patch -d '4 0'
   $ echo mq2 > p
   $ hg qref -m P1
   $ hg qci -m 'save patch state'
@@ -171,6 +171,8 @@
   series
 
   $ cat .hg/patches/f_git.patch
+  Date: 3 0
+  
   P0 (git)
   
   diff --git a/p b/p
@@ -181,6 +183,8 @@
   +mq1
 
   $ cat .hg/patches/f.patch
+  Date: 4 0
+  
   P1
   
   diff -r ???????????? p (glob)
@@ -194,7 +198,7 @@
 Rebase the applied mq patches:
 
   $ hg rebase -s 2 -d 1
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob)
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/0c587ffcb480-backup.hg (glob)
 
   $ hg qci -m 'save patch state'
 
@@ -211,9 +215,9 @@
   $ cat .hg/patches/f_git.patch
   # HG changeset patch
   # User test
-  # Date ?????????? ? (glob)
-  #      * (glob)
-  # Node ID ???????????????????????????????????????? (glob)
+  # Date 3 0
+  #      Thu Jan 01 00:00:03 1970 +0000
+  # Node ID 12d9f6a3bbe560dee50c7c454d434add7fb8e837
   # Parent  bac9ed9960d8992bcad75864a879fa76cadaf1b0
   P0 (git)
   
@@ -227,15 +231,15 @@
   $ cat .hg/patches/f.patch
   # HG changeset patch
   # User test
-  # Date ?????????? ? (glob)
-  #      * (glob)
-  # Node ID ???????????????????????????????????????? (glob)
-  # Parent  ???????????????????????????????????????? (glob)
+  # Date 4 0
+  #      Thu Jan 01 00:00:04 1970 +0000
+  # Node ID c77a2661c64c60d82f63c4f7aefd95b3a948a557
+  # Parent  12d9f6a3bbe560dee50c7c454d434add7fb8e837
   P1
   
-  diff -r ???????????? -r ???????????? p (glob)
-  --- a/p	??? ??? ?? ??:??:?? ???? ????? (glob)
-  +++ b/p	??? ??? ?? ??:??:?? ???? ????? (glob)
+  diff -r 12d9f6a3bbe5 -r c77a2661c64c p
+  --- a/p	Thu Jan 01 00:00:03 1970 +0000
+  +++ b/p	Thu Jan 01 00:00:04 1970 +0000
   @@ -1,1 +1,1 @@
   -mq1
   +mq2
@@ -256,10 +260,10 @@
   $ echo guarded > guarded
   $ hg add guarded
   $ hg qnew guarded
-  $ hg qnew empty-important -m 'important commit message'
+  $ hg qnew empty-important -m 'important commit message' -d '1 0'
   $ echo bar > bar
   $ hg add bar
-  $ hg qnew bar
+  $ hg qnew bar -d '2 0'
   $ echo foo > foo
   $ hg add foo
   $ hg qnew foo
@@ -339,10 +343,10 @@
   foo: +baz
 
   $ hg tglog
-  @  2:* '[mq]: bar' tags: bar qbase qtip tip (glob)
+  @  2: '[mq]: bar' tags: bar qbase qtip tip
   |
-  o  1:* 'b' tags: qparent (glob)
+  o  1: 'b' tags: qparent
   |
-  o  0:* 'a' tags: (glob)
+  o  0: 'a' tags:
   
   $ cd ..