Rev 4230: Simplify code in RemoteBranch to use helpers from Branch. in http://people.ubuntu.com/~robertc/baz2.0/pending/Branch.set_stacked_on_url
Robert Collins
robertc at robertcollins.net
Wed Apr 1 06:46:09 BST 2009
At http://people.ubuntu.com/~robertc/baz2.0/pending/Branch.set_stacked_on_url
------------------------------------------------------------
revno: 4230
revision-id: robertc at robertcollins.net-20090401054558-i6u5qxltq0q096or
parent: robertc at robertcollins.net-20090401050238-fdgxounwbejqff9z
committer: Robert Collins <robertc at robertcollins.net>
branch nick: Branch.set_stacked_on_url
timestamp: Wed 2009-04-01 16:45:58 +1100
message:
Simplify code in RemoteBranch to use helpers from Branch.
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py 2009-04-01 05:02:38 +0000
+++ b/bzrlib/branch.py 2009-04-01 05:45:58 +0000
@@ -171,7 +171,7 @@
"""Get the repository we fallback to at url."""
url = urlutils.join(self.base, url)
a_bzrdir = bzrdir.BzrDir.open(url,
- possible_transports=[self._transport])
+ possible_transports=[self.bzrdir.root_transport])
return a_bzrdir.open_branch().repository
def _get_tags_bytes(self):
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py 2009-04-01 05:02:38 +0000
+++ b/bzrlib/remote.py 2009-04-01 05:45:58 +0000
@@ -1935,12 +1935,7 @@
except (errors.NotStacked, errors.UnstackableBranchFormat,
errors.UnstackableRepositoryFormat), e:
return
- # it's relative to this branch...
- fallback_url = urlutils.join(self.base, fallback_url)
- transports = [self.bzrdir.root_transport]
- stacked_on = branch.Branch.open(fallback_url,
- possible_transports=transports)
- self.repository.add_fallback_repository(stacked_on.repository)
+ self._activate_fallback_location(fallback_url)
def _get_real_transport(self):
# if we try vfs access, return the real branch's vfs transport
More information about the bazaar-commits
mailing list