Patchwork [1,of,9] mdiff: turn the comment above _unidiff into a docstring

login
register
mail settings
Submitter Denis Laxalde
Date March 6, 2017, 9:38 a.m.
Message ID <adbaa893b3e5e619402b.1488793099@sh77.tls.logilab.fr>
Download mbox | patch
Permalink /patch/18925/
State Accepted
Headers show

Comments

Denis Laxalde - March 6, 2017, 9:38 a.m.
# HG changeset patch
# User Denis Laxalde <denis.laxalde@logilab.fr>
# Date 1483950879 -3600
#      Mon Jan 09 09:34:39 2017 +0100
# Node ID adbaa893b3e5e619402ba761b507c385fb8f8d8a
# Parent  7855bfe02dc7090f17a5acab97fecb5bc4bfec82
# Available At http://hg.logilab.org/users/dlaxalde/hg
#              hg pull http://hg.logilab.org/users/dlaxalde/hg -r adbaa893b3e5
# EXP-Topic diffhunks
mdiff: turn the comment above _unidiff into a docstring
Yuya Nishihara - March 9, 2017, 6:55 a.m.
On Mon, 06 Mar 2017 10:38:19 +0100, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis.laxalde@logilab.fr>
> # Date 1483950879 -3600
> #      Mon Jan 09 09:34:39 2017 +0100
> # Node ID adbaa893b3e5e619402ba761b507c385fb8f8d8a
> # Parent  7855bfe02dc7090f17a5acab97fecb5bc4bfec82
> # Available At http://hg.logilab.org/users/dlaxalde/hg
> #              hg pull http://hg.logilab.org/users/dlaxalde/hg -r adbaa893b3e5
> # EXP-Topic diffhunks
> mdiff: turn the comment above _unidiff into a docstring
> 
> diff --git a/mercurial/mdiff.py b/mercurial/mdiff.py
> --- a/mercurial/mdiff.py
> +++ b/mercurial/mdiff.py
> @@ -253,9 +253,8 @@ def unidiff(a, ad, b, bd, fn1, fn2, opts
>  
>      return "".join(l)
>  
> -# creates a headerless unified diff
> -# t1 and t2 are the text to be diffed
>  def _unidiff(t1, t2, opts=defaultopts):
> +    """Yield hunks of a headerless unified diff from t1 and t2 texts."""

This can't be applied. Maybe the previous patch would be lost.

Can you resend the whole series? I scanned this series and looked generally
good to me.
Denis Laxalde - March 9, 2017, 8:07 a.m.
Yuya Nishihara a écrit :
> On Mon, 06 Mar 2017 10:38:19 +0100, Denis Laxalde wrote:
>> # HG changeset patch
>> # User Denis Laxalde <denis.laxalde@logilab.fr>
>> # Date 1483950879 -3600
>> #      Mon Jan 09 09:34:39 2017 +0100
>> # Node ID adbaa893b3e5e619402ba761b507c385fb8f8d8a
>> # Parent  7855bfe02dc7090f17a5acab97fecb5bc4bfec82
>> # Available At http://hg.logilab.org/users/dlaxalde/hg
>> #              hg pull http://hg.logilab.org/users/dlaxalde/hg -r adbaa893b3e5
>> # EXP-Topic diffhunks
>> mdiff: turn the comment above _unidiff into a docstring
>>
>> diff --git a/mercurial/mdiff.py b/mercurial/mdiff.py
>> --- a/mercurial/mdiff.py
>> +++ b/mercurial/mdiff.py
>> @@ -253,9 +253,8 @@ def unidiff(a, ad, b, bd, fn1, fn2, opts
>>
>>      return "".join(l)
>>
>> -# creates a headerless unified diff
>> -# t1 and t2 are the text to be diffed
>>  def _unidiff(t1, t2, opts=defaultopts):
>> +    """Yield hunks of a headerless unified diff from t1 and t2 texts."""
>
> This can't be applied. Maybe the previous patch would be lost.
>
> Can you resend the whole series? I scanned this series and looked generally
> good to me.
>

Hm, yes I forgot the first patch. Sending again right now.

Patch

diff --git a/mercurial/mdiff.py b/mercurial/mdiff.py
--- a/mercurial/mdiff.py
+++ b/mercurial/mdiff.py
@@ -253,9 +253,8 @@  def unidiff(a, ad, b, bd, fn1, fn2, opts
 
     return "".join(l)
 
-# creates a headerless unified diff
-# t1 and t2 are the text to be diffed
 def _unidiff(t1, t2, opts=defaultopts):
+    """Yield hunks of a headerless unified diff from t1 and t2 texts."""
     l1 = splitnewlines(t1)
     l2 = splitnewlines(t2)
     def contextend(l, len):