Mercurial > hg
comparison mercurial/obsolete.py @ 43240:4353942be294
tracing: add a couple of trace points on obsolete and repoview
I was seeing weird stalls in some fast commands, and these trace
events help explain them.
Differential Revision: https://phab.mercurial-scm.org/D6550
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 19 Jun 2019 18:22:10 -0400 |
parents | 8ff1ecfadcd1 |
children | 9f70512ae2cf |
comparison
equal
deleted
inserted
replaced
43239:6fcdcea2b03a | 43240:4353942be294 |
---|---|
897 def getrevs(repo, name): | 897 def getrevs(repo, name): |
898 """Return the set of revision that belong to the <name> set | 898 """Return the set of revision that belong to the <name> set |
899 | 899 |
900 Such access may compute the set and cache it for future use""" | 900 Such access may compute the set and cache it for future use""" |
901 repo = repo.unfiltered() | 901 repo = repo.unfiltered() |
902 if not repo.obsstore: | 902 with util.timedcm('getrevs %s', name): |
903 return frozenset() | 903 if not repo.obsstore: |
904 if name not in repo.obsstore.caches: | 904 return frozenset() |
905 repo.obsstore.caches[name] = cachefuncs[name](repo) | 905 if name not in repo.obsstore.caches: |
906 return repo.obsstore.caches[name] | 906 repo.obsstore.caches[name] = cachefuncs[name](repo) |
907 return repo.obsstore.caches[name] | |
907 | 908 |
908 | 909 |
909 # To be simple we need to invalidate obsolescence cache when: | 910 # To be simple we need to invalidate obsolescence cache when: |
910 # | 911 # |
911 # - new changeset is added: | 912 # - new changeset is added: |