D5855: mq: migrate to scmutil.backuppath()

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Tue Feb 5 12:53:27 EST 2019


martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -738,10 +738,10 @@
         for f in sorted(files):
             absf = repo.wjoin(f)
             if os.path.lexists(absf):
+                orig = scmutil.backuppath(self.ui, repo, f)
                 self.ui.note(_('saving current version of %s as %s\n') %
-                             (f, scmutil.origpath(self.ui, repo, f)))
-
-                absorig = scmutil.origpath(self.ui, repo, absf)
+                             (f, orig))
+                absorig = repo.wjoin(orig)
                 if copy:
                     util.copyfile(absf, absorig)
                 else:



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


More information about the Mercurial-devel mailing list