Patchwork [1,of,3] test-backout: add multiple summary calls to monitor result wc

login
register
mail settings
Submitter Pierre-Yves David
Date Jan. 9, 2014, 1:40 a.m.
Message ID <c1b82a66191b13a66df0.1389231615@marginatus.fb.com>
Download mbox | patch
Permalink /patch/3279/
State Accepted
Headers show

Comments

Pierre-Yves David - Jan. 9, 2014, 1:40 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1389230122 28800
#      Wed Jan 08 17:15:22 2014 -0800
# Node ID c1b82a66191b13a66df0d1708f0b4f4a4d2c2cfd
# Parent  082b2930fe2ca9a003b08439524384e097acaa0a
test-backout: add multiple summary calls to monitor result wc

The main goal is to monitor that working directory parent are correct after
backout. This will be useful the next changeset introducting magic merge usage.

Patch

diff --git a/tests/test-backout.t b/tests/test-backout.t
--- a/tests/test-backout.t
+++ b/tests/test-backout.t
@@ -21,10 +21,16 @@  basic operation
   $ hg backout -d '2 0' tip --tool=true
   reverting a
   changeset 2:2929462c3dff backs out changeset 1:a820f4f40a57
   $ cat a
   a
+  $ hg summary
+  parent: 2:2929462c3dff tip
+   Backed out changeset a820f4f40a57
+  branch: default
+  commit: (clean)
+  update: (current)
 
 file that was removed is recreated
 
   $ cd ..
   $ hg init remove
@@ -40,18 +46,30 @@  file that was removed is recreated
   $ hg backout -d '2 0' tip --tool=true
   adding a
   changeset 2:de31bdc76c0d backs out changeset 1:76862dcce372
   $ cat a
   content
+  $ hg summary
+  parent: 2:de31bdc76c0d tip
+   Backed out changeset 76862dcce372
+  branch: default
+  commit: (clean)
+  update: (current)
 
 backout of backout is as if nothing happened
 
   $ hg backout -d '3 0' --merge tip --tool=true
   removing a
   changeset 3:7f6d0f120113 backs out changeset 2:de31bdc76c0d
   $ test -f a
   [1]
+  $ hg summary
+  parent: 3:7f6d0f120113 tip
+   Backed out changeset de31bdc76c0d
+  branch: default
+  commit: (clean)
+  update: (current)
 
 across branch
 
   $ cd ..
   $ hg init branch
@@ -62,26 +80,44 @@  across branch
   $ echo b > b
   $ hg ci -Am1
   adding b
   $ hg co -C 0
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ hg summary
+  parent: 0:f7b1eb17ad24 
+   0
+  branch: default
+  commit: (clean)
+  update: 1 new changesets (update)
 
 should fail
 
   $ hg backout 1
   abort: cannot backout change on a different branch
   [255]
   $ echo c > c
   $ hg ci -Am2
   adding c
   created new head
+  $ hg summary
+  parent: 2:db815d6d32e6 tip
+   2
+  branch: default
+  commit: (clean)
+  update: 1 new changesets, 2 branch heads (merge)
 
 should fail
 
   $ hg backout 1
   abort: cannot backout change on a different branch
   [255]
+  $ hg summary
+  parent: 2:db815d6d32e6 tip
+   2
+  branch: default
+  commit: (clean)
+  update: 1 new changesets, 2 branch heads (merge)
 
 backout with merge
 
   $ cd ..
   $ hg init merge
@@ -89,10 +125,16 @@  backout with merge
 
   $ echo line 1 > a
   $ echo line 2 >> a
   $ hg commit -d '0 0' -A -m a
   adding a
+  $ hg summary
+  parent: 0:59395513a13a tip
+   a
+  branch: default
+  commit: (clean)
+  update: (current)
 
 remove line 1
 
   $ echo line 2 > a
   $ hg commit -d '1 0' -m b
@@ -107,10 +149,16 @@  remove line 1
   merging with changeset 3:26b8ccb9ad91
   merging a
   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ hg commit -d '4 0' -m d
+  $ hg summary
+  parent: 4:c7df5e0b9c09 tip
+   d
+  branch: default
+  commit: (clean)
+  update: (current)
 
 check line 1 is back
 
   $ cat a
   line 1
