##// END OF EJS Templates
cmdutil: make checknotesize() work on str-keyed opts...
Martin von Zweigbergk -
r48221:54849b65 default
parent child Browse files
Show More
@@ -16,7 +16,6 b' from mercurial.i18n import _'
16 from mercurial import (
16 from mercurial import (
17 cmdutil,
17 cmdutil,
18 commands,
18 commands,
19 pycompat,
20 registrar,
19 registrar,
21 )
20 )
22
21
@@ -66,7 +65,7 b' def amend(ui, repo, *pats, **opts):'
66
65
67 See :hg:`help commit` for more details.
66 See :hg:`help commit` for more details.
68 """
67 """
69 cmdutil.checknotesize(ui, pycompat.byteskwargs(opts))
68 cmdutil.check_note_size(opts)
70
69
71 with repo.wlock(), repo.lock():
70 with repo.wlock(), repo.lock():
72 if not opts.get('logfile'):
71 if not opts.get('logfile'):
@@ -153,9 +153,8 b' def uncommit(ui, repo, *pats, **opts):'
153 If no files are specified, the commit will be pruned, unless --keep is
153 If no files are specified, the commit will be pruned, unless --keep is
154 given.
154 given.
155 """
155 """
156 cmdutil.check_note_size(opts)
156 opts = pycompat.byteskwargs(opts)
157 opts = pycompat.byteskwargs(opts)
157
158 cmdutil.checknotesize(ui, opts)
159 cmdutil.resolvecommitoptions(ui, opts)
158 cmdutil.resolvecommitoptions(ui, opts)
160
159
161 with repo.wlock(), repo.lock():
160 with repo.wlock(), repo.lock():
@@ -328,10 +328,10 b' def resolvecommitoptions(ui, opts):'
328 return datemaydiffer
328 return datemaydiffer
329
329
330
330
331 def checknotesize(ui, opts):
331 def check_note_size(opts):
332 """make sure note is of valid format"""
332 """make sure note is of valid format"""
333
333
334 note = opts.get(b'note')
334 note = opts.get('note')
335 if not note:
335 if not note:
336 return
336 return
337
337
General Comments 0
You need to be logged in to leave comments. Login now