Patchwork D5859: subrepo: migrate to scmutil.backuppath()

login
register
mail settings
Submitter phabricator
Date Feb. 7, 2019, midnight
Message ID <bf6cfb2e183ce6b4f1aab349a05273e2@localhost.localdomain>
Download mbox | patch
Permalink /patch/38493/
State Not Applicable
Headers show

Comments

phabricator - Feb. 7, 2019, midnight
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




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

Patch

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)