##// END OF EJS Templates
commands: make backout acquire locks before processing...
FUJIWARA Katsunori -
r27193:c7217f14 default
parent child Browse files
Show More
@@ -574,6 +574,15 b' def backout(ui, repo, node=None, rev=Non'
574 Returns 0 on success, 1 if nothing to backout or there are unresolved
574 Returns 0 on success, 1 if nothing to backout or there are unresolved
575 files.
575 files.
576 '''
576 '''
577 wlock = lock = None
578 try:
579 wlock = repo.wlock()
580 lock = repo.lock()
581 return _dobackout(ui, repo, node, rev, commit, **opts)
582 finally:
583 release(lock, wlock)
584
585 def _dobackout(ui, repo, node=None, rev=None, commit=False, **opts):
577 if rev and node:
586 if rev and node:
578 raise error.Abort(_("please specify just one revision"))
587 raise error.Abort(_("please specify just one revision"))
579
588
@@ -612,7 +621,6 b' def backout(ui, repo, node=None, rev=Non'
612 parent = p1
621 parent = p1
613
622
614 # the backout should appear on the same branch
623 # the backout should appear on the same branch
615 wlock = repo.wlock()
616 try:
624 try:
617 branch = repo.dirstate.branch()
625 branch = repo.dirstate.branch()
618 bheads = repo.branchheads(branch)
626 bheads = repo.branchheads(branch)
@@ -675,7 +683,9 b' def backout(ui, repo, node=None, rev=Non'
675 finally:
683 finally:
676 ui.setconfig('ui', 'forcemerge', '', '')
684 ui.setconfig('ui', 'forcemerge', '', '')
677 finally:
685 finally:
678 wlock.release()
686 # TODO: get rid of this meaningless try/finally enclosing.
687 # this is kept only to reduce changes in a patch.
688 pass
679 return 0
689 return 0
680
690
681 @command('bisect',
691 @command('bisect',
General Comments 0
You need to be logged in to leave comments. Login now