Show More
@@ -264,21 +264,6 b' def _docreatecmd(ui, repo, pats, opts):' | |||
|
264 | 264 | for i in xrange(1, 100): |
|
265 | 265 | yield '%s-%02d' % (label, i) |
|
266 | 266 | |
|
267 | def commitfunc(ui, repo, message, match, opts): | |
|
268 | hasmq = util.safehasattr(repo, 'mq') | |
|
269 | if hasmq: | |
|
270 | saved, repo.mq.checkapplied = repo.mq.checkapplied, False | |
|
271 | backup = repo.ui.backupconfig('phases', 'new-commit') | |
|
272 | try: | |
|
273 | repo.ui. setconfig('phases', 'new-commit', phases.secret) | |
|
274 | editor = cmdutil.getcommiteditor(editform='shelve.shelve', **opts) | |
|
275 | return repo.commit(message, user, opts.get('date'), match, | |
|
276 | editor=editor) | |
|
277 | finally: | |
|
278 | repo.ui.restoreconfig(backup) | |
|
279 | if hasmq: | |
|
280 | repo.mq.checkapplied = saved | |
|
281 | ||
|
282 | 267 | if parent.node() != nullid: |
|
283 | 268 | desc = "changes to: %s" % parent.description().split('\n', 1)[0] |
|
284 | 269 | else: |
@@ -317,6 +302,22 b' def _docreatecmd(ui, repo, pats, opts):' | |||
|
317 | 302 | raise error.Abort(_("shelved change names may not start with '.'")) |
|
318 | 303 | interactive = opts.get('interactive', False) |
|
319 | 304 | |
|
305 | def commitfunc(ui, repo, message, match, opts): | |
|
306 | hasmq = util.safehasattr(repo, 'mq') | |
|
307 | if hasmq: | |
|
308 | saved, repo.mq.checkapplied = repo.mq.checkapplied, False | |
|
309 | backup = repo.ui.backupconfig('phases', 'new-commit') | |
|
310 | try: | |
|
311 | repo.ui. setconfig('phases', 'new-commit', phases.secret) | |
|
312 | editor = cmdutil.getcommiteditor(editform='shelve.shelve', | |
|
313 | **opts) | |
|
314 | return repo.commit(message, user, opts.get('date'), match, | |
|
315 | editor=editor) | |
|
316 | finally: | |
|
317 | repo.ui.restoreconfig(backup) | |
|
318 | if hasmq: | |
|
319 | repo.mq.checkapplied = saved | |
|
320 | ||
|
320 | 321 | def interactivecommitfunc(ui, repo, *pats, **opts): |
|
321 | 322 | match = scmutil.match(repo['.'], pats, {}) |
|
322 | 323 | message = opts['message'] |
General Comments 0
You need to be logged in to leave comments.
Login now