/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 git_dir.py

add setup.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    def unlock(self):
45
45
        pass
46
46
 
47
 
    def peek(self):
48
 
        pass
49
 
 
50
47
 
51
48
class GitLockableFiles(lockable_files.LockableFiles):
52
49
    """Git specific lockable files abstraction."""
83
80
        return True
84
81
 
85
82
    def open_branch(self, ignored=None):
86
 
        """'create' a branch for this dir."""
87
 
        repo = self.open_repository()
88
 
        if repo._git.heads == []:
89
 
            head = None
90
 
        else:
91
 
            head = repo._git.heads[0].commit.id
92
 
        return git_branch.GitBranch(self, repo, head, 
93
 
                                    self.root_transport.base, self._lockfiles)
 
83
        """'crate' a branch for this dir."""
 
84
        return git_branch.GitBranch(self, self._lockfiles)
94
85
 
95
86
    def open_repository(self, shared=False):
96
87
        """'open' a repository for this dir."""
143
134
            raise errors.bzr_errors.NotBranchError(path=transport.base)
144
135
        raise errors.bzr_errors.NotBranchError(path=transport.base)
145
136
 
146
 
    def get_format_description(self):
147
 
        return "Local Git Repository"
148
 
 
149
137
 
150
138
bzrdir.BzrDirFormat.register_control_format(GitBzrDirFormat)