D5857: merge: migrate to scmutil.backuppath()

martinvonz (Martin von Zweigbergk) phabricator at mercurial-scm.org
Thu Feb 7 00:00:02 UTC 2019


martinvonz updated this revision to Diff 13862.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5857?vs=13821&id=13862

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

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1506,9 +1506,8 @@
                             conflicting = p
                             break
                 if repo.wvfs.lexists(conflicting):
-                    absf = repo.wjoin(conflicting)
-                    orig = scmutil.origpath(ui, repo, absf)
-                    util.rename(absf, orig)
+                    orig = scmutil.backuppath(ui, repo, conflicting)
+                    util.rename(repo.wjoin(conflicting), orig)
             wctx[f].clearunknown()
             atomictemp = ui.configbool("experimental", "update.atomic-file")
             wctx[f].write(fctx(f).data(), flags, backgroundclose=True,



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


More information about the Mercurial-devel mailing list