[PATCH 2 of 5] patch: remove unused ui arg to iterhunks

Idan Kamara idankk86 at gmail.com
Fri May 6 11:58:05 CDT 2011


# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1304696712 -10800
# Node ID 7766361172826971d52df6c19a300d72e7f2abfc
# Parent  04a294503ed8d5567fed134b4491cca6e9ebb974
patch: remove unused ui arg to iterhunks

diff -r 04a294503ed8 -r 776636117282 mercurial/patch.py
--- a/mercurial/patch.py	Fri May 06 18:45:12 2011 +0300
+++ b/mercurial/patch.py	Fri May 06 18:45:12 2011 +0300
@@ -994,7 +994,7 @@
     fp.seek(pos)
     return gitpatches
 
-def iterhunks(ui, fp):
+def iterhunks(fp):
     """Read a patch and yield the following events:
     - ("file", afile, bfile, firsthunk): select a new target file.
     - ("hunk", hunk): a new hunk is ready to be applied, follows a
@@ -1114,7 +1114,7 @@
     cwd = os.getcwd()
     opener = scmutil.opener(cwd)
 
-    for state, values in iterhunks(ui, fp):
+    for state, values in iterhunks(fp):
         if state == 'hunk':
             if not current_file:
                 continue


More information about the Mercurial-devel mailing list