##// END OF EJS Templates
record: check patch name is valid before prompting in qrecord
Idan Kamara -
r14424:4eb88d29 default
parent child Browse files
Show More
@@ -892,7 +892,8 b' class queue(object):'
892 892 if date:
893 893 date = util.parsedate(date)
894 894 diffopts = self.diffopts({'git': opts.get('git')})
895 self.checkpatchname(patchfn)
895 if opts.get('checkname', True):
896 self.checkpatchname(patchfn)
896 897 inclsubs = self.check_substate(repo)
897 898 if inclsubs:
898 899 inclsubs.append('.hgsubstate')
@@ -389,7 +389,10 b' def qrecord(ui, repo, patch, *pats, **op'
389 389 except KeyError:
390 390 raise util.Abort(_("'mq' extension not loaded"))
391 391
392 repo.mq.checkpatchname(patch)
393
392 394 def committomq(ui, repo, *pats, **opts):
395 opts['checkname'] = False
393 396 mq.new(ui, repo, patch, *pats, **opts)
394 397
395 398 dorecord(ui, repo, committomq, 'qnew', *pats, **opts)
@@ -219,6 +219,12 b' Whole diff'
219 219 someone
220 220 up
221 221
222 qrecord with bad patch name, should abort before prompting
223
224 $ hg qrecord .hg
225 abort: patch name cannot begin with ".hg"
226 [255]
227
222 228 qrecord a.patch
223 229
224 230 $ hg qrecord -d '0 0' -m aaa a.patch <<EOF
General Comments 0
You need to be logged in to leave comments. Login now