Patchwork [4,of,4,mergedriver] largefiles: fall back to the original for change/delete conflicts

login
register
mail settings
Submitter Siddharth Agarwal
Date Nov. 20, 2015, 9:20 a.m.
Message ID <70d54682fb9590f55dc4.1448011241@dev666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/11541/
State Accepted
Headers show

Comments

Siddharth Agarwal - Nov. 20, 2015, 9:20 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1447897213 28800
#      Wed Nov 18 17:40:13 2015 -0800
# Node ID 70d54682fb9590f55dc4253192c28682cc7aaa58
# Parent  139817087c45246470a1bea1604a10ab89f60ee9
# Available At http://42.netv6.net/sid0-wip/hg/
#              hg pull http://42.netv6.net/sid0-wip/hg/ -r 70d54682fb95
largefiles: fall back to the original for change/delete conflicts

The largefiles merge code (currently) does not handle change/delete conflicts.
So fall back to regular filemerge in that case.

Making this code handle change/delete conflicts is left as an exercise for the
future.
Martin von Zweigbergk - Nov. 20, 2015, 5:40 p.m.
Pushed to the clowncopter, thanks!

On Fri, Nov 20, 2015 at 1:22 AM Siddharth Agarwal <sid0@fb.com> wrote:

> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1447897213 28800
> #      Wed Nov 18 17:40:13 2015 -0800
> # Node ID 70d54682fb9590f55dc4253192c28682cc7aaa58
> # Parent  139817087c45246470a1bea1604a10ab89f60ee9
> # Available At http://42.netv6.net/sid0-wip/hg/
> #              hg pull http://42.netv6.net/sid0-wip/hg/ -r 70d54682fb95
> largefiles: fall back to the original for change/delete conflicts
>
> The largefiles merge code (currently) does not handle change/delete
> conflicts.
> So fall back to regular filemerge in that case.
>
> Making this code handle change/delete conflicts is left as an exercise for
> the
> future.
>
> diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
> --- a/hgext/largefiles/overrides.py
> +++ b/hgext/largefiles/overrides.py
> @@ -544,7 +544,7 @@ def mergerecordupdates(orig, repo, actio
>  # largefiles. This will handle identical edits without prompting the user.
>  def overridefilemerge(origfn, premerge, repo, mynode, orig, fcd, fco, fca,
>                        labels=None):
> -    if not lfutil.isstandin(orig):
> +    if not lfutil.isstandin(orig) or fcd.isabsent() or fco.isabsent():
>          return origfn(premerge, repo, mynode, orig, fcd, fco, fca,
>                        labels=labels)
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py
+++ b/hgext/largefiles/overrides.py
@@ -544,7 +544,7 @@  def mergerecordupdates(orig, repo, actio
 # largefiles. This will handle identical edits without prompting the user.
 def overridefilemerge(origfn, premerge, repo, mynode, orig, fcd, fco, fca,
                       labels=None):
-    if not lfutil.isstandin(orig):
+    if not lfutil.isstandin(orig) or fcd.isabsent() or fco.isabsent():
         return origfn(premerge, repo, mynode, orig, fcd, fco, fca,
                       labels=labels)