Revisit Newbie Bazaar Repository and Branch Setup

Neil Martinsen-Burrell nmb at wartburg.edu
Sat Dec 11 19:47:48 GMT 2010


On 2010-12-10 00:48 , Eric Siegerman wrote:
> 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 think that you should file this as a bug, but be aware that it might 
be a duplicate or a feature.

> 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?

In subclasses of TestCaseWithMemoryTransport (such as 
TestCaseWithMemoryTransportAndScript), there should be a member 
self.test_dir to allow you access to that path.  Whether or not Bazaar 
supports localhost SSH access in tests is unknown to me.

-Neil

>
>    - Eric
>
>
>




More information about the bazaar mailing list