[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bzr repository ready?

From: Stefan Monnier
Subject: Re: bzr repository ready?
Date: Sun, 22 Nov 2009 16:06:53 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

>> > A non lightweight checkout supports committing changes without sending
>> > them to the parent branch, using a command line option.
>> When and why would this be useful?
> It's useful for splitting your history into bite-size, coherent pieces
> that you aren't ready to push to the mainline.  For example, you might
> add an argument to foofunc in foo.el, and fix all the calls in core
> Lisp.  Now you commit.  Next you go through all the packages, and fix
> them up too, with a separate commit to each one, because you're not as
> sure you understand the code in each one.  This allows you to add a
> comment explaining your uncertainty to the commit log, or have the
> package's principal maintainer veto that commit only while everything
> else goes through.
> Then you cd to your local copy of the mainline branch, merge that
> branch into it, and push to the public repo.  By default bzr log will
> show only that the whole branch got merged, but someone who is curious
> can see the detailed history.

Note that in my experience bzr's support for "local commit without
sending upstream" in bound branches (aka heavyweight checkouts) is poor,
and you may get confusing results.  So I think that if you want to do
that you'll probably be better off using a non-bound branch.
You can tempoarily do that:

   bzr unbind
   ..do all the work locally..
   bzr commit
   ..some more work...
   bzr commit
   ..some more work...
   bzr commit
   <now I'm happy>
   bzr push
   <now if I want and can revert to a bound branch>
   bzr bind

Cases where it's useful as well is when you can't commit upstream
because you don't have an internet connection.

>> Would a lightweight checkout from the master repository be a good idea
>> for people who do not intend to send patches, just build the current
>> development version?
> Yes.  I take back what I wrote in my previous response; this is indeed
> an *excellent* third reason for lightweight checkouts, probably much
> more important than "casual contribution".

Note that a lightweight checkout will make pretty much all bzr commands
slower because they'll always have to contact the repository.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]