/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 breezy/git/refs.py

  • Committer: Jelmer Vernooij
  • Date: 2019-03-04 00:16:27 UTC
  • mfrom: (7293 work)
  • mto: This revision was merged to the branch mainline in revision 7318.
  • Revision ID: jelmer@jelmer.uk-20190304001627-v6u7o6pf97tukhek
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    revision as _mod_revision,
34
34
    )
35
35
 
36
 
is_tag = lambda x: x.startswith(LOCAL_TAG_PREFIX)
37
 
is_head = lambda x: x.startswith(LOCAL_BRANCH_PREFIX)
38
 
is_peeled = lambda x: x.endswith(ANNOTATED_TAG_SUFFIX)
 
36
 
 
37
def is_tag(x):
 
38
    return x.startswith(LOCAL_TAG_PREFIX)
 
39
 
 
40
 
 
41
def is_head(x):
 
42
    return x.startswith(LOCAL_BRANCH_PREFIX)
 
43
 
 
44
 
 
45
def is_peeled(x):
 
46
    return x.endswith(ANNOTATED_TAG_SUFFIX)
39
47
 
40
48
 
41
49
def gather_peeled(refs):
44
52
        if is_peeled(k):
45
53
            continue
46
54
        try:
47
 
            peeled = refs[k+ANNOTATED_TAG_SUFFIX]
 
55
            peeled = refs[k + ANNOTATED_TAG_SUFFIX]
48
56
            unpeeled = v
49
57
        except KeyError:
50
58
            peeled = v
108
116
 
109
117
    def set_symbolic_ref(self, name, other):
110
118
        if name == b"HEAD":
111
 
            pass # FIXME: Switch default branch
 
119
            pass  # FIXME: Switch default branch
112
120
        else:
113
121
            raise NotImplementedError(
114
122
                "Symbolic references not supported for anything other than "
169
177
        try:
170
178
            branch_name = ref_to_branch_name(ref)
171
179
        except ValueError:
172
 
            return # FIXME: Cope with tags!
 
180
            return  # FIXME: Cope with tags!
173
181
        self.dir.destroy_branch(branch_name)
174
182
 
175
183
    def __setitem__(self, ref, sha):