D5855: mq: 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 13860.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5855?vs=13819&id=13860

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,9 +738,9 @@
         for f in sorted(files):
             absf = repo.wjoin(f)
             if os.path.lexists(absf):
-                absorig = scmutil.origpath(self.ui, repo, absf)
+                absorig = scmutil.backuppath(self.ui, repo, f)
                 self.ui.note(_('saving current version of %s as %s\n') %
-                             (f, os.path.relpath(absorig)))
+                             (f, os.path.relpath(absorig, start=repo.root)))
 
                 if copy:
                     util.copyfile(absf, absorig)



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


More information about the Mercurial-devel mailing list