obscache: pre-indent code
This will make the next changeset clearer.
--- a/hgext3rd/evolve/obscache.py Thu Jun 15 13:26:05 2017 +0200
+++ b/hgext3rd/evolve/obscache.py Thu Jun 15 11:31:07 2017 +0200
@@ -520,23 +520,24 @@
self.obsstore.obscache.clear()
super(obscacherepo, self).destroyed()
- def transaction(self, *args, **kwargs):
- tr = super(obscacherepo, self).transaction(*args, **kwargs)
- reporef = weakref.ref(self)
+ if True:
+ def transaction(self, *args, **kwargs):
+ tr = super(obscacherepo, self).transaction(*args, **kwargs)
+ reporef = weakref.ref(self)
- def _warmcache(tr):
- repo = reporef()
- if repo is None:
- return
- repo = repo.unfiltered()
- # As pointed in 'obscache.update', we could have the changelog
- # and the obsstore in charge of updating the cache when new
- # items goes it. The tranaction logic would then only be
- # involved for the 'pending' and final writing on disk.
- self.obsstore.obscache.update(repo)
- self.obsstore.obscache.save(repo)
+ def _warmcache(tr):
+ repo = reporef()
+ if repo is None:
+ return
+ repo = repo.unfiltered()
+ # As pointed in 'obscache.update', we could have the changelog
+ # and the obsstore in charge of updating the cache when new
+ # items goes it. The tranaction logic would then only be
+ # involved for the 'pending' and final writing on disk.
+ self.obsstore.obscache.update(repo)
+ self.obsstore.obscache.save(repo)
- tr.addpostclose('warmcache-obscache', _warmcache)
- return tr
+ tr.addpostclose('warmcache-obscache', _warmcache)
+ return tr
repo.__class__ = obscacherepo