# [PATCH] remote-bzr: fixes for older versions of bzr

5 messages from 2013-05-17 to 2013-05-17. Participants: Felipe Contreras, Junio C Hamano.
Thread: https://gitlist.dev/t/33853

## Felipe Contreras, 2013-05-17 17:10

Subject: [PATCH] remote-bzr: fixes for older versions of bzr
Message-ID: <1368810619-18419-1-git-send-email-felipe.contreras@gmail.com>
URL: https://gitlist.dev/e/1368810619-18419-1-git-send-email-felipe.contreras%40gmail.com

```
Up to v2.0.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
---
 contrib/remote-helpers/git-remote-bzr | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr
index ad42317..51b4a29 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -31,6 +31,7 @@ import bzrlib.transport
 import bzrlib.errors
 import bzrlib.ui
 import bzrlib.urlutils
+import bzrlib.branch
 
 import sys
 import os
@@ -788,7 +789,7 @@ def get_remote_branch(origin, remote_branch, name):
     return branch
 
 def find_branches(repo, wanted):
-    transport = repo.user_transport
+    transport = repo.bzrdir.root_transport
 
     for fn in transport.iter_files_recursive():
         if not fn.endswith('.bzr/branch-format'):
@@ -922,7 +923,8 @@ def main(args):
     if not os.path.exists(dirname):
         os.makedirs(dirname)
 
-    bzrlib.ui.ui_factory.be_quiet(True)
+    if hasattr(bzrlib.ui.ui_factory, 'be_quiet'):
+        bzrlib.ui.ui_factory.be_quiet(True)
 
     repo = get_repo(url, alias)
 
-- 
1.8.3.rc2.542.g24820ba

```

## Felipe Contreras, 2013-05-17 17:25

Subject: Re: [PATCH] remote-bzr: fixes for older versions of bzr
Message-ID: <CAMP44s1-RdmM9vs=XSvN1KNOh92Zr=nJWHGR0MZZV9BFXG_3JQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAMP44s1-RdmM9vs%3DXSvN1KNOh92Zr%3DnJWHGR0MZZV9BFXG_3JQ%40mail.gmail.com
In-Reply-To: <1368810619-18419-1-git-send-email-felipe.contreras@gmail.com>

```
On Fri, May 17, 2013 at 12:10 PM, Felipe Contreras
<felipe.contreras@gmail.com> wrote:
> Up to v2.0.
>
> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
> ---
>  contrib/remote-helpers/git-remote-bzr | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

We want this for v1.8.3, otherwise it wouldn't work in older versions of bzr.

-- 
Felipe Contreras

```

## Junio C Hamano, 2013-05-17 18:01

Subject: Re: [PATCH] remote-bzr: fixes for older versions of bzr
Message-ID: <7v7gixzdsj.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v7gixzdsj.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CAMP44s1-RdmM9vs=XSvN1KNOh92Zr=nJWHGR0MZZV9BFXG_3JQ@mail.gmail.com>

```
Felipe Contreras <felipe.contreras@gmail.com> writes:

> On Fri, May 17, 2013 at 12:10 PM, Felipe Contreras
> <felipe.contreras@gmail.com> wrote:
>> Up to v2.0.

Is that "down to v2.0"?

>>
>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>> ---
>>  contrib/remote-helpers/git-remote-bzr | 6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> We want this for v1.8.3, otherwise it wouldn't work in older versions of bzr.

I take it that somebody tested this with both new and old versions
so that the old way you rewrote the code with is still supported by
the more recent ones.

Will apply before 1.8.3-rc3; thanks.

```

## Felipe Contreras, 2013-05-17 18:20

Subject: Re: [PATCH] remote-bzr: fixes for older versions of bzr
Message-ID: <CAMP44s0WbkaWsU+VOCsd2THEQJkTU-67_z5Kb37j=gS9U1MV2Q@mail.gmail.com>
URL: https://gitlist.dev/e/CAMP44s0WbkaWsU%2BVOCsd2THEQJkTU-67_z5Kb37j%3DgS9U1MV2Q%40mail.gmail.com
In-Reply-To: <7v7gixzdsj.fsf@alter.siamese.dyndns.org>

```
On Fri, May 17, 2013 at 1:01 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Felipe Contreras <felipe.contreras@gmail.com> writes:
>
>> On Fri, May 17, 2013 at 12:10 PM, Felipe Contreras
>> <felipe.contreras@gmail.com> wrote:
>>> Up to v2.0.
>
> Is that "down to v2.0"?
>
>>>
>>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>>> ---
>>>  contrib/remote-helpers/git-remote-bzr | 6 ++++--
>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> We want this for v1.8.3, otherwise it wouldn't work in older versions of bzr.
>
> I take it that somebody tested this with both new and old versions
> so that the old way you rewrote the code with is still supported by
> the more recent ones.

Yeah. I wrote a script that tests in a bunch of versions.

Also, I'm fiddling with travis-ci:
https://travis-ci.org/felipec/git/builds/7258332

-- 
Felipe Contreras

```

## Junio C Hamano, 2013-05-17 18:45

Subject: Re: [PATCH] remote-bzr: fixes for older versions of bzr
Message-ID: <7vli7dxx6v.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vli7dxx6v.fsf%40alter.siamese.dyndns.org
In-Reply-To: <CAMP44s0WbkaWsU+VOCsd2THEQJkTU-67_z5Kb37j=gS9U1MV2Q@mail.gmail.com>

```
Felipe Contreras <felipe.contreras@gmail.com> writes:

> On Fri, May 17, 2013 at 1:01 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> Felipe Contreras <felipe.contreras@gmail.com> writes:
>>
>>> On Fri, May 17, 2013 at 12:10 PM, Felipe Contreras
>>> <felipe.contreras@gmail.com> wrote:
>>>> Up to v2.0.
>>
>> Is that "down to v2.0"?



Is that 'down to v2.0'?



>>
>>>>
>>>> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
>>>> ---
>>>>  contrib/remote-helpers/git-remote-bzr | 6 ++++--
>>>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>>
>>> We want this for v1.8.3, otherwise it wouldn't work in older versions of bzr.
>>
>> I take it that somebody tested this with both new and old versions
>> so that the old way you rewrote the code with is still supported by
>> the more recent ones.
>
> Yeah. I wrote a script that tests in a bunch of versions.

Nice to know ;-)

>
> Also, I'm fiddling with travis-ci:
> https://travis-ci.org/felipec/git/builds/7258332

```
