Recording where branches that are absent are

Aaron Bentley aaron.bentley at utoronto.ca
Tue Jan 31 07:15:55 GMT 2006


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

Robert Collins wrote:
| Yes, I do mean .bzr/branch/branch-location. This would mean that:
| Branch.open(dir) would be able to return the real branch that is rooted
| at the branch-location, or a proxy to it, rather than failing.

I don't think that's an advantage.  If there's no branch at the
location, it seems odd for the operation to succeed.  It could lead to
an infinite loop.  (But it might make sense for open_containing.)

| If the branch-location was in the checkout, then the only way you could
| find there was a distant branch would be to create a working tree
| instance and then look at its branch property.

I don't think a working tree with no branch present should even have a
.bzr/branch directory, much less any control files.  That would imply a
.bzr/branch-format, which might be different from the real branch's
branch format.  All to solve an API issue that isn't very serious; we
can easily have a function that does what you propose for open by
creating a temp WorkingTree, which would be very cheap.

Also, what you propose entails creating two Branch objects, because the
one used to read branch-location, and one to instantiate the branch from
its location.  (There may be branch-format differences, so we'd need two
branches.)

I see 'location of the branch' as a property of the WorkingTree.  It
will be manipulated by working tree commands, and will affect the
behavior of the WorkingTree alone.  As a WorkingTree property, the way
it is represented should be subject to the checkout-format.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFD3w6q0F+nu1YWqI0RAhSBAJ9rNjM3rHcSi2fra8tMWIkXqN3LRQCcC2PP
Xau0k4UQGBmbtHtQ+LdvB7s=
=oLJG
-----END PGP SIGNATURE-----




More information about the bazaar mailing list