D5853: revert: migrate to scmutil.backuppath()
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Feb 6 21:03:55 EST 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9e545c9a4dfe: revert: migrate to scmutil.backuppath() (authored by martinvonz, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D5853?vs=13858&id=13875
REVISION DETAIL
https://phab.mercurial-scm.org/D5853
AFFECTED FILES
mercurial/cmdutil.py
CHANGE DETAILS
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -3017,7 +3017,7 @@
if dobackup == backupinteractive:
tobackup.add(abs)
elif (backup <= dobackup or wctx[abs].cmp(ctx[abs])):
- bakname = scmutil.origpath(ui, repo, rel)
+ bakname = scmutil.backuppath(ui, repo, abs)
relbakname = os.path.relpath(bakname)
ui.note(_('saving current version of %s as %s\n') %
(rel, relbakname))
@@ -3170,7 +3170,7 @@
# Create a backup file only if this hunk should be backed up
if c.header.filename() in tobackup:
target = repo.wjoin(abs)
- bakname = scmutil.origpath(repo.ui, repo, m.rel(abs))
+ bakname = scmutil.backuppath(repo.ui, repo, abs)
util.copyfile(target, bakname)
tobackup.remove(abs)
c.write(fp)
To: martinvonz, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list