##// END OF EJS Templates
record: function variable naming & signature cleanup....
Dan Villiom Podlaski Christiansen -
r10323:0aa59f53 default
parent child Browse files
Show More
@@ -381,10 +381,7 b' def record(ui, repo, *pats, **opts):'
381
381
382 ? - display help'''
382 ? - display help'''
383
383
384 def record_committer(ui, repo, pats, opts):
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 qrecord_committer(ui, repo, pats, opts):
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, qrecord_committer, *pats, **opts)
404 dorecord(ui, repo, committomq, *pats, **opts)
408
405
409
406
410 def dorecord(ui, repo, committer, *pats, **opts):
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 committer(ui, repo, newfiles, opts)
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