Patchwork [4,of,4,V2,mergedriver] merge.applyupdates: switch to mergestate.clean()

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 18, 2015, 1:13 a.m.
Message ID <c8d0ab3fe9ae5c187513.1447809206@dev666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11453/
State Accepted
Headers show

Comments

Siddharth Agarwal - Nov. 18, 2015, 1:13 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1447808693 28800
#      Tue Nov 17 17:04:53 2015 -0800
# Node ID c8d0ab3fe9ae5c18751349c296d9d454bdd051dd
# Parent  0177a83b0a029bc9ea5d062611448b885a409dcb
merge.applyupdates: switch to mergestate.clean()

See the previous patches for why we're doing this.
Martin von Zweigbergk - Nov. 18, 2015, 5:16 a.m.
On Tue, Nov 17, 2015 at 5:15 PM Siddharth Agarwal <sid0@fb.com> wrote:

> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1447808693 28800
> #      Tue Nov 17 17:04:53 2015 -0800
> # Node ID c8d0ab3fe9ae5c18751349c296d9d454bdd051dd
> # Parent  0177a83b0a029bc9ea5d062611448b885a409dcb
> merge.applyupdates: switch to mergestate.clean()
>

Pushed to the clowncopter, thanks!


>
> 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.clean(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.clean(repo, wctx.p1().node(), mctx.node())
     moves = []
     for m, l in actions.items():
         l.sort()