/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 colocated remote branches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
82
82
        from bzrlib.plugins.git.branch import branch_name_to_ref
83
83
        return branch_name_to_ref(name)
84
84
 
 
85
    if bzrlib_version >= (2, 2):
 
86
        def open_branch(self, name=None, ignore_fallbacks=None,
 
87
            unsupported=False):
 
88
            return self._open_branch(name=name,
 
89
                ignore_fallbacks=ignore_fallbacks, unsupported=unsupported)
 
90
    else:
 
91
        def open_branch(self, ignore_fallbacks=None, unsupported=False):
 
92
            return self._open_branch(name=None,
 
93
                ignore_fallbacks=ignore_fallbacks, unsupported=unsupported)
 
94
 
85
95
 
86
96
class LocalGitDir(GitDir):
87
97
    """An adapter to the '.git' dir used by git."""
123
133
        return LocalGitBranch(self, repo, self._branch_name_to_ref(name),
124
134
            self._lockfiles)
125
135
 
126
 
    if bzrlib_version >= (2, 2):
127
 
        open_branch = _open_branch
128
 
    else:
129
 
        def open_branch(self, ignore_fallbacks=None, unsupported=False):
130
 
            return self._open_branch(name=None,
131
 
                ignore_fallbacks=ignore_fallbacks, unsupported=unsupported)
132
 
 
133
136
    def destroy_branch(self, name=None):
134
137
        del self._git.refs[self._branch_name_to_ref(name)]
135
138