~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

[merge] robert

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."""
667
669
        []
668
670
        >>> WorkingTree(b.base, b).remove('foo')
669
671
        >>> list(b.unknowns())
670
 
        ['foo']
 
672
        [u'foo']
671
673
        """
672
674
        return self.working_tree().unknowns()
673
675
 
677
679
            mutter("add {%s} to revision-history" % revision_id)
678
680
        rev_history = self.revision_history()
679
681
        rev_history.extend(revision_ids)
 
682
        self.set_revision_history(rev_history)
 
683
 
 
684
    @needs_write_lock
 
685
    def set_revision_history(self, rev_history):
680
686
        self.put_controlfile('revision-history', '\n'.join(rev_history))
681
687
 
682
688
    def has_revision(self, revision_id):