patch: remove applydiff() useless updatedir and rejmerge arguments
authorPatrick Mezard <pmezard@gmail.com>
Sat, 18 Oct 2008 23:45:45 +0200
changeset 7147 94cf0d1f48a3
parent 7146 266324983681
child 7148 7d84e5b00e29
patch: remove applydiff() useless updatedir and rejmerge arguments
mercurial/patch.py
--- a/mercurial/patch.py	Sat Oct 18 23:20:23 2008 +0200
+++ b/mercurial/patch.py	Sat Oct 18 23:45:45 2008 +0200
@@ -988,8 +988,7 @@
     if hunknum == 0 and dopatch and not gitworkdone:
         raise NoHunks
 
-def applydiff(ui, fp, changed, strip=1, sourcefile=None, reverse=False,
-              rejmerge=None, updatedir=None):
+def applydiff(ui, fp, changed, strip=1, sourcefile=None, reverse=False):
     """reads a patch from fp and tries to apply it.  The dict 'changed' is
        filled in with all of the filenames changed by the patch.  Returns 0
        for a clean patch, -1 if any rejects were found and 1 if there was
@@ -1004,8 +1003,6 @@
         if not current_file:
             return 0
         current_file.close()
-        if rejmerge:
-            rejmerge(current_file)
         return len(current_file.rej)
 
     for state, values in iterhunks(ui, fp, sourcefile):
@@ -1047,8 +1044,6 @@
 
     rejects += closefile()
 
-    if updatedir and gitpatches:
-        updatedir(gitpatches)
     if rejects:
         return -1
     return err