##// END OF EJS Templates
with: use context manager for wlock in qpush
Bryan O'Sullivan -
r27828:823069f7 default
parent child Browse files
Show More
@@ -1318,8 +1318,7 b' class queue(object):'
1318 keepchanges=False):
1318 keepchanges=False):
1319 self.checkkeepchanges(keepchanges, force)
1319 self.checkkeepchanges(keepchanges, force)
1320 diffopts = self.diffopts()
1320 diffopts = self.diffopts()
1321 wlock = repo.wlock()
1321 with repo.wlock():
1322 try:
1323 heads = []
1322 heads = []
1324 for hs in repo.branchmap().itervalues():
1323 for hs in repo.branchmap().itervalues():
1325 heads.extend(hs)
1324 heads.extend(hs)
@@ -1461,9 +1460,6 b' class queue(object):'
1461 self.ui.write(_("now at: %s\n") % top)
1460 self.ui.write(_("now at: %s\n") % top)
1462 return ret[0]
1461 return ret[0]
1463
1462
1464 finally:
1465 wlock.release()
1466
1467 def pop(self, repo, patch=None, force=False, update=True, all=False,
1463 def pop(self, repo, patch=None, force=False, update=True, all=False,
1468 nobackup=False, keepchanges=False):
1464 nobackup=False, keepchanges=False):
1469 self.checkkeepchanges(keepchanges, force)
1465 self.checkkeepchanges(keepchanges, force)
General Comments 0
You need to be logged in to leave comments. Login now