D6174: shelve: let cmdutil.revert() take care of backing up untracked files
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Mar 29 21:49:49 EDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe08559769bc6: shelve: let cmdutil.revert() take care of backing up untracked files (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D6174?vs=14605&id=14608
REVISION DETAIL
https://phab.mercurial-scm.org/D6174
AFFECTED FILES
hgext/shelve.py
CHANGE DETAILS
diff --git a/hgext/shelve.py b/hgext/shelve.py
--- a/hgext/shelve.py
+++ b/hgext/shelve.py
@@ -674,18 +674,8 @@
dirstate."""
with ui.configoverride({('ui', 'quiet'): True}):
hg.update(repo, wctx.node())
- files = []
- files.extend(shelvectx.files())
- files.extend(shelvectx.p1().files())
-
- # revert will overwrite unknown files, so move them out of the way
- for file in repo.status(unknown=True).unknown:
- if file in files:
- util.rename(repo.wjoin(file),
- scmutil.backuppath(ui, repo, file))
ui.pushbuffer(True)
- cmdutil.revert(ui, repo, shelvectx, repo.dirstate.parents(),
- **{r'no_backup': True})
+ cmdutil.revert(ui, repo, shelvectx, repo.dirstate.parents())
ui.popbuffer()
def restorebranch(ui, repo, branchtorestore):
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list