mercurial/changegroup.py
changeset 29757 976cd337cac9
parent 29724 4e7be6e33269
child 29804 7b9157aa752f
equal deleted inserted replaced
29756:46d9a5bb2fb0 29757:976cd337cac9
   402                     if srctype != 'strip':
   402                     if srctype != 'strip':
   403                         # During strip, branchcache is invalid but
   403                         # During strip, branchcache is invalid but
   404                         # coming call to `destroyed` will repair it.
   404                         # coming call to `destroyed` will repair it.
   405                         # In other case we can safely update cache on
   405                         # In other case we can safely update cache on
   406                         # disk.
   406                         # disk.
       
   407                         repo.ui.debug('updating the branch cache\n')
   407                         branchmap.updatecache(repo.filtered('served'))
   408                         branchmap.updatecache(repo.filtered('served'))
   408 
   409 
   409                     def runhooks():
   410                     def runhooks():
   410                         # These hooks run when the lock releases, not when the
   411                         # These hooks run when the lock releases, not when the
   411                         # transaction closes. So it's possible for the changelog
   412                         # transaction closes. So it's possible for the changelog
   412                         # to have changed since we last saw it.
   413                         # to have changed since we last saw it.
   413                         if clstart >= len(repo):
   414                         if clstart >= len(repo):
   414                             return
   415                             return
   415 
   416 
   416                         # forcefully update the on-disk branch cache
       
   417                         repo.ui.debug("updating the branch cache\n")
       
   418                         repo.hook("changegroup", **hookargs)
   417                         repo.hook("changegroup", **hookargs)
   419 
   418 
   420                         for n in added:
   419                         for n in added:
   421                             args = hookargs.copy()
   420                             args = hookargs.copy()
   422                             args['node'] = hex(n)
   421                             args['node'] = hex(n)