Patchwork D5857: merge: migrate to scmutil.backuppath()

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

Comments

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




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

Patch

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,