Patchwork [2,of,4,marmoute-reviewed] filemerge._idump: drop no longer necessary 'if r:' check

login
register
mail settings
Submitter Siddharth Agarwal
Date Oct. 9, 2015, 4:40 a.m.
Message ID <332c4735884b712e39b8.1444365633@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/10907/
State Accepted
Headers show

Comments

Siddharth Agarwal - Oct. 9, 2015, 4:40 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1444339051 25200
#      Thu Oct 08 14:17:31 2015 -0700
# Node ID 332c4735884b712e39b862eb15b4ad83fb91cc3c
# Parent  c2dea6b85fd99d7a864b13b7059725d048cc6033
filemerge._idump: drop no longer necessary 'if r:' check

Cleanup from an earlier patch to make premerge be directly called from the main
filemerge function.

Patch

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -346,16 +346,14 @@  def _idump(repo, mynode, orig, fcd, fco,
     ``a.txt``, these files will accordingly be named ``a.txt.local``,
     ``a.txt.other`` and ``a.txt.base`` and they will be placed in the
     same directory as ``a.txt``."""
-    r = 1
-    if r:
-        a, b, c, back = files
+    a, b, c, back = files
 
-        fd = fcd.path()
+    fd = fcd.path()
 
-        util.copyfile(a, a + ".local")
-        repo.wwrite(fd + ".other", fco.data(), fco.flags())
-        repo.wwrite(fd + ".base", fca.data(), fca.flags())
-    return False, r
+    util.copyfile(a, a + ".local")
+    repo.wwrite(fd + ".other", fco.data(), fco.flags())
+    repo.wwrite(fd + ".base", fca.data(), fca.flags())
+    return False, 1
 
 def _xmerge(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
     r = 1