threads / patch / 33853

patchremote-bzr: fixes for older versions of bzr

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

## tl;dr

5 messages between May 17, 2013 and May 17, 2013. Diffs are folded; open one to read it.

replies: 4people: 2as markdown or json

Felipe Contreras· May 17, 2013, 17:10 UTC · lore
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(-)
Show changes to contrib/remote-helpers/git-remote-bzr +4 −2
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· May 17, 2013, 17:25 UTC · re: Felipe Contreras · lore

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

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

Show 6 quoted lines
> 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· May 17, 2013, 18:01 UTC · re: Felipe Contreras · lore

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

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"?
Show 7 quoted lines
>>
>> 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· May 17, 2013, 18:20 UTC · re: Junio C Hamano · lore

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

On Fri, May 17, 2013 at 1:01 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 19 quoted lines
> 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· May 17, 2013, 18:45 UTC · re: Felipe Contreras · lore

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

Felipe Contreras <felipe.contreras@gmail.com> writes:
Show 8 quoted lines
> 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'?
Show 14 quoted lines
>>
>>>>
>>>> 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

← back to recent threads