/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: 2018-11-11 04:08:32 UTC
  • mto: (7143.16.20 even-more-cleanups)
  • mto: This revision was merged to the branch mainline in revision 7175.
  • Revision ID: jelmer@jelmer.uk-20181111040832-nsljjynzzwmznf3h
Run autopep8.

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): return x.startswith(LOCAL_TAG_PREFIX)
 
38
 
 
39
 
 
40
def is_head(x): return x.startswith(LOCAL_BRANCH_PREFIX)
 
41
 
 
42
 
 
43
def is_peeled(x): return x.endswith(ANNOTATED_TAG_SUFFIX)
39
44
 
40
45
 
41
46
def gather_peeled(refs):
44
49
        if is_peeled(k):
45
50
            continue
46
51
        try:
47
 
            peeled = refs[k+ANNOTATED_TAG_SUFFIX]
 
52
            peeled = refs[k + ANNOTATED_TAG_SUFFIX]
48
53
            unpeeled = v
49
54
        except KeyError:
50
55
            peeled = v
108
113
 
109
114
    def set_symbolic_ref(self, name, other):
110
115
        if name == b"HEAD":
111
 
            pass # FIXME: Switch default branch
 
116
            pass  # FIXME: Switch default branch
112
117
        else:
113
118
            raise NotImplementedError(
114
119
                "Symbolic references not supported for anything other than "
169
174
        try:
170
175
            branch_name = ref_to_branch_name(ref)
171
176
        except ValueError:
172
 
            return # FIXME: Cope with tags!
 
177
            return  # FIXME: Cope with tags!
173
178
        self.dir.destroy_branch(branch_name)
174
179
 
175
180
    def __setitem__(self, ref, sha):