Show More
@@ -42,3 +42,4 b' 733af5d9f6b22387913e1d11350fb8cb7c1487dd' | |||||
42 | de9eb6b1da4fc522b1cab16d86ca166204c24f25 0 iD8DBQBODhfhywK+sNU5EO8RAr2+AJ4ugbAj8ae8/K0bYZzx3sascIAg1QCeK3b+zbbVVqd3b7CDpwFnaX8kTd4= |
|
42 | de9eb6b1da4fc522b1cab16d86ca166204c24f25 0 iD8DBQBODhfhywK+sNU5EO8RAr2+AJ4ugbAj8ae8/K0bYZzx3sascIAg1QCeK3b+zbbVVqd3b7CDpwFnaX8kTd4= | |
43 | 4a43e23b8c55b4566b8200bf69fe2158485a2634 0 iD8DBQBONzIMywK+sNU5EO8RAj5SAJ0aPS3+JHnyI6bHB2Fl0LImbDmagwCdGbDLp1S7TFobxXudOH49bX45Iik= |
|
43 | 4a43e23b8c55b4566b8200bf69fe2158485a2634 0 iD8DBQBONzIMywK+sNU5EO8RAj5SAJ0aPS3+JHnyI6bHB2Fl0LImbDmagwCdGbDLp1S7TFobxXudOH49bX45Iik= | |
44 | d629f1e89021103f1753addcef6b310e4435b184 0 iD8DBQBOWAsBywK+sNU5EO8RAht4AJwJl9oNFopuGkj5m8aKuf7bqPkoAQCeNrEm7UhFsZKYT5iUOjnMV7s2LaM= |
|
44 | d629f1e89021103f1753addcef6b310e4435b184 0 iD8DBQBOWAsBywK+sNU5EO8RAht4AJwJl9oNFopuGkj5m8aKuf7bqPkoAQCeNrEm7UhFsZKYT5iUOjnMV7s2LaM= | |
|
45 | 351a9292e430e35766c552066ed3e87c557b803b 0 iD8DBQBOh3zUywK+sNU5EO8RApFMAKCD3Y/u3avDFndznwqfG5UeTHMlvACfUivPIVQZyDZnhZMq0UhC6zhCEQg= |
@@ -54,3 +54,4 b' 733af5d9f6b22387913e1d11350fb8cb7c1487dd' | |||||
54 | de9eb6b1da4fc522b1cab16d86ca166204c24f25 1.9 |
|
54 | de9eb6b1da4fc522b1cab16d86ca166204c24f25 1.9 | |
55 | 4a43e23b8c55b4566b8200bf69fe2158485a2634 1.9.1 |
|
55 | 4a43e23b8c55b4566b8200bf69fe2158485a2634 1.9.1 | |
56 | d629f1e89021103f1753addcef6b310e4435b184 1.9.2 |
|
56 | d629f1e89021103f1753addcef6b310e4435b184 1.9.2 | |
|
57 | 351a9292e430e35766c552066ed3e87c557b803b 1.9.3 |
@@ -386,7 +386,10 b' def record(ui, repo, *pats, **opts):' | |||||
386 |
|
386 | |||
387 | dorecord(ui, repo, commands.commit, 'commit', False, *pats, **opts) |
|
387 | dorecord(ui, repo, commands.commit, 'commit', False, *pats, **opts) | |
388 |
|
388 | |||
389 | def qrefresh(ui, repo, *pats, **opts): |
|
389 | def qrefresh(origfn, ui, repo, *pats, **opts): | |
|
390 | if not opts['interactive']: | |||
|
391 | return origfn(ui, repo, *pats, **opts) | |||
|
392 | ||||
390 | mq = extensions.find('mq') |
|
393 | mq = extensions.find('mq') | |
391 |
|
394 | |||
392 | def committomq(ui, repo, *pats, **opts): |
|
395 | def committomq(ui, repo, *pats, **opts): | |
@@ -419,6 +422,11 b' def qrecord(ui, repo, patch, *pats, **op' | |||||
419 |
|
422 | |||
420 | dorecord(ui, repo, committomq, 'qnew', False, *pats, **opts) |
|
423 | dorecord(ui, repo, committomq, 'qnew', False, *pats, **opts) | |
421 |
|
424 | |||
|
425 | def qnew(origfn, ui, repo, patch, *args, **opts): | |||
|
426 | if opts['interactive']: | |||
|
427 | return qrecord(ui, repo, patch, *args, **opts) | |||
|
428 | return origfn(ui, repo, patch, *args, **opts) | |||
|
429 | ||||
422 | def dorecord(ui, repo, commitfunc, cmdsuggest, backupall, *pats, **opts): |
|
430 | def dorecord(ui, repo, commitfunc, cmdsuggest, backupall, *pats, **opts): | |
423 | if not ui.interactive(): |
|
431 | if not ui.interactive(): | |
424 | raise util.Abort(_('running non-interactively, use %s instead') % |
|
432 | raise util.Abort(_('running non-interactively, use %s instead') % | |
@@ -584,15 +592,10 b' def uisetup(ui):' | |||||
584 | mq.cmdtable['^qnew'][1][:] + diffopts, |
|
592 | mq.cmdtable['^qnew'][1][:] + diffopts, | |
585 | _('hg qrecord [OPTION]... PATCH [FILE]...')) |
|
593 | _('hg qrecord [OPTION]... PATCH [FILE]...')) | |
586 |
|
594 | |||
587 |
_wrapcmd('qnew', mq.cmdtable, q |
|
595 | _wrapcmd('qnew', mq.cmdtable, qnew, _("interactively record a new patch")) | |
588 | _wrapcmd('qrefresh', mq.cmdtable, qrefresh, |
|
596 | _wrapcmd('qrefresh', mq.cmdtable, qrefresh, | |
589 | _("interactively select changes to refresh")) |
|
597 | _("interactively select changes to refresh")) | |
590 |
|
598 | |||
591 | def _wrapcmd(cmd, table, wrapfn, msg): |
|
599 | def _wrapcmd(cmd, table, wrapfn, msg): | |
592 | '''wrap the command''' |
|
600 | entry = extensions.wrapcommand(table, cmd, wrapfn) | |
593 | def wrapper(orig, *args, **kwargs): |
|
|||
594 | if kwargs['interactive']: |
|
|||
595 | return wrapfn(*args, **kwargs) |
|
|||
596 | return orig(*args, **kwargs) |
|
|||
597 | entry = extensions.wrapcommand(table, cmd, wrapper) |
|
|||
598 | entry[1].append(('i', 'interactive', None, msg)) |
|
601 | entry[1].append(('i', 'interactive', None, msg)) |
General Comments 0
You need to be logged in to leave comments.
Login now