~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: John Arbash Meinel
  • Date: 2006-01-03 21:23:43 UTC
  • mto: (1185.65.19 storage)
  • mto: This revision was merged to the branch mainline in revision 1550.
  • Revision ID: john@arbash-meinel.com-20060103212343-7d62a25f4a6e4ac8
Changed LockableFiles to take the root directory directly. Moved mode information into LockableFiles instead of Branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
 
53
53
class Repository(object):
54
54
 
55
 
    def __init__(self, transport, branch_format, 
56
 
                 dir_mode=None, file_mode=None):
 
55
    def __init__(self, transport, branch_format):
57
56
        object.__init__(self)
58
 
        self.control_files = LockableFiles(transport, bzrlib.BZRDIR, 'README')
 
57
        self.control_files = LockableFiles(transport.clone(bzrlib.BZRDIR), 'README')
 
58
 
 
59
        dir_mode = self.control_files._dir_mode
 
60
        file_mode = self.control_files._file_mode
 
61
 
59
62
        def get_weave(name, prefixed=False):
60
 
            relpath = self.control_files._rel_controlfilename(unicode(name))
 
63
            if name:
 
64
                name = bzrlib.BZRDIR + '/' + unicode(name)
 
65
            else:
 
66
                name = bzrlib.BZRDIR
 
67
            relpath = self.control_files._escape(name)
61
68
            weave_transport = transport.clone(relpath)
62
69
            ws = WeaveStore(weave_transport, prefixed=prefixed,
63
70
                            dir_mode=dir_mode,
71
78
            # or entirely uncompressed is tidy, but breaks upgrade from 
72
79
            # some existing branches where there's a mixture; we probably 
73
80
            # still want the option to look for both.
74
 
            name = unicode(name)
75
 
            relpath = self.control_files._rel_controlfilename(name)
 
81
            if name:
 
82
                name = bzrlib.BZRDIR + '/' + unicode(name)
 
83
            else:
 
84
                name = bzrlib.BZRDIR
 
85
            relpath = self.control_files._escape(name)
76
86
            store = TextStore(transport.clone(relpath),
77
87
                              prefixed=prefixed, compressed=compressed,
78
88
                              dir_mode=dir_mode,