Revisit Newbie Bazaar Repository and Branch Setup
Eric Siegerman
lists08-bzr at davor.org
Fri Dec 10 06:48:53 GMT 2010
On Thu, 2010-12-09 at 14:04 -0600, Neil Martinsen-Burrell wrote:
On 2010-12-09 12:47 , Eric Siegerman wrote:
> > So it looks as though bzr doesn't like chains of heavyweight
> > checkouts, but, depending on the transports involved, it only
> > sometimes refuses to commit to them. Aside: Is the latter a bug
> > or an unavoidable limitation?
>
> The former is an intentional decision (at least the last time I
> encountered it) so that Bazaar does not have to check for cycles of
> bound branches (A -> B -> A).
I figured as much, given the explicit error message. Thanks for
explaining the reasoning.
> I believe that the ability to commit to a bound branch whose parent
is
> itself a bound branch over *any* transport is a bug. Can you give a
> reproduction recipe for what you did?
TESTDIR=/tmp/bzrtest
mkdir $TESTDIR
cd $TESTDIR
bzr init a
bzr checkout bzr+ssh://localhost$TESTDIR/a b
bzr checkout bzr+ssh://localhost$TESTDIR/b c
cd c
echo some text >file
bzr add file
bzr ci '-mThis commit should fail.'
The "bzr ci" should fail with a message matching:
bzr: ERROR: Cannot commit to branch .*. It is bound to .*, which is
bound to .*.
Now delete /tmp/bzrtest, change the two checkout lines to:
bzr checkout a b
bzr checkout b c
and run it again. This time you get the expected error message.
I tried to do this as a pair of shell-like tests. The one that
uses simple pathnames was easy, but I couldn't figure out how to
get $TESTDIR into the bzr+ssh: URLs for the other one. Is there
a way to do that, or to avoid the necessity for it?
- Eric
More information about the bazaar
mailing list