[MERGE] lookup revno by iterating history

John Arbash Meinel john at arbash-meinel.com
Sat Mar 15 21:19:23 GMT 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Lukáš Lalinský wrote:
> Just out of curiosity, was something fundamentally wrong with
> https://lists.ubuntu.com/archives/bazaar/2008q1/036639.html ?
> 

So that post did have an attachment, it was just buried in a link.

I wouldn't say that there was anything fundamentally wrong with yours.
Mine was mostly just a <30-min hack to address something that I saw,
especially since my network access was pretty limited at the time.

I do remember seeing your original posting, and I remember having some
concern about how you were doing the partial-history caching.

Looking over it more closely, you got rid of "_match_on_and_check()"
which means that it won't raise errors.InvalidRevisionSpec. Then again,
there may not be a way for _revno() to return None anyway.

If I was going to change the "in_history()" calls to anything, I would
probably change them to "in_store()" because that is technically what we
are doing. (There are a couple which depend on the branch, but most of
them will return any revision that can be accessed in the repo.
Especially stuff like revid:)

I wonder if we wouldn't want to actually try to change the functionality
to get rid of RevisionInfo objects. And instead have a
revisionspec.as_revision_id(branch).

Because honestly we've worked hard to change our internals over to not
working in revnos (a long time ago the apis used to be more of a
'revno_or_revision_id' passed in, but anymore it is strictly revision_ids.)

I realize that I'm going long into designing something big versus just
addressing your patch.

Probably the only big thing I would say is that you add a new parameter
without adding any tests for it. Just testing that you can pass it to
the revision specs without necessarily worrying about the side-effects.
That way it becomes an obvious part of the api.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFH3D1bJdeBCYSNAAMRAm19AKDKAzngTq+VaIKpqQQ6f6P7uFjw0QCgokeZ
ojKBgbVHjAOUjLnDkI6PFpE=
=xLo2
-----END PGP SIGNATURE-----



More information about the bazaar mailing list