[RFC] Lazily lookup revision numbers.
Martin Pool
mbp at sourcefrog.net
Fri Jun 12 21:43:08 BST 2009
2009/6/12 Jelmer Vernooij <jelmer at samba.org>:
> This patch adds a "stores_last_revno()" function to BranchFormat, the
> intend of which is to avoid looking up revision numbers if we know a
> branch doesn't store them. Instead we'll try to do a lookup using
> another branch that does store revno's and can thus retrieve the
> revision number much quicker.
>
> At the moment bzr-svn and bzr-git already implement bits of this, by
> overriding individual methods in e.g. BranchPullResult and
> InterBranch to improve performance. Supporting revno-ignorant branches
> in bzrlib a bit better should remove the need for some of these
> overrides in bzr-svn/bzr-git/(bzr-hg).
It sounds reasonable, but I'd suggest calling it has_fast_last_revno()
or similar to make it more clear it's a predicate.
--
Martin <http://launchpad.net/~mbp/>
More information about the bazaar
mailing list