Patchwork D2886: filemerge: give some variables in _xmerge more descriptive names

login
register
mail settings
Submitter phabricator
Date March 17, 2018, 7:08 p.m.
Message ID <22d9f4cc8bb8c9c9cf47e5e816fffcca@localhost.localdomain>
Download mbox | patch
Permalink /patch/29585/
State Not Applicable
Headers show

Comments

phabricator - March 17, 2018, 7:08 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGa4a95bd7158d: filemerge: give some variables in _xmerge more descriptive names (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2886?vs=7084&id=7094

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

AFFECTED FILES
  mercurial/filemerge.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -509,10 +509,10 @@ 
                        'for %s\n') % (tool, fcd.path()))
         return False, 1, None
     unused, unused, unused, back = files
-    a = _workingpath(repo, fcd)
-    b, c = _maketempfiles(repo, fco, fca)
+    localpath = _workingpath(repo, fcd)
+    basepath, otherpath = _maketempfiles(repo, fco, fca)
     try:
-        out = ""
+        outpath = ""
         mylabel, otherlabel = labels[:2]
         if len(labels) >= 3:
             baselabel = labels[2]
@@ -534,11 +534,11 @@ 
         args = _toolstr(ui, tool, "args")
         if "$output" in args:
             # read input from backup, write to original
-            out = a
-            a = repo.wvfs.join(back.path())
-        replace = {'local': a, 'base': b, 'other': c, 'output': out,
-                   'labellocal': mylabel, 'labelother': otherlabel,
-                   'labelbase': baselabel}
+            outpath = localpath
+            localpath = repo.wvfs.join(back.path())
+        replace = {'local': localpath, 'base': basepath, 'other': otherpath,
+                   'output': outpath, 'labellocal': mylabel,
+                   'labelother': otherlabel, 'labelbase': baselabel}
         args = util.interpolate(br'\$', replace, args,
                                 lambda s: util.shellquote(util.localpath(s)))
         cmd = toolpath + ' ' + args
@@ -550,8 +550,8 @@ 
         repo.ui.debug('merge tool returned: %d\n' % r)
         return True, r, False
     finally:
-        util.unlink(b)
-        util.unlink(c)
+        util.unlink(basepath)
+        util.unlink(otherpath)
 
 def _formatconflictmarker(ctx, template, label, pad):
     """Applies the given template to the ctx, prefixed by the label.