/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 some tests now that working trees are supported.

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
        return self._gitrepository_class(self, self._lockfiles)
122
122
 
123
123
    def open_workingtree(self, recommend_upgrade=True):
124
 
        loc = urlutils.unescape_for_display(self.root_transport.base, 'ascii')
125
124
        if (not self._git.bare and 
126
125
            os.path.exists(os.path.join(self._git.controldir(), "index"))):
127
126
            return workingtree.GitWorkingTree(self, self.open_repository(), 
128
127
                                                  self.open_branch())
 
128
        loc = urlutils.unescape_for_display(self.root_transport.base, 'ascii')
 
129
        raise errors.bzr_errors.NoWorkingTree(loc)
129
130
 
130
131
    def create_repository(self, shared=False):
131
132
        return self.open_repository()