~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Martin Pool
  • Date: 2005-09-29 03:44:15 UTC
  • mto: (1185.12.2) (1393.1.12)
  • mto: This revision was merged to the branch mainline in revision 1396.
  • Revision ID: mbp@sourcefrog.net-20050929034415-653b0359e30f62e7
- better representation in Branch factories of opening old formats

Show diffs side-by-side

added added

removed removed

Lines of Context:
132
132
        raise NotImplementedError('The Branch class is abstract')
133
133
 
134
134
    @staticmethod
135
 
    def open(base, relax_version_check=False):
 
135
    def open_downlevel(base):
 
136
        """Open a branch which may be of an old format.
 
137
        
 
138
        Only local branches are supported."""
 
139
        return LocalBranch(base, find_root=False, relax_version_check=True)
 
140
        
 
141
    @staticmethod
 
142
    def open(base):
136
143
        """Open an existing branch, rooted at 'base' (url)"""
137
144
        if base and (base.startswith('http://') or base.startswith('https://')):
138
145
            from bzrlib.remotebranch import RemoteBranch
139
 
            return RemoteBranch(base, find_root=False, 
140
 
                                relax_version_check=relax_version_check)
 
146
            return RemoteBranch(base, find_root=False)
141
147
        else:
142
 
            return LocalBranch(base, find_root=False,
143
 
                               relax_version_check=relax_version_check)
 
148
            return LocalBranch(base, find_root=False)
144
149
 
145
150
    @staticmethod
146
151
    def open_containing(url):