##// END OF EJS Templates
shelve: let cmdutil.revert() take care of backing up untracked files...
Martin von Zweigbergk -
r42205:e0855976 default
parent child Browse files
Show More
@@ -674,18 +674,8 b' def mergefiles(ui, repo, wctx, shelvectx'
674 dirstate."""
674 dirstate."""
675 with ui.configoverride({('ui', 'quiet'): True}):
675 with ui.configoverride({('ui', 'quiet'): True}):
676 hg.update(repo, wctx.node())
676 hg.update(repo, wctx.node())
677 files = []
678 files.extend(shelvectx.files())
679 files.extend(shelvectx.p1().files())
680
681 # revert will overwrite unknown files, so move them out of the way
682 for file in repo.status(unknown=True).unknown:
683 if file in files:
684 util.rename(repo.wjoin(file),
685 scmutil.backuppath(ui, repo, file))
686 ui.pushbuffer(True)
677 ui.pushbuffer(True)
687 cmdutil.revert(ui, repo, shelvectx, repo.dirstate.parents(),
678 cmdutil.revert(ui, repo, shelvectx, repo.dirstate.parents())
688 **{r'no_backup': True})
689 ui.popbuffer()
679 ui.popbuffer()
690
680
691 def restorebranch(ui, repo, branchtorestore):
681 def restorebranch(ui, repo, branchtorestore):
General Comments 0
You need to be logged in to leave comments. Login now