~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Martin Pool
  • Date: 2008-06-25 10:06:48 UTC
  • mfrom: (3509 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3510.
  • Revision ID: mbp@sourcefrog.net-20080625100648-ac20jxcm3ojucuby
merge trunk; remove RemoteToOtherFetcher

Show diffs side-by-side

added added

removed removed

Lines of Context:
2186
2186
                # the branch is colocated on disk, we cannot create a checkout.
2187
2187
                # hopefully callers will expect this.
2188
2188
                local_controldir= bzrdir.BzrDir.open(self.get_vfs_only_url(relpath))
2189
 
                return local_controldir.create_workingtree()
 
2189
                wt = local_controldir.create_workingtree()
 
2190
                if wt.branch._format != b._format:
 
2191
                    wt._branch = b
 
2192
                    # Make sure that assigning to wt._branch fixes wt.branch,
 
2193
                    # in case the implementation details of workingtree objects
 
2194
                    # change.
 
2195
                    self.assertIs(b, wt.branch)
 
2196
                return wt
2190
2197
            else:
2191
2198
                return b.create_checkout(relpath, lightweight=True)
2192
2199