comparison mercurial/localrepo.py @ 5988:ee317dbfb9d0

update the branch cache at the end of addchangegroup This should avoid a bad performance problem when the branch cache is not up-to-date, and hgweb can't write an updated version because it lacks permissions.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 03 Feb 2008 21:03:46 -0200
parents 850494d62674
children 30d2fecaab76 65340b8231eb
comparison
equal deleted inserted replaced
5987:f2201aee3dc8 5988:ee317dbfb9d0
1898 tr.close() 1898 tr.close()
1899 finally: 1899 finally:
1900 del tr 1900 del tr
1901 1901
1902 if changesets > 0: 1902 if changesets > 0:
1903 # forcefully update the on-disk branch cache
1904 self.ui.debug(_("updating the branch cache\n"))
1905 self.branchcache = None
1906 self.branchtags()
1903 self.hook("changegroup", node=hex(self.changelog.node(cor+1)), 1907 self.hook("changegroup", node=hex(self.changelog.node(cor+1)),
1904 source=srctype, url=url) 1908 source=srctype, url=url)
1905 1909
1906 for i in xrange(cor + 1, cnr + 1): 1910 for i in xrange(cor + 1, cnr + 1):
1907 self.hook("incoming", node=hex(self.changelog.node(i)), 1911 self.hook("incoming", node=hex(self.changelog.node(i)),