Branches without working trees
John A Meinel
john at arbash-meinel.com
Sat Oct 29 22:02:48 BST 2005
Attached is a patch which allows for branches which do not have a
working tree. It is also available as a branch here:
http://bzr.arbash-meinel.com/branches/bzr/no-working-tree/
I think this makes sense for published repositories.
This means I moved "WorkingTree.pull()" back into Branch.
I also implemented "cmd_push" as a form of pull() with the targets
reversed. To do this, I have pull() check to make sure that if there is
a working tree, the branch is local.
I also allow for a separate .bzr/x-push-target location. For some
working models, you might have a default upstream, with a different
default push location.
For example, I might try and keep a branch up-to-date with bzr.dev, but
then push the results to *my* published repository.
Having a push target different than parent allows me to "bzr merge",
"bzr commit", "bzr push", without having to specify any locations.
This is not truly required, but I think it is helpful.
Another possibility would be to just have a primary parent, and an
alternate parent. So you could do:
bzr merge --alternate
bzr push
We could also do something like --friends, which contains a list of the
recent push/pull locations. Then it would look like:
bzr merge --friends=1
bzr push --friends=2
bzr missing # The primary friend is the parent
This is getting pretty close to having branch aliases, which might be a
better solution.
The doubt in my mind is why I made it a separate patch.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no-working-tree.patch
Type: text/x-patch
Size: 20796 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051029/f2d3216b/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: push-target.patch
Type: text/x-patch
Size: 5107 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051029/f2d3216b/attachment-0001.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051029/f2d3216b/attachment.pgp
More information about the bazaar
mailing list