mercurial/localrepo.py
changeset 34709 c212947273a7
parent 34708 ee5f0d047b41
child 34710 cdf833d7de98
equal deleted inserted replaced
34708:ee5f0d047b41 34709:c212947273a7
  1233             # other families of changes (bookmarks, phases, obsolescence).
  1233             # other families of changes (bookmarks, phases, obsolescence).
  1234             #
  1234             #
  1235             # This will have to be fixed before we remove the experimental
  1235             # This will have to be fixed before we remove the experimental
  1236             # gating.
  1236             # gating.
  1237             tracktags(tr2)
  1237             tracktags(tr2)
  1238             reporef().hook('pretxnclose', throw=True,
  1238             repo = reporef()
  1239                            txnname=desc, **pycompat.strkwargs(tr.hookargs))
  1239             if hook.hashook(repo.ui, 'pretxnclose-bookmark'):
       
  1240                 for name, (old, new) in sorted(tr.changes['bookmarks'].items()):
       
  1241                     args = tr.hookargs.copy()
       
  1242                     args.update(bookmarks.preparehookargs(name, old, new))
       
  1243                     repo.hook('pretxnclose-bookmark', throw=True,
       
  1244                               txnname=desc,
       
  1245                               **pycompat.strkwargs(args))
       
  1246 
       
  1247             repo.hook('pretxnclose', throw=True,
       
  1248                       txnname=desc, **pycompat.strkwargs(tr.hookargs))
  1240         def releasefn(tr, success):
  1249         def releasefn(tr, success):
  1241             repo = reporef()
  1250             repo = reporef()
  1242             if success:
  1251             if success:
  1243                 # this should be explicitly invoked here, because
  1252                 # this should be explicitly invoked here, because
  1244                 # in-memory changes aren't written out at closing
  1253                 # in-memory changes aren't written out at closing