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

login
register
mail settings
Submitter Yuya Nishihara
Date April 11, 2018, 3:33 p.m.
Message ID <62ebfa7e5a3388c17618.1523460837@mimosa>
Download mbox | patch
Permalink /patch/30701/
State Accepted
Headers show

Comments

Yuya Nishihara - April 11, 2018, 3:33 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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()

Patch

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