Patchwork [1,of,7,V2,mergedriver] filemerge: add a wrapper around the filemerge function

login
register
mail settings
Submitter Siddharth Agarwal
Date Oct. 12, 2015, 7:45 a.m.
Message ID <395dc7b3880c9e2b3c48.1444635936@dev6666.prn1.facebook.com>
Download mbox | patch
Permalink /patch/10951/
State Accepted
Headers show

Comments

Siddharth Agarwal - Oct. 12, 2015, 7:45 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1444591868 25200
#      Sun Oct 11 12:31:08 2015 -0700
# Node ID 395dc7b3880c9e2b3c485a418237cb8ca9191687
# Parent  f32ecec8697102c6daeda1f3a98711a8305f928d
filemerge: add a wrapper around the filemerge function

We'll introduce a separate premerge function that calls the same code.
Augie Fackler - Oct. 12, 2015, 2:51 p.m.
On Mon, Oct 12, 2015 at 12:45:36AM -0700, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1444591868 25200
> #      Sun Oct 11 12:31:08 2015 -0700
> # Node ID 395dc7b3880c9e2b3c485a418237cb8ca9191687
> # Parent  f32ecec8697102c6daeda1f3a98711a8305f928d
> filemerge: add a wrapper around the filemerge function

I'm getting patch application failures on patch 2 - can I have a pull
URL or a resend?

>
> We'll introduce a separate premerge function that calls the same code.
>
> diff --git a/hgext/largefiles/uisetup.py b/hgext/largefiles/uisetup.py
> --- a/hgext/largefiles/uisetup.py
> +++ b/hgext/largefiles/uisetup.py
> @@ -102,7 +102,7 @@ def uisetup(ui):
>                                      overrides.mergerecordupdates)
>      entry = extensions.wrapfunction(merge, 'update',
>                                      overrides.mergeupdate)
> -    entry = extensions.wrapfunction(filemerge, 'filemerge',
> +    entry = extensions.wrapfunction(filemerge, '_filemerge',
>                                      overrides.overridefilemerge)
>      entry = extensions.wrapfunction(cmdutil, 'copy',
>                                      overrides.overridecopy)
> diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
> --- a/mercurial/filemerge.py
> +++ b/mercurial/filemerge.py
> @@ -435,7 +435,7 @@ def _formatlabels(repo, fcd, fco, fca, l
>          newlabels.append(_formatconflictmarker(repo, ca, tmpl, labels[2], pad))
>      return newlabels
>
> -def filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
> +def _filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
>      """perform a 3-way merge in the working directory
>
>      mynode = parent node before merge
> @@ -567,5 +567,8 @@ def _check(r, ui, tool, fcd, files):
>
>      return r
>
> +def filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
> +    return _filemerge(repo, mynode, orig, fcd, fco, fca, labels=labels)
> +
>  # tell hggettext to extract docstrings from these functions:
>  i18nfunctions = internals.values()
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
Siddharth Agarwal - Oct. 12, 2015, 8:10 p.m.
On 10/12/15 07:51, Augie Fackler wrote:
> On Mon, Oct 12, 2015 at 12:45:36AM -0700, Siddharth Agarwal wrote:
>> # HG changeset patch
>> # User Siddharth Agarwal <sid0@fb.com>
>> # Date 1444591868 25200
>> #      Sun Oct 11 12:31:08 2015 -0700
>> # Node ID 395dc7b3880c9e2b3c485a418237cb8ca9191687
>> # Parent  f32ecec8697102c6daeda1f3a98711a8305f928d
>> filemerge: add a wrapper around the filemerge function
> I'm getting patch application failures on patch 2 - can I have a pull
> URL or a resend?

We coordinated on IRC and Augie pushed these to the clowncopter.

>
>> We'll introduce a separate premerge function that calls the same code.
>>
>> diff --git a/hgext/largefiles/uisetup.py b/hgext/largefiles/uisetup.py
>> --- a/hgext/largefiles/uisetup.py
>> +++ b/hgext/largefiles/uisetup.py
>> @@ -102,7 +102,7 @@ def uisetup(ui):
>>                                       overrides.mergerecordupdates)
>>       entry = extensions.wrapfunction(merge, 'update',
>>                                       overrides.mergeupdate)
>> -    entry = extensions.wrapfunction(filemerge, 'filemerge',
>> +    entry = extensions.wrapfunction(filemerge, '_filemerge',
>>                                       overrides.overridefilemerge)
>>       entry = extensions.wrapfunction(cmdutil, 'copy',
>>                                       overrides.overridecopy)
>> diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
>> --- a/mercurial/filemerge.py
>> +++ b/mercurial/filemerge.py
>> @@ -435,7 +435,7 @@ def _formatlabels(repo, fcd, fco, fca, l
>>           newlabels.append(_formatconflictmarker(repo, ca, tmpl, labels[2], pad))
>>       return newlabels
>>
>> -def filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
>> +def _filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
>>       """perform a 3-way merge in the working directory
>>
>>       mynode = parent node before merge
>> @@ -567,5 +567,8 @@ def _check(r, ui, tool, fcd, files):
>>
>>       return r
>>
>> +def filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
>> +    return _filemerge(repo, mynode, orig, fcd, fco, fca, labels=labels)
>> +
>>   # tell hggettext to extract docstrings from these functions:
>>   i18nfunctions = internals.values()
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel@selenic.com
>> https://selenic.com/mailman/listinfo/mercurial-devel
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/hgext/largefiles/uisetup.py b/hgext/largefiles/uisetup.py
--- a/hgext/largefiles/uisetup.py
+++ b/hgext/largefiles/uisetup.py
@@ -102,7 +102,7 @@  def uisetup(ui):
                                     overrides.mergerecordupdates)
     entry = extensions.wrapfunction(merge, 'update',
                                     overrides.mergeupdate)
-    entry = extensions.wrapfunction(filemerge, 'filemerge',
+    entry = extensions.wrapfunction(filemerge, '_filemerge',
                                     overrides.overridefilemerge)
     entry = extensions.wrapfunction(cmdutil, 'copy',
                                     overrides.overridecopy)
diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -435,7 +435,7 @@  def _formatlabels(repo, fcd, fco, fca, l
         newlabels.append(_formatconflictmarker(repo, ca, tmpl, labels[2], pad))
     return newlabels
 
-def filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
+def _filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
     """perform a 3-way merge in the working directory
 
     mynode = parent node before merge
@@ -567,5 +567,8 @@  def _check(r, ui, tool, fcd, files):
 
     return r
 
+def filemerge(repo, mynode, orig, fcd, fco, fca, labels=None):
+    return _filemerge(repo, mynode, orig, fcd, fco, fca, labels=labels)
+
 # tell hggettext to extract docstrings from these functions:
 i18nfunctions = internals.values()