[RFC] branch --bind

Ian Clatworthy ian.clatworthy at canonical.com
Sat Jan 9 05:11:43 GMT 2010


Eli Zaretskii wrote:

> Just two random examples:
> 
>  bzr add
> 
>     --file-ids-from=ARG 
>       Lookup file ids from this tree.
>       ...
>       -file-ids-from will try to use the file ids from the supplied
>       path.
> 
> Huh? what are file ids?
> 
>  bzr merge
> 
>     --uncommitted Apply uncommitted changes from a working copy,
>       instead of branch changes.
> 
> What are ``branch changes''? what branch is it talking about?

Please raise bugs for these issues and tag them with 'doc'. The bzr-doc
team has been tackling these very sort of problems recently.

In the case of merge --uncommitted, I'll quickly comment as this is one
of my favorite features of Bazaar ...

Normally, 'bzr merge ../x' will merges changes from ../x that have been
committed. Sometimes though, it's useful to merge changes yet to be
committed. For example, in most projects I work on, I keep a trunk
(bound) branch in a shared repo. I make small changes directly in trunk
and make large changes in new feature branches. Sometimes, I begin
making a change in trunk and realise it's more complex than I initially
thought. So I:

  cd ..
  bzr branch trunk fix-abc
  cd abc
  bzr merge ../trunk --committed

The changes are now available in my feature branch ready to diff and
refine before committing, pushing somewhere for review, merging back to
trunk, etc.

Make sense?

> Now, take the last discussion about "branch --bind": the name of the
> option already puts an unwarranted mental pressure on the user.  Why
> "bind"?  We are asking bzr to create a bound branch, so why not
> "branch --bound"?  At least to me, that would make it far easier to
> remember the option.  IOW, when you pick up a name of a command or an
> option, please think about making it easy to remember.

I'm fine with --bound instead of --bind. I'll rename it if and when I
can ever achieve consensus on making the change.

Ian C.



More information about the bazaar mailing list