/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

Default to non-bare repositories when initializing a control directory.

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
    def open_workingtree(self, recommend_upgrade=True):
151
151
        if not self._git.bare:
152
152
            from dulwich.errors import NoIndexPresent
 
153
            repo = self.open_repository()
153
154
            try:
154
 
                from bzrlib.plugins.git.workingtree import GitWorkingTree
155
 
                return GitWorkingTree(self, self.open_repository(),
156
 
                                                      self.open_branch())
 
155
                index = repo._git.open_index()
157
156
            except NoIndexPresent:
158
157
                pass
 
158
            else:
 
159
                from bzrlib.plugins.git.workingtree import GitWorkingTree
 
160
                return GitWorkingTree(self, repo, self.open_branch(), index)
159
161
        loc = urlutils.unescape_for_display(self.root_transport.base, 'ascii')
160
162
        raise bzr_errors.NoWorkingTree(loc)
161
163