##// END OF EJS Templates
shelve: fix broken backup of conflicting untracked file...
Martin von Zweigbergk -
r41736:630af04d default
parent child Browse files
Show More
@@ -679,7 +679,8 b' def mergefiles(ui, repo, wctx, shelvectx'
679 # revert will overwrite unknown files, so move them out of the way
679 # revert will overwrite unknown files, so move them out of the way
680 for file in repo.status(unknown=True).unknown:
680 for file in repo.status(unknown=True).unknown:
681 if file in files:
681 if file in files:
682 util.rename(file, scmutil.origpath(ui, repo, file))
682 util.rename(repo.wjoin(file),
683 scmutil.backuppath(ui, repo, file))
683 ui.pushbuffer(True)
684 ui.pushbuffer(True)
684 cmdutil.revert(ui, repo, shelvectx, repo.dirstate.parents(),
685 cmdutil.revert(ui, repo, shelvectx, repo.dirstate.parents(),
685 *pathtofiles(repo, files),
686 *pathtofiles(repo, files),
@@ -139,21 +139,13 b' restores backup of unknown file to right'
139 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
139 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
140 $ echo z > e
140 $ echo z > e
141 $ mkdir dir
141 $ mkdir dir
142 BROKEN: should work the same as when not using --cwd
143 $ hg unshelve --cwd dir
142 $ hg unshelve --cwd dir
144 unshelving change 'default'
143 unshelving change 'default'
145 abort: $ENOENT$
146 [255]
147 $ rmdir dir
144 $ rmdir dir
148 $ cat e
145 $ cat e
146 e
147 $ cat e.orig
149 z
148 z
150 $ test -f e.orig && cat e.orig
151 [1]
152 restore broken state
153 $ touch d
154 $ echo e > e
155 $ hg add d e
156 $ hg shelve --delete default
157
149
158 unshelve and conflicts with tracked and untracked files
150 unshelve and conflicts with tracked and untracked files
159
151
General Comments 0
You need to be logged in to leave comments. Login now