/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.py

  • Committer: Martin
  • Date: 2010-05-03 20:55:05 UTC
  • mto: This revision was merged to the branch mainline in revision 5204.
  • Revision ID: gzlist@googlemail.com-20100503205505-okdad5rbf12osway
Include OverflowError in error types bencode translates, as Python 2.4 raises that rather than IndexError in some situations

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
WorkingTree.open(dir).
30
30
"""
31
31
 
32
 
# TODO: Give the workingtree sole responsibility for the working inventory;
33
 
# remove the variable and references to it from the branch.  This may require
34
 
# updating the commit code so as to update the inventory within the working
35
 
# copy, and making sure there's only one WorkingTree for any directory on disk.
36
 
# At the moment they may alias the inventory and have old copies of it in
37
 
# memory.  (Now done? -- mbp 20060309)
38
32
 
39
33
from cStringIO import StringIO
40
34
import os
101
95
from bzrlib.filters import filtered_input_file
102
96
from bzrlib.trace import mutter, note
103
97
from bzrlib.transport.local import LocalTransport
104
 
from bzrlib.progress import ProgressPhase
105
98
from bzrlib.revision import CURRENT_REVISION
106
99
from bzrlib.rio import RioReader, rio_file, Stanza
107
100
from bzrlib.symbol_versioning import (
174
167
        return ''
175
168
 
176
169
 
177
 
class WorkingTree(bzrlib.mutabletree.MutableTree):
 
170
class WorkingTree(bzrlib.mutabletree.MutableTree,
 
171
    bzrdir.ControlComponent):
178
172
    """Working copy tree.
179
173
 
180
174
    The inventory is held in the `Branch` working-inventory, and the
253
247
        self._rules_searcher = None
254
248
        self.views = self._make_views()
255
249
 
 
250
    @property
 
251
    def user_transport(self):
 
252
        return self.bzrdir.user_transport
 
253
 
 
254
    @property
 
255
    def control_transport(self):
 
256
        return self._transport
 
257
 
256
258
    def _detect_case_handling(self):
257
259
        wt_trans = self.bzrdir.get_workingtree_transport(None)
258
260
        try:
1139
1141
        This does not include files that have been deleted in this
1140
1142
        tree. Skips the control directory.
1141
1143
 
1142
 
        :param include_root: if True, do not return an entry for the root
 
1144
        :param include_root: if True, return an entry for the root
1143
1145
        :param from_dir: start from this directory or None for the root
1144
1146
        :param recursive: whether to recurse into subdirectories or not
1145
1147
        """
2258
2260
            last_rev = _mod_revision.NULL_REVISION
2259
2261
        if revision is None:
2260
2262
            revision = self.branch.last_revision()
2261
 
        else:
2262
 
            if revision not in self.branch.revision_history():
2263
 
                raise errors.NoSuchRevision(self.branch, revision)
2264
2263
 
2265
2264
        old_tip = old_tip or _mod_revision.NULL_REVISION
2266
2265