Patchwork [2,of,2] manifestmerge: use already existing fl2 synonym for m2.flags(f)

login
register
mail settings
Submitter Martin von Zweigbergk
Date Nov. 15, 2014, 12:21 a.m.
Message ID <cdd343f8bfe68bb979e8.1416010884@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/6739/
State Accepted
Commit 296b09dcef636bc8ed4c4b967f47f540e3c2f3a3
Headers show

Comments

Martin von Zweigbergk - Nov. 15, 2014, 12:21 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1415986408 28800
#      Fri Nov 14 09:33:28 2014 -0800
# Node ID cdd343f8bfe68bb979e83f007e651b5005efc01c
# Parent  c2491406f4623e148bee137b1862ff0b609e4235
manifestmerge: use already existing fl2 synonym for m2.flags(f)

Probably not a noticeable performance gain, but shortens the code
slightly.
Matt Mackall - Nov. 17, 2014, 10:34 p.m.
On Fri, 2014-11-14 at 16:21 -0800, Martin von Zweigbergk wrote:
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz@google.com>
> # Date 1415986408 28800
> #      Fri Nov 14 09:33:28 2014 -0800
> # Node ID cdd343f8bfe68bb979e83f007e651b5005efc01c
> # Parent  c2491406f4623e148bee137b1862ff0b609e4235
> manifestmerge: use already existing fl2 synonym for m2.flags(f)

Queued for default, thanks.

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -514,11 +514,9 @@ 
             else:
                 # if different: old untracked f may be overwritten and lost
                 if acceptremote:
-                    actions['g'].append((f, (m2.flags(f),),
-                                   "remote recreating"))
+                    actions['g'].append((f, (fl2,), "remote recreating"))
                 else:
-                    actions['dc'].append((f, (m2.flags(f),),
-                                   "prompt deleted/changed"))
+                    actions['dc'].append((f, (fl2,), "prompt deleted/changed"))
 
     for f, m in sorted(aborts):
         if m == "ud":