~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

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)
32
38
 
33
39
from cStringIO import StringIO
34
40
import os
95
101
from bzrlib.filters import filtered_input_file
96
102
from bzrlib.trace import mutter, note
97
103
from bzrlib.transport.local import LocalTransport
 
104
from bzrlib.progress import ProgressPhase
98
105
from bzrlib.revision import CURRENT_REVISION
99
106
from bzrlib.rio import RioReader, rio_file, Stanza
100
107
from bzrlib.symbol_versioning import (
167
174
        return ''
168
175
 
169
176
 
170
 
class WorkingTree(bzrlib.mutabletree.MutableTree,
171
 
    bzrdir.ControlComponent):
 
177
class WorkingTree(bzrlib.mutabletree.MutableTree):
172
178
    """Working copy tree.
173
179
 
174
180
    The inventory is held in the `Branch` working-inventory, and the
247
253
        self._rules_searcher = None
248
254
        self.views = self._make_views()
249
255
 
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
 
 
258
256
    def _detect_case_handling(self):
259
257
        wt_trans = self.bzrdir.get_workingtree_transport(None)
260
258
        try:
2260
2258
            last_rev = _mod_revision.NULL_REVISION
2261
2259
        if revision is None:
2262
2260
            revision = self.branch.last_revision()
 
2261
        else:
 
2262
            if revision not in self.branch.revision_history():
 
2263
                raise errors.NoSuchRevision(self.branch, revision)
2263
2264
 
2264
2265
        old_tip = old_tip or _mod_revision.NULL_REVISION
2265
2266