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

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

Comments

Siddharth Agarwal - Oct. 9, 2015, 4:40 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1444338979 25200
#      Thu Oct 08 14:16:19 2015 -0700
# Node ID c2dea6b85fd99d7a864b13b7059725d048cc6033
# Parent  a024e2db4553492e173032f52464e2c4efe0d4fa
filemerge._merge: 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
@@ -247,15 +247,12 @@  def _merge(repo, mynode, orig, fcd, fco,
     files. It will fail if there are any conflicts and leave markers in
     the partially merged file. Markers will have two sections, one for each side
     of merge, unless mode equals 'union' which suppresses the markers."""
-    r = 1
-    if r:
-        a, b, c, back = files
+    a, b, c, back = files
 
-        ui = repo.ui
+    ui = repo.ui
 
-        r = simplemerge.simplemerge(ui, a, b, c, label=labels, mode=mode)
-        return True, r
-    return False, 0
+    r = simplemerge.simplemerge(ui, a, b, c, label=labels, mode=mode)
+    return True, r
 
 @internaltool('union', fullmerge,
               _("merging %s incomplete! "