Show More
@@ -66,7 +66,8 b' def qrefresh(origfn, ui, repo, *pats, **' | |||||
66 | mq.refresh(ui, repo, **opts) |
|
66 | mq.refresh(ui, repo, **opts) | |
67 |
|
67 | |||
68 | # backup all changed files |
|
68 | # backup all changed files | |
69 |
cmdutil.dorecord(ui, repo, committomq, 'qrefresh', True, |
|
69 | cmdutil.dorecord(ui, repo, committomq, 'qrefresh', True, | |
|
70 | cmdutil.recordfilter, *pats, **opts) | |||
70 |
|
71 | |||
71 | # This command registration is replaced during uisetup(). |
|
72 | # This command registration is replaced during uisetup(). | |
72 | @command('qrecord', |
|
73 | @command('qrecord', | |
@@ -91,7 +92,8 b' def qrecord(ui, repo, patch, *pats, **op' | |||||
91 | opts['checkname'] = False |
|
92 | opts['checkname'] = False | |
92 | mq.new(ui, repo, patch, *pats, **opts) |
|
93 | mq.new(ui, repo, patch, *pats, **opts) | |
93 |
|
94 | |||
94 |
cmdutil.dorecord(ui, repo, committomq, 'qnew', False, |
|
95 | cmdutil.dorecord(ui, repo, committomq, 'qnew', False, | |
|
96 | cmdutil.recordfilter, *pats, **opts) | |||
95 |
|
97 | |||
96 | def qnew(origfn, ui, repo, patch, *args, **opts): |
|
98 | def qnew(origfn, ui, repo, patch, *args, **opts): | |
97 | if opts['interactive']: |
|
99 | if opts['interactive']: |
@@ -19,7 +19,11 b' import lock as lockmod' | |||||
19 | def parsealiases(cmd): |
|
19 | def parsealiases(cmd): | |
20 | return cmd.lstrip("^").split("|") |
|
20 | return cmd.lstrip("^").split("|") | |
21 |
|
21 | |||
22 | def dorecord(ui, repo, commitfunc, cmdsuggest, backupall, *pats, **opts): |
|
22 | def recordfilter(ui, fp): | |
|
23 | return patch.filterpatch(ui, patch.parsepatch(fp)) | |||
|
24 | ||||
|
25 | def dorecord(ui, repo, commitfunc, cmdsuggest, backupall, | |||
|
26 | filterfn, *pats, **opts): | |||
23 | import merge as mergemod |
|
27 | import merge as mergemod | |
24 | if not ui.interactive(): |
|
28 | if not ui.interactive(): | |
25 | raise util.Abort(_('running non-interactively, use %s instead') % |
|
29 | raise util.Abort(_('running non-interactively, use %s instead') % | |
@@ -61,7 +65,7 b' def dorecord(ui, repo, commitfunc, cmdsu' | |||||
61 |
|
65 | |||
62 | # 1. filter patch, so we have intending-to apply subset of it |
|
66 | # 1. filter patch, so we have intending-to apply subset of it | |
63 | try: |
|
67 | try: | |
64 |
chunks = |
|
68 | chunks = filterfn(ui, fp) | |
65 | except patch.PatchError, err: |
|
69 | except patch.PatchError, err: | |
66 | raise util.Abort(_('error parsing patch: %s') % err) |
|
70 | raise util.Abort(_('error parsing patch: %s') % err) | |
67 |
|
71 |
@@ -1431,7 +1431,8 b' def commit(ui, repo, *pats, **opts):' | |||||
1431 | """ |
|
1431 | """ | |
1432 | if opts.get('interactive'): |
|
1432 | if opts.get('interactive'): | |
1433 | opts.pop('interactive') |
|
1433 | opts.pop('interactive') | |
1434 |
cmdutil.dorecord(ui, repo, commit, 'commit', False, |
|
1434 | cmdutil.dorecord(ui, repo, commit, 'commit', False, | |
|
1435 | cmdutil.recordfilter, *pats, **opts) | |||
1435 | return |
|
1436 | return | |
1436 |
|
1437 | |||
1437 | if opts.get('subrepos'): |
|
1438 | if opts.get('subrepos'): |
General Comments 0
You need to be logged in to leave comments.
Login now