Show More
@@ -17,6 +17,7 b' from mercurial import (' | |||||
17 | cmdutil, |
|
17 | cmdutil, | |
18 | commands, |
|
18 | commands, | |
19 | error, |
|
19 | error, | |
|
20 | pycompat, | |||
20 | registrar, |
|
21 | registrar, | |
21 | ) |
|
22 | ) | |
22 |
|
23 | |||
@@ -46,10 +47,11 b' def amend(ui, repo, *pats, **opts):' | |||||
46 |
|
47 | |||
47 | See :hg:`help commit` for more details. |
|
48 | See :hg:`help commit` for more details. | |
48 | """ |
|
49 | """ | |
|
50 | opts = pycompat.byteskwargs(opts) | |||
49 | if len(opts['note']) > 255: |
|
51 | if len(opts['note']) > 255: | |
50 | raise error.Abort(_("cannot store a note of more than 255 bytes")) |
|
52 | raise error.Abort(_("cannot store a note of more than 255 bytes")) | |
51 | with repo.wlock(), repo.lock(): |
|
53 | with repo.wlock(), repo.lock(): | |
52 | if not opts.get('logfile'): |
|
54 | if not opts.get('logfile'): | |
53 | opts['message'] = opts.get('message') or repo['.'].description() |
|
55 | opts['message'] = opts.get('message') or repo['.'].description() | |
54 | opts['amend'] = True |
|
56 | opts['amend'] = True | |
55 | return commands._docommit(ui, repo, *pats, **opts) |
|
57 | return commands._docommit(ui, repo, *pats, **pycompat.strkwargs(opts)) |
General Comments 0
You need to be logged in to leave comments.
Login now