/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 reporting of git commits in 'bzr log'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""An adapter between a Git control dir and a Bazaar BzrDir"""
18
18
 
19
 
import os
 
19
import git, os
20
20
 
21
21
import bzrlib
22
22
from bzrlib.lazy_import import lazy_import
37
37
""")
38
38
 
39
39
 
40
 
 
41
40
class GitLock(object):
42
41
    """A lock that thunks through to Git."""
43
42
 
98
97
        if repo._git.heads == []:
99
98
            head = None
100
99
        else:
101
 
            head = repo._git.head()
 
100
            head = repo._git.heads[0].commit.id
102
101
        return branch.GitBranch(self, repo, head, 
103
102
                                    self.root_transport.base, self._lockfiles)
104
103
 
138
137
        """Open this directory.
139
138
 
140
139
        """
141
 
        from bzrlib.plugins.git import git
142
140
        # we dont grok readonly - git isn't integrated with transport.
143
141
        url = transport.base
144
142
        if url.startswith('readonly+'):
175
173
 
176
174
    def initialize_on_transport(self, transport):
177
175
        from bzrlib.transport.local import LocalTransport
178
 
        from bzrlib.plugins.git import git
179
176
 
180
177
        if not isinstance(transport, LocalTransport):
181
178
            raise NotImplementedError(self.initialize,