changeset 41569:ef2295651351

merge: don't unnecessarily calculate backup path Differential Revision: https://phab.mercurial-scm.org/D5848
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 04 Feb 2019 21:21:55 -0800
parents 641c8b66a825
children 1f2714052d7e
files mercurial/merge.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Sun Feb 03 22:49:28 2019 -0800
+++ b/mercurial/merge.py	Mon Feb 04 21:21:55 2019 -0800
@@ -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")