diff mercurial/commands.py @ 34086:a39dce4a76b8

cmdutil: remove redundant commitfunc parameter in amend (API) Since the redundant commit during the amend has been been removed, there is no need for commit callback function in amend now. Therefore, this commit removes the unused parameter "commmitfunc" which was being used for this purpose. Test Plan: Ensured that all the tests pass Differential Revision: https://phab.mercurial-scm.org/D635
author Saurabh Singh <singhsrb@fb.com>
date Fri, 01 Sep 2017 12:34:36 -0700
parents 08346a8fa65f
children 87a6be5b29f4
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Sep 01 12:34:36 2017 -0700
+++ b/mercurial/commands.py	Fri Sep 01 12:34:36 2017 -0700
@@ -1550,15 +1550,7 @@
         if not obsolete.isenabled(repo, obsolete.createmarkersopt):
             cmdutil.checkunfinished(repo)
 
-        # commitfunc is used only for temporary amend commit by cmdutil.amend
-        def commitfunc(ui, repo, message, match, opts):
-            return repo.commit(message,
-                               opts.get('user') or old.user(),
-                               opts.get('date') or old.date(),
-                               match,
-                               extra=extra)
-
-        node = cmdutil.amend(ui, repo, commitfunc, old, extra, pats, opts)
+        node = cmdutil.amend(ui, repo, old, extra, pats, opts)
         if node == old.node():
             ui.status(_("nothing changed\n"))
             return 1