D5859: subrepo: migrate to scmutil.backuppath()

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Wed Feb 6 19:00:03 EST 2019


martinvonz updated this revision to Diff 13864.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5859?vs=13823&id=13864

REVISION DETAIL
  https://phab.mercurial-scm.org/D5859

AFFECTED FILES
  mercurial/subrepo.py

CHANGE DETAILS

diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py
--- a/mercurial/subrepo.py
+++ b/mercurial/subrepo.py
@@ -1828,11 +1828,11 @@
             if origvfs is None:
                 origvfs = self.wvfs
             for name in names:
-                bakname = scmutil.origpath(self.ui, self._subparent, name)
+                bakname = scmutil.backuppath(self.ui, self._subparent, name)
                 self.ui.note(_('saving current version of %s as %s\n') %
                         (name, os.path.relpath(bakname)))
                 name = self.wvfs.join(name)
-                origvfs.rename(name, bakname)
+                origvfs.rename(self.wvfs.join(name), bakname)
 
         if not opts.get(r'dry_run'):
             self.get(substate, overwrite=True)



To: martinvonz, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list