##// END OF EJS Templates
mq: grab locks before starting a transaction
Alexis S. L. Carvalho -
r4571:eb403f29 default
parent child Browse files
Show More
@@ -438,11 +438,14 b' class queue:'
438 438 def apply(self, repo, series, list=False, update_status=True,
439 439 strict=False, patchdir=None, merge=None, wlock=None,
440 440 all_files={}):
441 if not wlock:
442 wlock = repo.wlock()
443 lock = repo.lock()
441 444 tr = repo.transaction()
442 445 try:
443 446 ret = self._apply(tr, repo, series, list, update_status,
444 447 strict, patchdir, merge, wlock,
445 all_files=all_files)
448 lock=lock, all_files=all_files)
446 449 tr.close()
447 450 self.save_dirty()
448 451 return ret
@@ -456,14 +459,11 b' class queue:'
456 459
457 460 def _apply(self, tr, repo, series, list=False, update_status=True,
458 461 strict=False, patchdir=None, merge=None, wlock=None,
459 all_files={}):
462 lock=None, all_files={}):
460 463 # TODO unify with commands.py
461 464 if not patchdir:
462 465 patchdir = self.path
463 466 err = 0
464 if not wlock:
465 wlock = repo.wlock()
466 lock = repo.lock()
467 467 n = None
468 468 for patchname in series:
469 469 pushable, reason = self.pushable(patchname)
General Comments 0
You need to be logged in to leave comments. Login now