unshelve: add tests for unknown files
Adds a basic test for shelving/unshelving with an unknown file present.
Adds a test for unshelving on top of an existing unknown file.
--- a/tests/test-shelve.t Tue Nov 26 16:23:05 2013 -0800
+++ b/tests/test-shelve.t Tue Nov 26 16:30:52 2013 -0800
@@ -539,4 +539,42 @@
adding file changes
added 1 changesets with 1 changes to 2 files (+1 heads)
+unshelve should leave unknown files alone (issue4113)
+
+ $ echo e > e
+ $ hg shelve
+ shelved as default
+ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ $ hg status
+ ? e
+ $ hg unshelve
+ unshelving change 'default'
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 1 changes to 2 files (+1 heads)
+ $ hg status
+ A d
+ ? e
+ $ cat e
+ e
+
+unshelve should keep a copy of unknown files
+
+ $ hg add e
+ $ hg shelve
+ shelved as default
+ 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+ $ echo z > e
+ $ hg unshelve
+ unshelving change 'default'
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 2 changes to 3 files (+1 heads)
+ $ cat e
+ e
+ $ cat e.orig
+ z
+
$ cd ..