Patchwork [4,of,6,mergedriver] filemerge: move 'merging' output to before file creation

login
register
mail settings
Submitter Siddharth Agarwal
Date Oct. 8, 2015, 7:33 a.m.
Message ID <5436157f86676d0d7cc7.1444289595@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/10871/
State Accepted
Headers show

Comments

Siddharth Agarwal - Oct. 8, 2015, 7:33 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1444283932 25200
#      Wed Oct 07 22:58:52 2015 -0700
# Node ID 5436157f86676d0d7cc7e6d49ad462a0c63938ce
# Parent  98e1010a27cc61abe565362d6cca30f1fdc49053
filemerge: move 'merging' output to before file creation

This has no visible impact but makes some future work simpler.

Patch

diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -493,6 +493,13 @@  def filemerge(repo, mynode, orig, fcd, f
         if mergetype == nomerge:
             return func(repo, mynode, orig, fcd, fco, fca, toolconf)
 
+        if orig != fco.path():
+            ui.status(_("merging %s and %s to %s\n") % (orig, fco.path(), fd))
+        else:
+            ui.status(_("merging %s\n") % fd)
+
+        ui.debug("my %s other %s ancestor %s\n" % (fcd, fco, fca))
+
         a = repo.wjoin(fd)
         b = temp("base", fca)
         c = temp("other", fco)
@@ -500,13 +507,6 @@  def filemerge(repo, mynode, orig, fcd, f
         util.copyfile(a, back)
         files = (a, b, c, back)
 
-        if orig != fco.path():
-            ui.status(_("merging %s and %s to %s\n") % (orig, fco.path(), fd))
-        else:
-            ui.status(_("merging %s\n") % fd)
-
-        ui.debug("my %s other %s ancestor %s\n" % (fcd, fco, fca))
-
         r = 0
         if precheck and not precheck(repo, mynode, orig, fcd, fco, fca,
                                      toolconf):