comparison 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
comparison
equal deleted inserted replaced
34085:e8a7c1a0565a 34086:a39dce4a76b8
1548 # Note: eventually this guard will be removed. Please do not expect 1548 # Note: eventually this guard will be removed. Please do not expect
1549 # this behavior to remain. 1549 # this behavior to remain.
1550 if not obsolete.isenabled(repo, obsolete.createmarkersopt): 1550 if not obsolete.isenabled(repo, obsolete.createmarkersopt):
1551 cmdutil.checkunfinished(repo) 1551 cmdutil.checkunfinished(repo)
1552 1552
1553 # commitfunc is used only for temporary amend commit by cmdutil.amend 1553 node = cmdutil.amend(ui, repo, old, extra, pats, opts)
1554 def commitfunc(ui, repo, message, match, opts):
1555 return repo.commit(message,
1556 opts.get('user') or old.user(),
1557 opts.get('date') or old.date(),
1558 match,
1559 extra=extra)
1560
1561 node = cmdutil.amend(ui, repo, commitfunc, old, extra, pats, opts)
1562 if node == old.node(): 1554 if node == old.node():
1563 ui.status(_("nothing changed\n")) 1555 ui.status(_("nothing changed\n"))
1564 return 1 1556 return 1
1565 else: 1557 else:
1566 def commitfunc(ui, repo, message, match, opts): 1558 def commitfunc(ui, repo, message, match, opts):