Show More
@@ -2303,6 +2303,7 b' class localrepository(object):' | |||||
2303 |
|
2303 | |||
2304 | def tracktags(tr2): |
|
2304 | def tracktags(tr2): | |
2305 | repo = reporef() |
|
2305 | repo = reporef() | |
|
2306 | assert repo is not None # help pytype | |||
2306 | oldfnodes = tagsmod.fnoderevs(repo.ui, repo, oldheads) |
|
2307 | oldfnodes = tagsmod.fnoderevs(repo.ui, repo, oldheads) | |
2307 | newheads = repo.changelog.headrevs() |
|
2308 | newheads = repo.changelog.headrevs() | |
2308 | newfnodes = tagsmod.fnoderevs(repo.ui, repo, newheads) |
|
2309 | newfnodes = tagsmod.fnoderevs(repo.ui, repo, newheads) | |
@@ -2339,6 +2340,7 b' class localrepository(object):' | |||||
2339 | # gating. |
|
2340 | # gating. | |
2340 | tracktags(tr2) |
|
2341 | tracktags(tr2) | |
2341 | repo = reporef() |
|
2342 | repo = reporef() | |
|
2343 | assert repo is not None # help pytype | |||
2342 |
|
2344 | |||
2343 | singleheadopt = (b'experimental', b'single-head-per-branch') |
|
2345 | singleheadopt = (b'experimental', b'single-head-per-branch') | |
2344 | singlehead = repo.ui.configbool(*singleheadopt) |
|
2346 | singlehead = repo.ui.configbool(*singleheadopt) | |
@@ -2442,6 +2444,8 b' class localrepository(object):' | |||||
2442 |
|
2444 | |||
2443 | def hookfunc(unused_success): |
|
2445 | def hookfunc(unused_success): | |
2444 | repo = reporef() |
|
2446 | repo = reporef() | |
|
2447 | assert repo is not None # help pytype | |||
|
2448 | ||||
2445 | if hook.hashook(repo.ui, b'txnclose-bookmark'): |
|
2449 | if hook.hashook(repo.ui, b'txnclose-bookmark'): | |
2446 | bmchanges = sorted(tr.changes[b'bookmarks'].items()) |
|
2450 | bmchanges = sorted(tr.changes[b'bookmarks'].items()) | |
2447 | for name, (old, new) in bmchanges: |
|
2451 | for name, (old, new) in bmchanges: | |
@@ -2473,7 +2477,9 b' class localrepository(object):' | |||||
2473 | b'txnclose', throw=False, **pycompat.strkwargs(hookargs) |
|
2477 | b'txnclose', throw=False, **pycompat.strkwargs(hookargs) | |
2474 | ) |
|
2478 | ) | |
2475 |
|
2479 | |||
2476 |
reporef() |
|
2480 | repo = reporef() | |
|
2481 | assert repo is not None # help pytype | |||
|
2482 | repo._afterlock(hookfunc) | |||
2477 |
|
2483 | |||
2478 | tr.addfinalize(b'txnclose-hook', txnclosehook) |
|
2484 | tr.addfinalize(b'txnclose-hook', txnclosehook) | |
2479 | # Include a leading "-" to make it happen before the transaction summary |
|
2485 | # Include a leading "-" to make it happen before the transaction summary | |
@@ -2484,7 +2490,9 b' class localrepository(object):' | |||||
2484 |
|
2490 | |||
2485 | def txnaborthook(tr2): |
|
2491 | def txnaborthook(tr2): | |
2486 | """To be run if transaction is aborted""" |
|
2492 | """To be run if transaction is aborted""" | |
2487 |
reporef() |
|
2493 | repo = reporef() | |
|
2494 | assert repo is not None # help pytype | |||
|
2495 | repo.hook( | |||
2488 | b'txnabort', throw=False, **pycompat.strkwargs(tr2.hookargs) |
|
2496 | b'txnabort', throw=False, **pycompat.strkwargs(tr2.hookargs) | |
2489 | ) |
|
2497 | ) | |
2490 |
|
2498 | |||
@@ -2667,6 +2675,7 b' class localrepository(object):' | |||||
2667 |
|
2675 | |||
2668 | def updater(tr): |
|
2676 | def updater(tr): | |
2669 | repo = reporef() |
|
2677 | repo = reporef() | |
|
2678 | assert repo is not None # help pytype | |||
2670 | repo.updatecaches(tr) |
|
2679 | repo.updatecaches(tr) | |
2671 |
|
2680 | |||
2672 | return updater |
|
2681 | return updater |
General Comments 0
You need to be logged in to leave comments.
Login now