RFC: commit-to-branch
Robert Collins
robertc at robertcollins.net
Mon Dec 1 04:29:53 GMT 2008
I'd like some feedback on UI for committing to a different branch.
Firstly the use case - in a loom one often prepares work that belongs on
a different lower thread[branch].
The slow way is:
bzr switch actual-thread
bzr commit files-to-commit
bzr shelve --all
while not-on-the-original-thread up;bzr commit
bzr unshelve --all
I'd like this to be a single command for convenience.
I think overloading commit is best because this can be used for normal
bzr branches too (or the recently announced many-branches-colocated
plugin too).
So splitting this up there are several different things needed:
- loom needs to be able to intercept the 'update the working tree' step
and have it do the 'up-commit-repeat' dance in the background, then
give control back, with a new local revision id.
- commit needs an option to tell it to commit to a different branch
object, and when doing that commit it wants to apply a delta based on
the current tree rather than supplying full texts.
- loom needs to make sure than the name the user supplies for finding
the branch is able to find the thread.
For the first, I think a simple hook on Branch is probably enough.
For the second, a simple implementation (not fast, but 'works') would be
to checkout --lightweight the target branch, merge --uncommitted [paths]
the paths selected, then commit, and finally remove the temp dir. As a
bootstrap mechanism this should be decent, and avoid cruft. With the
pending work on commit in the brisbane-core branch, we can fit this in a
lot more easily into the core.
For the last, I am wondering if a directory-service would fit - it would
need a hint in the lookup (the branch the user is in when issueing the
command) - Aaron, do you think the directory service is a decent place
to hook this in?
-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/20081201/db018c22/attachment.pgp
More information about the bazaar
mailing list