~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Andrew Bennetts
  • Date: 2006-11-21 08:19:35 UTC
  • mfrom: (2018.8.1 split smart)
  • mto: (2018.5.35 hpss)
  • mto: This revision was merged to the branch mainline in revision 2435.
  • Revision ID: andrew.bennetts@canonical.com-20061121081935-6440ef860ef00262
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1176
1176
        _found is a private parameter, do not use it.
1177
1177
        """
1178
1178
        if not _found:
1179
 
            assert isinstance(BzrDirFormat.find_format(transport),
1180
 
                              self.__class__)
 
1179
            found_format = BzrDirFormat.find_format(transport)
 
1180
            if not isinstance(found_format, self.__class__):
 
1181
                raise AssertionError("%s was asked to open %s, but it seems to need "
 
1182
                        "format %s" 
 
1183
                        % (self, transport, found_format))
1181
1184
        return self._open(transport)
1182
1185
 
1183
1186
    def _open(self, transport):
1869
1872
                if name in bzrcontents:
1870
1873
                    self.bzrdir.transport.delete(name)
1871
1874
        else:
 
1875
            from bzrlib.workingtree import WorkingTreeFormat3
1872
1876
            self.step('Upgrading working tree')
1873
1877
            self.bzrdir.transport.mkdir('checkout', mode=self.dir_mode)
1874
1878
            self.make_lock('checkout')
1875
1879
            self.put_format(
1876
 
                'checkout', bzrlib.workingtree.WorkingTreeFormat3())
 
1880
                'checkout', WorkingTreeFormat3())
1877
1881
            self.bzrdir.transport.delete_multi(
1878
1882
                self.garbage_inventories, self.pb)
1879
1883
            for entry in checkout_files: