Show More
@@ -66,7 +66,8 b' def qrefresh(origfn, ui, repo, *pats, **' | |||
|
66 | 66 | mq.refresh(ui, repo, **opts) |
|
67 | 67 | |
|
68 | 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 | 72 | # This command registration is replaced during uisetup(). |
|
72 | 73 | @command('qrecord', |
@@ -91,7 +92,8 b' def qrecord(ui, repo, patch, *pats, **op' | |||
|
91 | 92 | opts['checkname'] = False |
|
92 | 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 | 98 | def qnew(origfn, ui, repo, patch, *args, **opts): |
|
97 | 99 | if opts['interactive']: |
@@ -19,7 +19,11 b' import lock as lockmod' | |||
|
19 | 19 | def parsealiases(cmd): |
|
20 | 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 | 27 | import merge as mergemod |
|
24 | 28 | if not ui.interactive(): |
|
25 | 29 | raise util.Abort(_('running non-interactively, use %s instead') % |
@@ -61,7 +65,7 b' def dorecord(ui, repo, commitfunc, cmdsu' | |||
|
61 | 65 | |
|
62 | 66 | # 1. filter patch, so we have intending-to apply subset of it |
|
63 | 67 | try: |
|
64 |
chunks = |
|
|
68 | chunks = filterfn(ui, fp) | |
|
65 | 69 | except patch.PatchError, err: |
|
66 | 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 | 1432 | if opts.get('interactive'): |
|
1433 | 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 | 1436 | return |
|
1436 | 1437 | |
|
1437 | 1438 | if opts.get('subrepos'): |
General Comments 0
You need to be logged in to leave comments.
Login now