Patchwork D5848: merge: don't unnecessarily calculate backup path

login
register
mail settings
Submitter phabricator
Date Feb. 5, 2019, 6:13 p.m.
Message ID <bfa76174f246e0575e55485cdff48d41@localhost.localdomain>
Download mbox | patch
Permalink /patch/38449/
State Not Applicable
Headers show

Comments

phabricator - Feb. 5, 2019, 6:13 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGef2295651351: merge: don&#039;t unnecessarily calculate backup path (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5848?vs=13809&id=13826

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

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1505,8 +1505,8 @@ 
                         if repo.wvfs.isfileorlink(p):
                             absf = repo.wjoin(p)
                             break
-                orig = scmutil.origpath(ui, repo, absf)
                 if repo.wvfs.lexists(absf):
+                    orig = scmutil.origpath(ui, repo, absf)
                     util.rename(absf, orig)
             wctx[f].clearunknown()
             atomictemp = ui.configbool("experimental", "update.atomic-file")