workingtree and branch
Robert Collins
robertc at robertcollins.net
Sun Oct 16 10:46:27 BST 2005
I think one reason the branch interface is overly large is that its
supporting both workingtree and branch related functions.
I'd like to propose we split this by giving working tree the functions
related to it - rename, move, move_one, revert etc.
This means a workingtree needs to know about its branch, so I further
suggest that workingtrees have a .branch attribute, and branch loses the
ability to construct a working tree - this switches the who-owns what
responsibility.
Then, to get a working tree, one might have (in similar fashion to
Branch.open, Branch.open_containing), WorkingTree.open and
WorkingTree.open_containing, methods, but directly constructing one
would be possible via WorkingTree(branch). (So
WorkingTree(Branch.open_containing('.')) would be the common idiom for
code that needs to translate a path to a WorkingTree).
Thoughts?
Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051016/f1b0d34c/attachment.pgp
More information about the bazaar
mailing list