~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Robert Collins
  • Date: 2005-08-29 07:47:42 UTC
  • mto: (1185.1.10) (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: robertc@robertcollins.net-20050829074742-89ede2087e645c72
add support for file:// urls to Branch()

Show diffs side-by-side

added added

removed removed

Lines of Context:
173
173
    def __init__(self, base, init=False, find_root=True):
174
174
        """Create new branch object at a particular location.
175
175
 
176
 
        base -- Base directory for the branch.
 
176
        base -- Base directory for the branch. May be a file:// url.
177
177
        
178
178
        init -- If True, create new control files in a previously
179
179
             unversioned directory.  If False, the branch must already
192
192
        elif find_root:
193
193
            self.base = find_branch_root(base)
194
194
        else:
 
195
            if base.startswith("file://"):
 
196
                base = base[7:]
195
197
            self.base = os.path.realpath(base)
196
198
            if not isdir(self.controlfilename('.')):
197
199
                from errors import NotBranchError