##// END OF EJS Templates
with: use context manager for transaction in mercurial_sink
Bryan O'Sullivan -
r27863:ed59ae8b default
parent child Browse files
Show More
@@ -323,9 +323,7 b' class mercurial_sink(converter_sink):'
323 323 self.repo.ui.setconfig('phases', 'new-commit',
324 324 phases.phasenames[commit.phase], 'convert')
325 325
326 tr = self.repo.transaction("convert")
327
328 try:
326 with self.repo.transaction("convert") as tr:
329 327 node = hex(self.repo.commitctx(ctx))
330 328
331 329 # If the node value has changed, but the phase is lower than
@@ -336,9 +334,6 b' class mercurial_sink(converter_sink):'
336 334 if ctx.phase() < phases.draft:
337 335 phases.retractboundary(self.repo, tr, phases.draft,
338 336 [ctx.node()])
339 tr.close()
340 finally:
341 tr.release()
342 337
343 338 text = "(octopus merge fixup)\n"
344 339 p2 = node
General Comments 0
You need to be logged in to leave comments. Login now