Patchwork [1,of,6,mergedriver] merge.applyupdates: add all actions returned from merge state

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 24, 2015, 10:02 p.m.
Message ID <4adc3f379dc67ac23d53.1448402556@dev666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11610/
State Accepted
Delegated to: Martin von Zweigbergk
Headers show

Comments

Siddharth Agarwal - Nov. 24, 2015, 10:02 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1448334375 28800
#      Mon Nov 23 19:06:15 2015 -0800
# Node ID 4adc3f379dc67ac23d5377206b3179ebe5099765
# Parent  397baacd694d0f8343888b64c200bfa926cdd893
# Available At http://42.netv6.net/sid0-wip/hg/
#              hg pull http://42.netv6.net/sid0-wip/hg/ -r 4adc3f379dc6
merge.applyupdates: add all actions returned from merge state

At the moment this is a no-op (the only actions defined are 'r', 'a' and 'g'),
but soon we're going to add other sorts of actions to the dictionary returned
from mergestate.actions().

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1151,8 +1151,8 @@  def applyupdates(repo, actions, wctx, mc
     removed += msremoved
 
     extraactions = ms.actions()
-    for a in 'rag':
-        actions[a].extend(extraactions[a])
+    for k, acts in extraactions.iteritems():
+        actions[k].extend(acts)
 
     progress(_updating, None, total=numupdates, unit=_files)