~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-08-07 00:57:17 UTC
  • mfrom: (3577.4.3 upgrade-over-hpss)
  • Revision ID: pqm@pqm.ubuntu.com-20080807005717-qxnuq9je71bt9tcs
Make 'bzr upgrade' work over HPSS. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
from bzrlib.bzrdir import ConvertBzrDir4To5, ConvertBzrDir5To6, BzrDir, BzrDirFormat4, BzrDirFormat5, BzrDirFormat
23
23
import bzrlib.errors as errors
 
24
from bzrlib.remote import RemoteBzrDir
24
25
from bzrlib.transport import get_transport
25
26
import bzrlib.ui as ui
26
27
 
30
31
    def __init__(self, url, format):
31
32
        self.format = format
32
33
        self.bzrdir = BzrDir.open_unsupported(url)
 
34
        if isinstance(self.bzrdir, RemoteBzrDir):
 
35
            self.bzrdir._ensure_real()
 
36
            self.bzrdir = self.bzrdir._real_bzrdir
33
37
        if self.bzrdir.root_transport.is_readonly():
34
38
            raise errors.UpgradeReadonly
35
39
        self.transport = self.bzrdir.root_transport