/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_3.py

  • Committer: Jelmer Vernooij
  • Date: 2012-01-02 14:27:58 UTC
  • mfrom: (6410 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6441.
  • Revision ID: jelmer@samba.org-20120102142758-hl7xrn7m5hjhecdv
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
"""
20
20
 
 
21
from __future__ import absolute_import
 
22
 
21
23
import errno
22
24
 
23
25
from bzrlib import (
37
39
from bzrlib.transport.local import LocalTransport
38
40
from bzrlib.workingtree import (
39
41
    InventoryWorkingTree,
40
 
    WorkingTreeFormat,
 
42
    WorkingTreeFormatMetaDir,
41
43
    )
42
44
 
43
45
 
136
138
            self.branch.unlock()
137
139
 
138
140
 
139
 
class WorkingTreeFormat3(WorkingTreeFormat):
 
141
class WorkingTreeFormat3(WorkingTreeFormatMetaDir):
140
142
    """The second working tree format updated to record a format marker.
141
143
 
142
144
    This format:
154
156
 
155
157
    supports_versioned_directories = True
156
158
 
157
 
    def get_format_string(self):
 
159
    @classmethod
 
160
    def get_format_string(cls):
158
161
        """See WorkingTreeFormat.get_format_string()."""
159
162
        return "Bazaar-NG Working Tree format 3"
160
163
 
192
195
        control_files = self._open_control_files(a_bzrdir)
193
196
        control_files.create_lock()
194
197
        control_files.lock_write()
195
 
        transport.put_bytes('format', self.get_format_string(),
 
198
        transport.put_bytes('format', self.as_string(),
196
199
            mode=a_bzrdir._get_file_mode())
197
200
        if from_branch is not None:
198
201
            branch = from_branch
259
262
                                _format=self,
260
263
                                _bzrdir=a_bzrdir,
261
264
                                _control_files=control_files)
262
 
 
263
 
    def __str__(self):
264
 
        return self.get_format_string()