bzrtools- cbranch sets parent
John Arbash Meinel
john at arbash-meinel.com
Fri Jul 21 15:30:20 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Aaron Bentley wrote:
> John Arbash Meinel wrote:
>>> I've started using 'bzr cbranch' as a nice way of creating feature
>>> branches for development.
>>>
>>> I've found it really is easier to use, rather than typing all of the
>>> commands by hand.
>
> I'm glad you like.
>
>>> But the one thing it was missing was the ability to
>>> set the default 'bzr bundle' base.
>
> Oh, you're using cbranch with heavyweight checkouts? This isn't
> something I've tried.
Well, I don't use lightweight checkouts. :)
I know you and I have discussed the utility of having a repo as your
working dir. So we use different workflows between the two of us. I use
a fairly flat working repo, and a more nested public repo.
But because all of my working branches are bound to the public repo, I
don't worry about it.
With your setup, does cbranch create an entry in your local repo as well
as the public repo, and then create a lightweight checkout in your
working dirs. Or how do you use it?
>
>>> The attached patch updates 'cbranch' so that after branching it sets the
>>> submit location to the branch we came from. (arguably it could set
>>> parent instead of submit location, either one works for my use case)
>
> I would rather set the parent, because if we set the submit location,
> that means 'bundle' won't auto-remember the first submit location we
> specify.
>
>>> cd features
>>> bzr cbranch ../bzr.dev feature-foo
>>> cd feature-foo
>>> hack hack
>>> bzr commit -m 'added feature foo'
>>> bzr bundle > feature-foo.patch
>>>
>>> And submit it to the mailing list. Overall, a lot less typing of urls.
>
> Always a good thing.
>
> @@ -31,3 +32,5 @@
> b_loc = pathjoin(b_root, basename(to_location))
> cmd_branch().run(from_location, b_loc, revision=revision)
> cmd_checkout().run(b_loc, to_location, lightweight=lightweight)
> + b = Branch.open(to_location)
> + b.set_submit_location(from_location)
>
> Should we be canonicalizing from_location?
>
> Aaron
Well, we should probably canonicalize from_location, and use
'set_submit_branch' if we are going to do it :) (I hadn't actually
tested it).
But the more I think about it, the more 'set_parent()' makes more sense.
Because for a feature branch, you may want to pull/merge from the one
you branched off of.
The attached patch gets it right. (And has been tested).
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEwOT7JdeBCYSNAAMRAnI8AJ9AtbtK032Voo5ACL41l2q+OafWIwCfVT3s
Fc72kA4+o6i7osf5wO5bymY=
=nywS
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bzrtools-cbranch-set-parent.diff
Type: text/x-patch
Size: 985 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060721/eb4ba689/attachment.bin
More information about the bazaar
mailing list