Show More
@@ -381,10 +381,7 b' def record(ui, repo, *pats, **opts):' | |||||
381 |
|
381 | |||
382 | ? - display help''' |
|
382 | ? - display help''' | |
383 |
|
383 | |||
384 |
d |
|
384 | dorecord(ui, repo, commands.commit, *pats, **opts) | |
385 | commands.commit(ui, repo, *pats, **opts) |
|
|||
386 |
|
||||
387 | dorecord(ui, repo, record_committer, *pats, **opts) |
|
|||
388 |
|
385 | |||
389 |
|
386 | |||
390 | def qrecord(ui, repo, patch, *pats, **opts): |
|
387 | def qrecord(ui, repo, patch, *pats, **opts): | |
@@ -399,15 +396,15 b' def qrecord(ui, repo, patch, *pats, **op' | |||||
399 | except KeyError: |
|
396 | except KeyError: | |
400 | raise util.Abort(_("'mq' extension not loaded")) |
|
397 | raise util.Abort(_("'mq' extension not loaded")) | |
401 |
|
398 | |||
402 |
def |
|
399 | def committomq(ui, repo, *pats, **opts): | |
403 | mq.new(ui, repo, patch, *pats, **opts) |
|
400 | mq.new(ui, repo, patch, *pats, **opts) | |
404 |
|
401 | |||
405 | opts = opts.copy() |
|
402 | opts = opts.copy() | |
406 | opts['force'] = True # always 'qnew -f' |
|
403 | opts['force'] = True # always 'qnew -f' | |
407 |
dorecord(ui, repo, |
|
404 | dorecord(ui, repo, committomq, *pats, **opts) | |
408 |
|
405 | |||
409 |
|
406 | |||
410 |
def dorecord(ui, repo, commit |
|
407 | def dorecord(ui, repo, commitfunc, *pats, **opts): | |
411 | if not ui.interactive(): |
|
408 | if not ui.interactive(): | |
412 | raise util.Abort(_('running non-interactively, use commit instead')) |
|
409 | raise util.Abort(_('running non-interactively, use commit instead')) | |
413 |
|
410 | |||
@@ -507,7 +504,7 b' def dorecord(ui, repo, committer, *pats,' | |||||
507 | cwd = os.getcwd() |
|
504 | cwd = os.getcwd() | |
508 | os.chdir(repo.root) |
|
505 | os.chdir(repo.root) | |
509 | try: |
|
506 | try: | |
510 |
commit |
|
507 | commitfunc(ui, repo, *newfiles, **opts) | |
511 | finally: |
|
508 | finally: | |
512 | os.chdir(cwd) |
|
509 | os.chdir(cwd) | |
513 |
|
510 |
General Comments 0
You need to be logged in to leave comments.
Login now