Patchwork [5,of,5] record: change recording function to work with crecord

login
register
mail settings
Submitter Laurent Charignon
Date March 12, 2015, 10 p.m.
Message ID <1e3b23faba969afc6c2c.1426197645@dev919.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8030/
State Accepted
Headers show

Comments

Laurent Charignon - March 12, 2015, 10 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1426195232 25200
#      Thu Mar 12 14:20:32 2015 -0700
# Node ID 1e3b23faba969afc6c2c356d5c300974f338d6e1
# Parent  80306e0957be92b28d1d7ce02450b9e5e200dabd
record: change recording function to work with crecord
Pierre-Yves David - March 12, 2015, 10:41 p.m.
On 03/12/2015 03:00 PM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon@fb.com>
> # Date 1426195232 25200
> #      Thu Mar 12 14:20:32 2015 -0700
> # Node ID 1e3b23faba969afc6c2c356d5c300974f338d6e1
> # Parent  80306e0957be92b28d1d7ce02450b9e5e200dabd
> record: change recording function to work with crecord

I've closed my eyes on these extra instance call and pushed the whole 
series.
Matt Mackall - March 12, 2015, 10:59 p.m.
On Thu, 2015-03-12 at 15:41 -0700, Pierre-Yves David wrote:
> 
> On 03/12/2015 03:00 PM, Laurent Charignon wrote:
> > # HG changeset patch
> > # User Laurent Charignon <lcharignon@fb.com>
> > # Date 1426195232 25200
> > #      Thu Mar 12 14:20:32 2015 -0700
> > # Node ID 1e3b23faba969afc6c2c356d5c300974f338d6e1
> > # Parent  80306e0957be92b28d1d7ce02450b9e5e200dabd
> > record: change recording function to work with crecord
> 
> I've closed my eyes on these extra instance call and pushed the whole 
> series.

We lost the upstream copyright notice, abort abort abort.
Pierre-Yves David - March 12, 2015, 11:26 p.m.
On 03/12/2015 03:59 PM, Matt Mackall wrote:
> On Thu, 2015-03-12 at 15:41 -0700, Pierre-Yves David wrote:
>>
>> On 03/12/2015 03:00 PM, Laurent Charignon wrote:
>>> # HG changeset patch
>>> # User Laurent Charignon <lcharignon@fb.com>
>>> # Date 1426195232 25200
>>> #      Thu Mar 12 14:20:32 2015 -0700
>>> # Node ID 1e3b23faba969afc6c2c356d5c300974f338d6e1
>>> # Parent  80306e0957be92b28d1d7ce02450b9e5e200dabd
>>> record: change recording function to work with crecord
>>
>> I've closed my eyes on these extra instance call and pushed the whole
>> series.
>
> We lost the upstream copyright notice, abort abort abort.

nice catch. laurent, can you provide an updated patch 4?
Pierre-Yves David - March 12, 2015, 11:33 p.m.
On 03/12/2015 04:26 PM, Pierre-Yves David wrote:
>
>
> On 03/12/2015 03:59 PM, Matt Mackall wrote:
>> On Thu, 2015-03-12 at 15:41 -0700, Pierre-Yves David wrote:
>>>
>>> On 03/12/2015 03:00 PM, Laurent Charignon wrote:
>>>> # HG changeset patch
>>>> # User Laurent Charignon <lcharignon@fb.com>
>>>> # Date 1426195232 25200
>>>> #      Thu Mar 12 14:20:32 2015 -0700
>>>> # Node ID 1e3b23faba969afc6c2c356d5c300974f338d6e1
>>>> # Parent  80306e0957be92b28d1d7ce02450b9e5e200dabd
>>>> record: change recording function to work with crecord
>>>
>>> I've closed my eyes on these extra instance call and pushed the whole
>>> series.
>>
>> We lost the upstream copyright notice, abort abort abort.
>
> nice catch. laurent, can you provide an updated patch 4?
>

patch 4 updated with:

# stuff related specifically to patch manipulation / parsing
#
# Copyright 2008 Mark Edgington <edgimar@gmail.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
#
# This code is based on the Mark Edgington's crecord extension.
# (Itself based on Bryan O'Sullivan's record extension.)

Clowncopter is updated.
Laurent Charignon - March 12, 2015, 11:41 p.m.
Sorry for missing that.

Laurent

On 3/12/15, 4:33 PM, "Pierre-Yves David" <pierre-yves.david@ens-lyon.org>
wrote:

>
>
>On 03/12/2015 04:26 PM, Pierre-Yves David wrote:
>>
>>
>> On 03/12/2015 03:59 PM, Matt Mackall wrote:
>>> On Thu, 2015-03-12 at 15:41 -0700, Pierre-Yves David wrote:
>>>>
>>>> On 03/12/2015 03:00 PM, Laurent Charignon wrote:
>>>>> # HG changeset patch
>>>>> # User Laurent Charignon <lcharignon@fb.com>
>>>>> # Date 1426195232 25200
>>>>> #      Thu Mar 12 14:20:32 2015 -0700
>>>>> # Node ID 1e3b23faba969afc6c2c356d5c300974f338d6e1
>>>>> # Parent  80306e0957be92b28d1d7ce02450b9e5e200dabd
>>>>> record: change recording function to work with crecord
>>>>
>>>> I've closed my eyes on these extra instance call and pushed the whole
>>>> series.
>>>
>>> We lost the upstream copyright notice, abort abort abort.
>>
>> nice catch. laurent, can you provide an updated patch 4?
>>
>
>patch 4 updated with:
>
># stuff related specifically to patch manipulation / parsing
>#
># Copyright 2008 Mark Edgington <edgimar@gmail.com>
>#
># This software may be used and distributed according to the terms of the
># GNU General Public License version 2 or any later version.
>#
># This code is based on the Mark Edgington's crecord extension.
># (Itself based on Bryan O'Sullivan's record extension.)
>
>Clowncopter is updated.
>
>-- 
>Pierre-Yves David

Patch

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -14,6 +14,7 @@ 
 import changelog
 import bookmarks
 import encoding
+import crecord as crecordmod
 import lock as lockmod
 
 def parsealiases(cmd):
@@ -86,9 +87,10 @@ 
 
         newandmodifiedfiles = set()
         for h in chunks:
+            iscrecordhunk = isinstance(h, crecordmod.uihunk)
             ishunk = isinstance(h, patch.recordhunk)
             isnew = h.filename() in status.added
-            if ishunk and isnew and not h in originalchunks:
+            if (ishunk or iscrecordhunk) and isnew and not h in originalchunks:
                 newandmodifiedfiles.add(h.filename())
 
         modified = set(status.modified)