Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 18137:d8e7b3a14957
strip: do not update branchcache during strip (issue3745)
At this moment, the cache is invalid, and will be thrown away.
Later the strip function will call the `localrepo.destroyed` method
that will update the branchmap cache.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Fri, 28 Dec 2012 00:02:40 +0100 |
parents | f0eeb9b3444a |
children | df1b37c8ae67 |
comparison
equal
deleted
inserted
replaced
18136:f23dea2b296e | 18137:d8e7b3a14957 |
---|---|
2393 cl.finalize(trp) | 2393 cl.finalize(trp) |
2394 | 2394 |
2395 tr.close() | 2395 tr.close() |
2396 | 2396 |
2397 if changesets > 0: | 2397 if changesets > 0: |
2398 branchmap.updatecache(self) | 2398 if srctype != 'strip': |
2399 # During strip, branchcache is invalid but coming call to | |
2400 # `destroyed` will repair it. | |
2401 # In other case we can safely update cache on disk. | |
2402 branchmap.updatecache(self) | |
2399 def runhooks(): | 2403 def runhooks(): |
2400 # forcefully update the on-disk branch cache | 2404 # forcefully update the on-disk branch cache |
2401 self.ui.debug("updating the branch cache\n") | 2405 self.ui.debug("updating the branch cache\n") |
2402 self.hook("changegroup", node=hex(cl.node(clstart)), | 2406 self.hook("changegroup", node=hex(cl.node(clstart)), |
2403 source=srctype, url=url) | 2407 source=srctype, url=url) |