@@ -129,10 +177,16 @@  backout should not back out subsequent c
   $ echo 2 >> a
   $ hg commit -d '1 0' -m b
   $ echo 1 > b
   $ hg commit -d '2 0' -A -m c
   adding b
+  $ hg summary
+  parent: 2:882396649954 tip
+   c
+  branch: default
+  commit: (clean)
+  update: (current)
 
 without --merge
   $ hg backout -d '3 0' 1 --tool=true
   reverting a
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -140,10 +194,16 @@  without --merge
   b
   $ hg update -C tip
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg locate b
   b
+  $ hg summary
+  parent: 2:882396649954 tip
+   c
+  branch: default
+  commit: (clean)
+  update: (current)
 
 with --merge
   $ hg backout --merge -d '3 0' 1 --tool=true
   reverting a
   created new head
@@ -178,10 +238,16 @@  with --merge
   created new head
   $ hg merge 2
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   $ hg commit -d '4 0' -A -m d
+  $ hg summary
+  parent: 4:b2f3bb92043e tip
+   d
+  branch: default
+  commit: (clean)
+  update: (current)
 
 backout of merge should fail
 
   $ hg backout 4
   abort: cannot backout a merge changeset
@@ -202,20 +268,38 @@  backout of non-merge with parent should 
 backout with valid parent should be ok
 
   $ hg backout -d '5 0' --parent 2 4 --tool=true
   removing d
   changeset 5:10e5328c8435 backs out changeset 4:b2f3bb92043e
+  $ hg summary
+  parent: 5:10e5328c8435 tip
+   Backed out changeset b2f3bb92043e
+  branch: default
+  commit: (clean)
+  update: (current)
 
   $ hg rollback
   repository tip rolled back to revision 4 (undo commit)
   working directory now based on revision 4
   $ hg update -C
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg summary
+  parent: 4:b2f3bb92043e tip
+   d
+  branch: default
+  commit: (clean)
+  update: (current)
 
   $ hg backout -d '6 0' --parent 3 4 --tool=true
   removing c
   changeset 5:033590168430 backs out changeset 4:b2f3bb92043e
+  $ hg summary
+  parent: 5:033590168430 tip
+   Backed out changeset b2f3bb92043e
+  branch: default
+  commit: (clean)
+  update: (current)
 
   $ cd ..
 
 named branches
 
@@ -246,30 +330,50 @@  without --merge
   branch2
   $ hg status -A
   R file1
   C default
   C file2
+  $ hg summary
+  parent: 2:45bbcd363bf0 tip
+   file2
+  branch: branch2
+  commit: 1 removed
+  update: (current)
 
 with --merge
   $ hg update -qC
   $ hg backout --merge -d '3 0' -r 1 -m 'backout on branch1' --tool=true
   removing file1
   created new head
   changeset 3:d4e8f6db59fb backs out changeset 1:bf1602f437f3
   merging with changeset 3:d4e8f6db59fb
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
+  $ hg summary
+  parent: 2:45bbcd363bf0 
+   file2
+  parent: 3:d4e8f6db59fb tip
+   backout on branch1
+  branch: branch2
+  commit: 1 removed (merge)
+  update: (current)
   $ hg update -q -C 2
 
 on branch2 with branch1 not merged, so file1 should still exist:
 
   $ hg id
   45bbcd363bf0 (branch2)
   $ hg st -A
   C default
   C file1
   C file2
+  $ hg summary
+  parent: 2:45bbcd363bf0 
+   file2
+  branch: branch2
+  commit: (clean)
+  update: 1 new changesets, 2 branch heads (merge)
 
 on branch2 with branch1 merged, so file1 should be gone:
 
   $ hg merge
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -278,17 +382,29 @@  on branch2 with branch1 merged, so file1
   $ hg id
   22149cdde76d (branch2) tip
   $ hg st -A
   C default
   C file2
+  $ hg summary
+  parent: 4:22149cdde76d tip
+   merge backout of branch1
+  branch: branch2
+  commit: (clean)
+  update: (current)
 
 on branch1, so no file1 and file2:
 
   $ hg co -C branch1
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg id
   bf1602f437f3 (branch1)
   $ hg st -A
   C default
   C file1
+  $ hg summary
+  parent: 1:bf1602f437f3 
+   file1
+  branch: branch1
+  commit: (clean)
+  update: (current)
 
   $ cd ..