~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/weave_fmt/workingtree.py

  • Committer: Martin Packman
  • Date: 2012-01-05 09:50:04 UTC
  • mfrom: (6424 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6426.
  • Revision ID: martin.packman@canonical.com-20120105095004-mia9xb7y0efmto0v
Merge bzr.dev to resolve conflicts in bzrlib.builtins

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Weave-era working tree objects."""
18
18
 
 
19
from __future__ import absolute_import
 
20
 
19
21
from cStringIO import StringIO
20
22
 
21
23
from bzrlib import (
30
32
from bzrlib.decorators import needs_read_lock
31
33
from bzrlib.transport.local import LocalTransport
32
34
from bzrlib.workingtree import (
33
 
    InventoryWorkingTree,
34
35
    WorkingTreeFormat,
35
36
    )
 
37
from bzrlib.workingtree_3 import (
 
38
    PreDirStateWorkingTree,
 
39
    )
36
40
 
37
41
 
38
42
def get_conflicted_stem(path):
135
139
        return wt
136
140
 
137
141
 
138
 
class WorkingTree2(InventoryWorkingTree):
 
142
class WorkingTree2(PreDirStateWorkingTree):
139
143
    """This is the Format 2 working tree.
140
144
 
141
145
    This was the first weave based working tree.
143
147
     - uses the branch last-revision.
144
148
    """
145
149
 
146
 
    def __init__(self, *args, **kwargs):
147
 
        super(WorkingTree2, self).__init__(*args, **kwargs)
 
150
    def __init__(self, basedir, *args, **kwargs):
 
151
        super(WorkingTree2, self).__init__(basedir, *args, **kwargs)
148
152
        # WorkingTree2 has more of a constraint that self._inventory must
149
153
        # exist. Because this is an older format, we don't mind the overhead
150
154
        # caused by the extra computation here.
158
162
        """Return the references needed to perform a check of this tree."""
159
163
        return [('trees', self.last_revision())]
160
164
 
 
165
 
161
166
    def lock_tree_write(self):
162
167
        """See WorkingTree.lock_tree_write().
163
168