/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

Merge changes, open index.

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
        return self._gitrepository_class(self, self._lockfiles)
114
114
 
115
115
    def open_workingtree(self, recommend_upgrade=True):
116
 
        if self._git.bare:
117
 
            loc = urlutils.unescape_for_display(self.root_transport.base, 'ascii')
118
 
            raise errors.bzr_errors.NoWorkingTree(loc)
119
 
        else:
 
116
        if (not self._git.bare and 
 
117
            os.path.exists(os.path.join(self._git.controldir(), "index"))):
120
118
            return workingtree.GitWorkingTree(self, self.open_repository(), 
121
119
                                                  self.open_branch())
 
120
        loc = urlutils.unescape_for_display(self.root_transport.base, 'ascii')
 
121
        raise errors.bzr_errors.NoWorkingTree(loc)
122
122
 
123
123
    def create_repository(self, shared=False):
124
124
        return self.open_repository()