Patchwork D5850: tests: demonstrate broken unshelve when backing up untracked file

login
register
mail settings
Submitter phabricator
Date Feb. 7, 2019, 2:02 a.m.
Message ID <31cd8c07e3c7ec30020ed8f8cea642ad@localhost.localdomain>
Download mbox | patch
Permalink /patch/38499/
State Not Applicable
Headers show

Comments

phabricator - Feb. 7, 2019, 2:02 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG7e09ffb3170d: tests: demonstrate broken unshelve when backing up untracked file (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5850?vs=13855&id=13872

REVISION DETAIL
  https://phab.mercurial-scm.org/D5850

AFFECTED FILES
  tests/test-shelve2.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-shelve2.t b/tests/test-shelve2.t
--- a/tests/test-shelve2.t
+++ b/tests/test-shelve2.t
@@ -130,13 +130,36 @@ 
   e
   $ cat e.orig
   z
+  $ rm e.orig
 
+restores backup of unknown file to right directory
+
+  $ hg shelve
+  shelved as default
+  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+  $ echo z > e
+  $ mkdir dir
+BROKEN: should work the same as when not using --cwd
+  $ hg unshelve --cwd dir
+  unshelving change 'default'
+  abort: $ENOENT$
+  [255]
+  $ rmdir dir
+  $ cat e
+  z
+  $ test -f e.orig && cat e.orig
+  [1]
+restore broken state
+  $ touch d
+  $ echo e > e
+  $ hg add d e
+  $ hg shelve --delete default
 
 unshelve and conflicts with tracked and untracked files
 
  preparing:
 
-  $ rm *.orig
+  $ rm -f *.orig
   $ hg ci -qm 'commit stuff'
   $ hg phase -p null: