~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/reconfigure.py

(gz) Backslash escape selftest output when printing to non-unicode consoles
 (Martin [gz])

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007, 2009 Canonical Ltd
 
1
# Copyright (C) 2007-2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
82
82
            self.repository = None
83
83
            self.local_repository = None
84
84
        else:
85
 
            if (self.repository.bzrdir.root_transport.base ==
86
 
                self.bzrdir.root_transport.base):
 
85
            if (self.repository.user_url == self.bzrdir.user_url):
87
86
                self.local_repository = self.repository
88
87
            else:
89
88
                self.local_repository = None
90
89
        try:
91
90
            branch = self.bzrdir.open_branch()
92
 
            if branch.bzrdir.root_transport.base == bzrdir.root_transport.base:
 
91
            if branch.user_url == bzrdir.user_url:
93
92
                self.local_branch = branch
94
93
                self.referenced_branch = None
95
94
            else:
217
216
            if not want_reference:
218
217
                self._create_repository = True
219
218
        else:
220
 
            if want_reference and (self.repository.bzrdir.root_transport.base
221
 
                                   == self.bzrdir.root_transport.base):
 
219
            if want_reference and (
 
220
                self.repository.user_url == self.bzrdir.user_url):
222
221
                if not self.repository.is_shared():
223
222
                    self._destroy_repository = True
224
223
        if self.referenced_branch is None:
344
343
            if self._create_reference:
345
344
                reference_branch.repository.fetch(self.repository)
346
345
            elif self.local_branch is not None and not self._destroy_branch:
347
 
                up = self.local_branch.bzrdir.root_transport.clone('..')
 
346
                up = self.local_branch.user_transport.clone('..')
348
347
                up_bzrdir = bzrdir.BzrDir.open_containing_from_transport(up)[0]
349
348
                new_repo = up_bzrdir.find_repository()
350
349
                new_repo.fetch(self.repository)
368
367
            local_branch = self.local_branch
369
368
        if self._create_reference:
370
369
            format = branch.BranchReferenceFormat().initialize(self.bzrdir,
371
 
                reference_branch)
 
370
                target_branch=reference_branch)
372
371
        if self._destroy_tree:
373
372
            self.bzrdir.destroy_workingtree()
374
373
        if self._create_tree: