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): |