Show More
@@ -12,6 +12,9 b' from mercurial import cmdutil, commands,' | |||||
12 | from mercurial import util |
|
12 | from mercurial import util | |
13 | import copy, cStringIO, errno, os, re, shutil, tempfile |
|
13 | import copy, cStringIO, errno, os, re, shutil, tempfile | |
14 |
|
14 | |||
|
15 | cmdtable = {} | |||
|
16 | command = cmdutil.command(cmdtable) | |||
|
17 | ||||
15 | lines_re = re.compile(r'@@ -(\d+),(\d+) \+(\d+),(\d+) @@\s*(.*)') |
|
18 | lines_re = re.compile(r'@@ -(\d+),(\d+) \+(\d+),(\d+) @@\s*(.*)') | |
16 |
|
19 | |||
17 | def scanpatch(fp): |
|
20 | def scanpatch(fp): | |
@@ -341,6 +344,9 b' def filterpatch(ui, headers):' | |||||
341 | return sum([h for h in applied.itervalues() |
|
344 | return sum([h for h in applied.itervalues() | |
342 | if h[0].special() or len(h) > 1], []) |
|
345 | if h[0].special() or len(h) > 1], []) | |
343 |
|
346 | |||
|
347 | @command("record", | |||
|
348 | commands.table['^commit|ci'][1], # same options as commit | |||
|
349 | _('hg record [OPTION]... [FILE]...')) | |||
344 | def record(ui, repo, *pats, **opts): |
|
350 | def record(ui, repo, *pats, **opts): | |
345 | '''interactively select changes to commit |
|
351 | '''interactively select changes to commit | |
346 |
|
352 | |||
@@ -529,15 +535,9 b' def dorecord(ui, repo, commitfunc, cmdsu' | |||||
529 | finally: |
|
535 | finally: | |
530 | ui.write = oldwrite |
|
536 | ui.write = oldwrite | |
531 |
|
537 | |||
532 |
cmdtable = |
|
538 | cmdtable["qrecord"] = \ | |
533 | "record": |
|
539 | (qrecord, {}, # placeholder until mq is available | |
534 | (record, commands.table['^commit|ci'][1], # same options as commit |
|
540 | _('hg qrecord [OPTION]... PATCH [FILE]...')) | |
535 | _('hg record [OPTION]... [FILE]...')), |
|
|||
536 | "qrecord": |
|
|||
537 | (qrecord, {}, # placeholder until mq is available |
|
|||
538 | _('hg qrecord [OPTION]... PATCH [FILE]...')), |
|
|||
539 | } |
|
|||
540 |
|
||||
541 |
|
541 | |||
542 | def uisetup(ui): |
|
542 | def uisetup(ui): | |
543 | try: |
|
543 | try: | |
@@ -545,11 +545,6 b' def uisetup(ui):' | |||||
545 | except KeyError: |
|
545 | except KeyError: | |
546 | return |
|
546 | return | |
547 |
|
547 | |||
548 |
|
|
548 | cmdtable["qrecord"] = \ | |
549 | "qrecord": |
|
|||
550 | (qrecord, mq.cmdtable['^qnew'][1], # same options as qnew |
|
549 | (qrecord, mq.cmdtable['^qnew'][1], # same options as qnew | |
551 |
_('hg qrecord [OPTION]... PATCH [FILE]...')) |
|
550 | _('hg qrecord [OPTION]... PATCH [FILE]...')) | |
552 | } |
|
|||
553 |
|
||||
554 | cmdtable.update(qcmdtable) |
|
|||
555 |
|
General Comments 0
You need to be logged in to leave comments.
Login now