[PATCH 07 of 10] diffhelpers: remove unused return value from fixnewline() and addlines()

Yuya Nishihara yuya at tcha.org
Wed Apr 11 11:33:57 EDT 2018


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1523274905 -32400
#      Mon Apr 09 20:55:05 2018 +0900
# Node ID 62ebfa7e5a3388c1761830d788b53dd46d0a9ad4
# Parent  5985aee99980721a04dda5980dc4c33eb560ff72
diffhelpers: remove unused return value from fixnewline() and addlines()

diff --git a/mercurial/diffhelpers.py b/mercurial/diffhelpers.py
--- a/mercurial/diffhelpers.py
+++ b/mercurial/diffhelpers.py
@@ -37,7 +37,6 @@ def addlines(fp, hunk, lena, lenb, a, b)
             else:
                 b.append(s[1:])
                 a.append(s)
-    return 0
 
 def fixnewline(hunk, a, b):
     """Fix up the last lines of a and b when the patch has no newline at EOF"""
@@ -53,7 +52,6 @@ def fixnewline(hunk, a, b):
     if hline.startswith((' ', '-')):
         a[-1] = hline
     hunk[-1] = hline
-    return 0
 
 def testhunk(a, b, bstart):
     """Compare the lines in a with the lines in b


More information about the Mercurial-devel mailing list