[MERGE] Speed up diff spec handling.

John Arbash Meinel john at arbash-meinel.com
Thu Apr 24 23:41:20 BST 2008


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

Aaron Bentley wrote:
> Hi all,
> 
> This patch speeds up diff's handling of revision specs by using the new
> as_revision_id method.
> 
> Unfortunately, I discovered (due to test failures) that the
> _as_revision_id implementation of the branch: spec was broken-- it
> doesn't do a fetch, to ensure that the revision is present in the local
> branch.  But it also doesn't provide a different branch location, to
> retrieve the spec from.  Which means that it can provide a revision_id
> that the caller cannot use.
> 
> So I changed it do use fetch, as the current implementation does.  I
> agree that using fetch should no longer be necessary, but that can be
> fixed as a separate thing.
> 
> There are no tests, since this is an optimization, not a behavior change.
> 
> Aaron

Actually, I explicitly did *not* want to fetch. There are other specs
which can reference a revision_id that is not present, and is not
accessible. (-r-1:../other_branch  as an example).

I would rather leave branch: as not fetching, rather than continue to
have all the lock_read/write bugs of having a revision spec mutate its
branch and repository.

(I won't reject, but that is my strong opinion.)

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

iD8DBQFIEQyQJdeBCYSNAAMRArg+AJ4l38Hso2lWWIeT8SKCsuNXAcM3WgCgsAlF
G4mHngqtq521SGyt35QFvYM=
=chY2
-----END PGP SIGNATURE-----



More information about the bazaar mailing list