/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: Canonical.com Patch Queue Manager
  • Date: 2006-07-17 05:13:15 UTC
  • mfrom: (1865.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060717051315-a684fdb1a42cd989
(robertc) Some trivial cleanups to workingtree.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
from bzrlib import bzrdir, errors, osutils, urlutils
55
55
from bzrlib.atomicfile import AtomicFile
 
56
import bzrlib.branch
56
57
from bzrlib.conflicts import Conflict, ConflictList, CONFLICT_SUFFIXES
57
58
from bzrlib.decorators import needs_read_lock, needs_write_lock
58
59
from bzrlib.errors import (BzrCheckError,
95
96
        DEPRECATED_PARAMETER,
96
97
        zero_eight,
97
98
        )
98
 
 
99
 
from bzrlib.textui import show_status
100
 
import bzrlib.tree
 
99
from bzrlib.trace import mutter, note
101
100
from bzrlib.transform import build_tree
102
 
from bzrlib.trace import mutter, note
103
101
from bzrlib.transport import get_transport
104
102
from bzrlib.transport.local import LocalTransport
 
103
from bzrlib.textui import show_status
 
104
import bzrlib.tree
105
105
import bzrlib.ui
106
106
import bzrlib.xml5
107
107
 
268
268
            # share control object
269
269
            self._control_files = self.branch.control_files
270
270
        else:
271
 
            # only ready for format 3
272
 
            assert isinstance(self._format, WorkingTreeFormat3)
 
271
            # assume all other formats have their own control files.
273
272
            assert isinstance(_control_files, LockableFiles), \
274
273
                    "_control_files must be a LockableFiles, not %r" \
275
274
                    % _control_files
1724
1723
          files, separate from the BzrDir format
1725
1724
        - modifies the hash cache format
1726
1725
        - is new in bzr 0.8
1727
 
        - uses a LockDir to guard access to the repository
 
1726
        - uses a LockDir to guard access for writes.
1728
1727
    """
1729
1728
 
1730
1729
    def get_format_string(self):
1794
1793
            raise NotImplementedError
1795
1794
        if not isinstance(a_bzrdir.transport, LocalTransport):
1796
1795
            raise errors.NotLocalUrl(a_bzrdir.transport.base)
1797
 
        control_files = self._open_control_files(a_bzrdir)
 
1796
        return self._open(a_bzrdir, self._open_control_files(a_bzrdir))
 
1797
 
 
1798
    def _open(self, a_bzrdir, control_files):
 
1799
        """Open the tree itself.
 
1800
        
 
1801
        :param a_bzrdir: the dir for the tree.
 
1802
        :param control_files: the control files for the tree.
 
1803
        """
1798
1804
        return WorkingTree3(a_bzrdir.root_transport.local_abspath('.'),
1799
1805
                           _internal=True,
1800
1806
                           _format=self,