~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Robert Collins
  • Date: 2007-07-25 00:52:21 UTC
  • mfrom: (2650 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2651.
  • Revision ID: robertc@robertcollins.net-20070725005221-0ysm6il5mqnme3wz
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
120
120
    def open_downlevel(base):
121
121
        """Open a branch which may be of an old format."""
122
122
        return Branch.open(base, _unsupported=True)
123
 
        
 
123
 
124
124
    @staticmethod
125
125
    def open(base, _unsupported=False):
126
126
        """Open the branch rooted at base.
132
132
        return control.open_branch(_unsupported)
133
133
 
134
134
    @staticmethod
135
 
    def open_containing(url):
 
135
    def open_from_transport(transport, _unsupported=False):
 
136
        """Open the branch rooted at transport"""
 
137
        control = bzrdir.BzrDir.open_from_transport(transport, _unsupported)
 
138
        return control.open_branch(_unsupported)
 
139
 
 
140
    @staticmethod
 
141
    def open_containing(url, possible_transports=None):
136
142
        """Open an existing branch which contains url.
137
143
        
138
144
        This probes for a branch at url, and searches upwards from there.
143
149
        format, UnknownFormatError or UnsupportedFormatError are raised.
144
150
        If there is one, it is returned, along with the unused portion of url.
145
151
        """
146
 
        control, relpath = bzrdir.BzrDir.open_containing(url)
 
152
        control, relpath = bzrdir.BzrDir.open_containing(url,
 
153
                                                         possible_transports)
147
154
        return control.open_branch(), relpath
148
155
 
149
156
    @staticmethod