At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 3834
revision-id: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
parent: [EMAIL PROTECTED]
committer: Canonical.com Patch Queue Manager <[EMAIL PROTECTED]>
branch nick: +trunk
timestamp: Wed 2008-11-12 07:33:22 +0000
message:
  (abentley) Fix stacking on shared repository branch via smart server
modified:
  bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
  bzrlib/tests/branch_implementations/test_stacking.py 
test_stacking.py-20080214020755-msjlkb7urobwly0f-1
    ------------------------------------------------------------
    revno: 3830.2.2
    revision-id: [EMAIL PROTECTED]
    parent: [EMAIL PROTECTED]
    committer: Aaron Bentley <[EMAIL PROTECTED]>
    branch nick: fix-remote-stacking
    timestamp: Wed 2008-11-12 01:58:47 -0500
    message:
      Add explanatory comment.
    modified:
      bzrlib/tests/branch_implementations/test_stacking.py 
test_stacking.py-20080214020755-msjlkb7urobwly0f-1
    ------------------------------------------------------------
    revno: 3830.2.1
    revision-id: [EMAIL PROTECTED]
    parent: [EMAIL PROTECTED]
    committer: Aaron Bentley <[EMAIL PROTECTED]>
    branch nick: fix-remote-stacking
    timestamp: Tue 2008-11-11 18:13:53 -0500
    message:
      Fix HPSS with branch stacked on repository branch
    modified:
      bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
      bzrlib/tests/branch_implementations/test_stacking.py 
test_stacking.py-20080214020755-msjlkb7urobwly0f-1
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py  2008-11-12 02:29:03 +0000
+++ b/bzrlib/remote.py  2008-11-12 07:33:22 +0000
@@ -1347,9 +1347,9 @@
         transports = [self.bzrdir.root_transport]
         if self._real_branch is not None:
             transports.append(self._real_branch._transport)
-        fallback_bzrdir = BzrDir.open(fallback_url, transports)
-        fallback_repo = fallback_bzrdir.open_repository()
-        self.repository.add_fallback_repository(fallback_repo)
+        stacked_on = branch.Branch.open(fallback_url,
+                                        possible_transports=transports)
+        self.repository.add_fallback_repository(stacked_on.repository)
 
     def _get_real_transport(self):
         # if we try vfs access, return the real branch's vfs transport

=== modified file 'bzrlib/tests/branch_implementations/test_stacking.py'
--- a/bzrlib/tests/branch_implementations/test_stacking.py      2008-10-27 
00:25:17 +0000
+++ b/bzrlib/tests/branch_implementations/test_stacking.py      2008-11-12 
06:58:47 +0000
@@ -391,3 +391,18 @@
             'transform_fallback_location', hook, None)
         branch.Branch.open('stacked')
         self.assertEqual(['../stack-on'], hook_calls)
+
+    def test_stack_on_repository_branch(self):
+        # Stacking should work when the repo isn't co-located with the
+        # stack-on branch.
+        try:
+            repo = self.make_repository('repo', shared=True)
+        except errors.IncompatibleFormat:
+            raise TestNotApplicable()
+        # Avoid make_branch, which produces standalone branches.
+        bzrdir = self.make_bzrdir('repo/stack-on')
+        b = bzrdir.create_branch()
+        transport = self.get_transport('stacked')
+        b.bzrdir.clone_on_transport(transport, stacked_on=b.base)
+        # Ensure that opening the branch doesn't raise.
+        branch.Branch.open(transport.base)


-- 
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits

Reply via email to