##// END OF EJS Templates
record: omit meaningless 'qnew' suggestion at 'hg qnew -i'...
FUJIWARA Katsunori -
r25797:cc9fb459 default
parent child Browse files
Show More
@@ -93,7 +93,9 b' def qrecord(ui, repo, patch, *pats, **op'
93 See :hg:`help qnew` & :hg:`help record` for more information and
93 See :hg:`help qnew` & :hg:`help record` for more information and
94 usage.
94 usage.
95 '''
95 '''
96 return _qrecord('qnew', ui, repo, patch, *pats, **opts)
96
97
98 def _qrecord(cmdsuggest, ui, repo, patch, *pats, **opts):
97 try:
99 try:
98 mq = extensions.find('mq')
100 mq = extensions.find('mq')
99 except KeyError:
101 except KeyError:
@@ -108,14 +110,14 b' def qrecord(ui, repo, patch, *pats, **op'
108 backup = ui.backupconfig('experimental', 'crecord')
110 backup = ui.backupconfig('experimental', 'crecord')
109 try:
111 try:
110 ui.setconfig('experimental', 'crecord', False, 'record')
112 ui.setconfig('experimental', 'crecord', False, 'record')
111 cmdutil.dorecord(ui, repo, committomq, 'qnew', False,
113 cmdutil.dorecord(ui, repo, committomq, cmdsuggest, False,
112 cmdutil.recordfilter, *pats, **opts)
114 cmdutil.recordfilter, *pats, **opts)
113 finally:
115 finally:
114 ui.restoreconfig(backup)
116 ui.restoreconfig(backup)
115
117
116 def qnew(origfn, ui, repo, patch, *args, **opts):
118 def qnew(origfn, ui, repo, patch, *args, **opts):
117 if opts['interactive']:
119 if opts['interactive']:
118 return qrecord(ui, repo, patch, *args, **opts)
120 return _qrecord(None, ui, repo, patch, *args, **opts)
119 return origfn(ui, repo, patch, *args, **opts)
121 return origfn(ui, repo, patch, *args, **opts)
120
122
121
123
@@ -123,6 +123,12 b' Base commit'
123
123
124 $ hg add 1.txt 2.txt dir/a.txt
124 $ hg add 1.txt 2.txt dir/a.txt
125 $ hg commit -m aaa
125 $ hg commit -m aaa
126 $ hg qrecord --config ui.interactive=false patch
127 abort: running non-interactively, use qnew instead
128 [255]
129 $ hg qnew -i --config ui.interactive=false patch
130 abort: running non-interactively
131 [255]
126 $ hg qnew -d '0 0' patch
132 $ hg qnew -d '0 0' patch
127
133
128 Changing files
134 Changing files
General Comments 0
You need to be logged in to leave comments. Login now