/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

  • Committer: John Carr
  • Date: 2009-01-13 20:26:54 UTC
  • mto: (0.217.53 git-serve)
  • mto: This revision was merged to the branch mainline in revision 6960.
  • Revision ID: john.carr@unrouted.co.uk-20090113202654-9hsels0a9r35o7u0
Rename upload-pack and receive-pack so they don't clash with the Git versions

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()