Patchwork [10,of,11] tests: make unshelve tests more tricky - don't depend on size change

login
register
mail settings
Submitter Mads Kiilerich
Date Feb. 20, 2014, 1:43 a.m.
Message ID <0c08463662aa82753923.1392860614@localhost.localdomain>
Download mbox | patch
Permalink /patch/3716/
State Superseded
Commit 6c40ea34ecc19b25d3670783ae059c557a0e7f30
Headers show

Comments

Mads Kiilerich - Feb. 20, 2014, 1:43 a.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1392860545 -3600
#      Thu Feb 20 02:42:25 2014 +0100
# Node ID 0c08463662aa82753923bb49575e6b9379dc9213
# Parent  6e1c0666f1f4fde109da045aedf26d93af9e7ed1
tests: make unshelve tests more tricky - don't depend on size change

Patch

diff --git a/tests/test-shelve.t b/tests/test-shelve.t
--- a/tests/test-shelve.t
+++ b/tests/test-shelve.t
@@ -531,7 +531,7 @@  unshelve should keep a copy of unknown f
   z
 
 
-unshelve and conflicts with untracked files
+unshelve and conflicts with tracked and untracked files
 
  preparing:
 
@@ -546,7 +546,7 @@  unshelve and conflicts with untracked fi
   $ hg shelve
   shelved as default
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ echo gold > f
+  $ echo g > f
   $ hg unshelve
   unshelving change 'default'
   $ hg st
@@ -555,7 +555,7 @@  unshelve and conflicts with untracked fi
   $ cat f
   f
   $ cat f.orig
-  gold
+  g
 
  other uncommitted changes - merge:
 
@@ -576,7 +576,7 @@  unshelve and conflicts with untracked fi
   o  0  a  test
   
   $ mv f.orig f
-  $ echo other change >> a
+  $ echo 1 > a
   $ hg unshelve
   unshelving change 'default'
   temporarily committing pending changes (restore with 'hg unshelve --abort')
@@ -586,28 +586,28 @@  unshelve and conflicts with untracked fi
   merging f incomplete! (edit conflicts, then use 'hg resolve --mark')
   unresolved conflicts (see 'hg resolve', then 'hg unshelve --continue')
   [1]
-  $ hg log -G --template '{rev}  {desc|firstline}  {author}  {date|isodate}'
-  @  5  changes to 'commit stuff'  shelve@localhost  1970-01-01 00:00 +0000
+  $ hg log -G --template '{rev}  {desc|firstline}  {author}  {date|isodate}  {files}'
+  @  5  changes to 'commit stuff'  shelve@localhost  1970-01-01 00:00 +0000  f
   |
-  | @  4  pending changes temporary commit  shelve@localhost  1970-01-01 00:00 +0000
+  | @  4  pending changes temporary commit  shelve@localhost  1970-01-01 00:00 +0000  a
   |/
-  o  3  commit stuff  test  1970-01-01 00:00 +0000
+  o  3  commit stuff  test  1970-01-01 00:00 +0000  d e
   |
-  | o  2  c  test  1970-01-01 00:00 +0000
+  | o  2  c  test  1970-01-01 00:00 +0000  c
   |/
-  o  0  a  test  1970-01-01 00:00 +0000
+  o  0  a  test  1970-01-01 00:00 +0000  a
   
   $ hg st
   M f
   ? f.orig
   $ cat f
   <<<<<<< local
-  gold
+  g
   =======
   f
   >>>>>>> other
   $ cat f.orig
-  gold
+  g
   $ hg unshelve --abort
   rebase aborted
   unshelve of 'default' aborted
@@ -615,7 +615,7 @@  unshelve and conflicts with untracked fi
   M a
   ? f.orig
   $ cat f.orig
-  gold
+  g
   $ hg unshelve
   unshelving change 'default'
   temporarily committing pending changes (restore with 'hg unshelve --abort')
@@ -645,18 +645,23 @@  unshelve and conflicts with untracked fi
   ? f.orig
   $ cat f
   <<<<<<< local
-  gold
+  g
   =======
   f
   >>>>>>> other
   $ cat f.orig
-  gold
+  g
   $ hg unshelve --abort
   rebase aborted
   no changes needed to a
   no changes needed to d
   no changes needed to e
   unshelve of 'default' aborted
+  $ hg st
+  ? f.orig
+ FIXME: f was lost!
+  $ cat f.orig
+  g
   $ hg shelve --delete default
 
   $ cd ..