##// END OF EJS Templates
cmdutil: make amend() take str-keyed opts...
Martin von Zweigbergk -
r48224:fca9c63f default
parent child Browse files
Show More
@@ -2783,6 +2783,7 b' def samefile(f, ctx1, ctx2):'
2783
2783
2784
2784
2785 def amend(ui, repo, old, extra, pats, opts):
2785 def amend(ui, repo, old, extra, pats, opts):
2786 opts = pycompat.byteskwargs(opts)
2786 # avoid cycle context -> subrepo -> cmdutil
2787 # avoid cycle context -> subrepo -> cmdutil
2787 from . import context
2788 from . import context
2788
2789
@@ -2135,8 +2135,8 b' def _docommit(ui, repo, *pats, **opts):'
2135 if not obsolete.isenabled(repo, obsolete.createmarkersopt):
2135 if not obsolete.isenabled(repo, obsolete.createmarkersopt):
2136 cmdutil.checkunfinished(repo)
2136 cmdutil.checkunfinished(repo)
2137
2137
2138 node = cmdutil.amend(ui, repo, old, extra, pats, opts)
2138 opts = pycompat.byteskwargs(opts)
2139 opts = pycompat.byteskwargs(opts)
2139 node = cmdutil.amend(ui, repo, old, extra, pats, opts)
2140 if node == old.node():
2140 if node == old.node():
2141 ui.status(_(b"nothing changed\n"))
2141 ui.status(_(b"nothing changed\n"))
2142 return 1
2142 return 1
@@ -1478,9 +1478,8 b' Test heads computation on pending index '
1478 > command = registrar.command(cmdtable)
1478 > command = registrar.command(cmdtable)
1479 > @command(b"amendtransient",[], _(b'hg amendtransient [rev]'))
1479 > @command(b"amendtransient",[], _(b'hg amendtransient [rev]'))
1480 > def amend(ui, repo, *pats, **opts):
1480 > def amend(ui, repo, *pats, **opts):
1481 > opts = pycompat.byteskwargs(opts)
1481 > opts['message'] = b'Test'
1482 > opts[b'message'] = b'Test'
1482 > opts['logfile'] = None
1483 > opts[b'logfile'] = None
1484 > cmdutil.amend(ui, repo, repo[b'.'], {}, pats, opts)
1483 > cmdutil.amend(ui, repo, repo[b'.'], {}, pats, opts)
1485 > ui.write(b'%s\n' % stringutil.pprint(repo.changelog.headrevs()))
1484 > ui.write(b'%s\n' % stringutil.pprint(repo.changelog.headrevs()))
1486 > EOF
1485 > EOF
General Comments 0
You need to be logged in to leave comments. Login now