~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Robert Collins
  • Date: 2005-10-19 07:25:40 UTC
  • Revision ID: robertc@robertcollins.net-20051019072540-0ab4d3bd16ff8c94
Change Transport.* to work with URL's.

 * bzrlib.transport.Transport now accepts *ONLY* url escaped relative paths 
   to apis like 'put', 'get' and 'has'. This is to provide consistent
   behaviour - it operates on url's only. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
259
259
            self.text_store = get_store('text-store')
260
260
            self.revision_store = get_store('revision-store')
261
261
        elif self._branch_format == 5:
262
 
            self.control_weaves = get_weave([])
 
262
            self.control_weaves = get_weave('')
263
263
            self.weave_store = get_weave('weaves')
264
264
            self.revision_store = get_store('revision-store', compressed=False)
265
265
        elif self._branch_format == 6:
266
 
            self.control_weaves = get_weave([])
 
266
            self.control_weaves = get_weave('')
267
267
            self.weave_store = get_weave('weaves', prefixed=True)
268
268
            self.revision_store = get_store('revision-store', compressed=False,
269
269
                                            prefixed=True)
385
385
        return self._transport.abspath(name)
386
386
 
387
387
    def _rel_controlfilename(self, file_or_path):
388
 
        if isinstance(file_or_path, basestring):
389
 
            file_or_path = [file_or_path]
390
 
        return [bzrlib.BZRDIR] + file_or_path
 
388
        if not isinstance(file_or_path, basestring):
 
389
            file_or_path = '/'.join(file_or_path)
 
390
        if file_or_path == '':
 
391
            return bzrlib.BZRDIR
 
392
        return bzrlib.transport.urlescape(bzrlib.BZRDIR + '/' + file_or_path)
391
393
 
392
394
    def controlfilename(self, file_or_path):
393
395
        """Return location relative to branch."""