64 # We can't pass *pats here since qrefresh will undo all other |
64 # We can't pass *pats here since qrefresh will undo all other |
65 # changed files in the patch that aren't in pats. |
65 # changed files in the patch that aren't in 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, *pats, **opts) |
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', |
73 [], |
74 [], |
74 _('hg qrecord [OPTION]... PATCH [FILE]...'), |
75 _('hg qrecord [OPTION]... PATCH [FILE]...'), |
89 |
90 |
90 def committomq(ui, repo, *pats, **opts): |
91 def committomq(ui, repo, *pats, **opts): |
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, *pats, **opts) |
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']: |
98 return qrecord(ui, repo, patch, *args, **opts) |
100 return qrecord(ui, repo, patch, *args, **opts) |
99 return origfn(ui, repo, patch, *args, **opts) |
101 return origfn(ui, repo, patch, *args, **opts) |