Patchwork [6,of,6,mergedriver] merge.applyupdates: switch to mergestate.fresh()

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 17, 2015, 11:58 p.m.
Message ID <6a2afbc7796218128806.1447804724@dev666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11449/
State Changes Requested
Headers show

Comments

Siddharth Agarwal - Nov. 17, 2015, 11:58 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1447797211 28800
#      Tue Nov 17 13:53:31 2015 -0800
# Node ID 6a2afbc7796218128806c054637a242c4a6d6ee3
# Parent  ab01cba6a601e2577932731559f83cbb11d400b0
merge.applyupdates: switch to mergestate.fresh()

See the previous patches for why we're doing this.
Siddharth Agarwal - Nov. 18, 2015, 12:03 a.m.
On 11/17/15 15:58, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1447797211 28800
> #      Tue Nov 17 13:53:31 2015 -0800
> # Node ID 6a2afbc7796218128806c054637a242c4a6d6ee3
> # Parent  ab01cba6a601e2577932731559f83cbb11d400b0
> merge.applyupdates: switch to mergestate.fresh()

The full series is available via:

http://42.netv6.net/sid0-wip/hg/shortlog/mergestate

- Siddharth

>
> See the previous patches for why we're doing this.
>
> diff --git a/mercurial/merge.py b/mercurial/merge.py
> --- a/mercurial/merge.py
> +++ b/mercurial/merge.py
> @@ -853,8 +853,7 @@ def applyupdates(repo, actions, wctx, mc
>       """
>   
>       updated, merged, removed, unresolved = 0, 0, 0, 0
> -    ms = mergestate(repo)
> -    ms.reset(wctx.p1().node(), mctx.node())
> +    ms = mergestate.fresh(repo, wctx.p1().node(), mctx.node())
>       moves = []
>       for m, l in actions.items():
>           l.sort()
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -853,8 +853,7 @@  def applyupdates(repo, actions, wctx, mc
     """
 
     updated, merged, removed, unresolved = 0, 0, 0, 0
-    ms = mergestate(repo)
-    ms.reset(wctx.p1().node(), mctx.node())
+    ms = mergestate.fresh(repo, wctx.p1().node(), mctx.node())
     moves = []
     for m, l in actions.items():
         l.sort()