# HG changeset patch # User Pierre-Yves David # Date 1335200006 -7200 # Node ID 168ea7d200a031e1da907f3bd06b0732f89dda06 # Parent 7bee48a54c4aa294f16d22bde8842da79bb8dd8d obsolete: blindly obsolete unstability cache when changeset are added diff -r 7bee48a54c4a -r 168ea7d200a0 hgext/obsolete.py --- a/hgext/obsolete.py Mon Apr 23 17:25:36 2012 +0200 +++ b/hgext/obsolete.py Mon Apr 23 18:53:26 2012 +0200 @@ -365,6 +365,7 @@ opush = repo.push o_rollback = repo._rollback ocancopy = repo.cancopy + o_updatebranchcache = repo.updatebranchcache # /!\ api change in Hg 2.2 (97efd26eb9576f39590812ea9) /!\ if util.safehasattr(repo, '_journalfiles'): # Hg 2.2 @@ -419,6 +420,13 @@ del self._obssubrels if '_obsoleteset' in vars(self): del self._obsoleteset + self._clearunstablecache() + + def updatebranchcache(self): + o_updatebranchcache() + self._clearunstablecache() + + def _clearunstablecache(self): if '_unstableset' in vars(self): del self._unstableset if '_suspendedset' in vars(self):