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

Fix tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
    )
28
28
 
29
29
lazy_import(globals(), """
30
 
from bzrlib.lockable_files import TransportLock
 
30
from bzrlib.lockable_files import (
 
31
    TransportLock,
 
32
    )
31
33
from bzrlib.plugins.git import (
32
34
    errors,
33
35
    branch,
66
68
        self._lock = lock
67
69
        self._transaction = None
68
70
        self._lock_mode = None
 
71
        self._transport = transport
69
72
        self._lock_count = 0
70
 
        self._transport = transport
71
73
 
72
74
 
73
75
class GitDir(bzrdir.BzrDir):
115
117
        return self._gitrepository_class(self, self._lockfiles)
116
118
 
117
119
    def open_workingtree(self, recommend_upgrade=True):
 
120
        loc = urlutils.unescape_for_display(self.root_transport.base, 'ascii')
 
121
        raise errors.bzr_errors.NoWorkingTree(loc)
118
122
        if (not self._git.bare and 
119
123
            os.path.exists(os.path.join(self._git.controldir(), "index"))):
120
124
            return workingtree.GitWorkingTree(self, self.open_repository(), 
121
125
                                                  self.open_branch())
122
 
        loc = urlutils.unescape_for_display(self.root_transport.base, 'ascii')
123
 
        raise errors.bzr_errors.NoWorkingTree(loc)
124
126
 
125
127
    def create_repository(self, shared=False):
126
128
        return self.open_repository()