Mercurial > evolve
comparison hgext3rd/topic/__init__.py @ 6632:7771e80a7280
topic: release transaction using lockmod
This mostly helps pytype, but maybe we also avoid potential issues here?
Anyway, using lockmod is the modern way to release locks and transactions, so
let's use it.
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sun, 31 Dec 2023 17:00:44 -0300 |
parents | b669ded0fe00 |
children | 995c6163e97b |
comparison
equal
deleted
inserted
replaced
6631:0f8dbea4458e | 6632:7771e80a7280 |
---|---|
1276 tr = repo.transaction(b'debugconvertbookmark') | 1276 tr = repo.transaction(b'debugconvertbookmark') |
1277 for ((bmark, revnum), targetrevs) in sorted(actions.items()): | 1277 for ((bmark, revnum), targetrevs) in sorted(actions.items()): |
1278 _applyconvertbmarktopic(ui, repo, targetrevs, revnum, bmark, tr) | 1278 _applyconvertbmarktopic(ui, repo, targetrevs, revnum, bmark, tr) |
1279 tr.close() | 1279 tr.close() |
1280 finally: | 1280 finally: |
1281 tr.release() | 1281 lockmod.release(tr) |
1282 finally: | 1282 finally: |
1283 lockmod.release(lock, wlock) | 1283 lockmod.release(lock, wlock) |
1284 | 1284 |
1285 # inspired from mercurial.repair.stripbmrevset | 1285 # inspired from mercurial.repair.stripbmrevset |
1286 CONVERTBOOKREVSET = b""" | 1286 CONVERTBOOKREVSET = b""" |