Lightweight branches?

Aaron Bentley aaron.bentley at utoronto.ca
Mon Nov 20 16:15:00 GMT 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dmitry Vasiliev wrote:
> Aaron Bentley wrote:
> 
>> I really think "truncate history?" is a separate question from "where
>> should I stop?".  Making it part of the -r option also makes shallow
>> branching less discoverable.
> 
> 
> I think about "bzr branch -r A" as of "gets history of revisions from
> the first to A" and if extend this concept further "bzr branch -r A..B"
> could means "gets history of revisions from A to B".

Shallow branching is something that does not come naturally to bzr.  It
should stick out.  It shouldn't appear to be normal, because at least
initially, it will not fit with our normal way of doing things.

> If you want shallow
> branching as a default behavior and supply -r options then "-r A" can be
> interpreted as "-r A..A" so it shouldn't be a problem.

What I want is the ability for users to configure their own install to
do shallow branching by default.  The way we configure default options
is using aliases.  So if we use --shallow it would be:

[ALIASES]
branch = branch --shallow

Which means that "branch -r 5 foo" is interpreted as "branch --shallow
- -r 5 foo".

If we use -r, it would be:

[ALIASES]
branch = branch -r-1..-1

Which means that "branch -r 5 foo" is interpreted as "branch -r-1..-1 -r
5 foo", which is the same as "branch -r 5 foo"-- i.e. not a shallow branch.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFFYdSD0F+nu1YWqI0RAlKWAJ4sb+53sk7lI5wPjxxVFQryuyQ4zQCZARYe
rsaMOua1U29wr0gnwCVW7ag=
=wSF4
-----END PGP SIGNATURE-----




More information about the bazaar mailing list