Patchwork [02,of,10,RESEND] mdiff: turn the comment above _unidiff into a docstring

login
register
mail settings
Submitter Denis Laxalde
Date March 9, 2017, 8:07 a.m.
Message ID <9815c7fcc947f0d125b0.1489046879@sh77.tls.logilab.fr>
Download mbox | patch
Permalink /patch/19053/
State Accepted
Headers show

Comments

Denis Laxalde - March 9, 2017, 8:07 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 9815c7fcc947f0d125b044d6d65780f58a555705
# Parent  11b33e205503eb0d7911130d4579e04e7429e8f6
# Available At http://hg.logilab.org/users/dlaxalde/hg
#              hg pull http://hg.logilab.org/users/dlaxalde/hg -r 9815c7fcc947
# EXP-Topic diffhunks
mdiff: turn the comment above _unidiff into a docstring

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):