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

  • Committer: Jelmer Vernooij
  • Date: 2018-05-15 19:05:51 UTC
  • mfrom: (6968 work)
  • mto: (6973.5.1 python3-c)
  • mto: This revision was merged to the branch mainline in revision 6984.
  • Revision ID: jelmer@jelmer.uk-20180515190551-epr5abd0mtxmrehr
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 
41
41
def gather_peeled(refs):
42
42
    ret = {}
43
 
    for k, v in refs.iteritems():
 
43
    for k, v in refs.items():
44
44
        if is_peeled(k):
45
45
            continue
46
46
        try:
60
60
    :return: ref string
61
61
    """
62
62
    if name == "":
63
 
        return "HEAD"
 
63
        return b"HEAD"
64
64
    if not name.startswith("refs/"):
65
65
        return LOCAL_BRANCH_PREFIX + osutils.safe_utf8(name)
66
66
    else:
82
82
    :param ref: Ref
83
83
    :return: A branch name
84
84
    """
85
 
    if ref == "HEAD":
 
85
    if ref == b"HEAD":
86
86
        return u""
87
87
    if ref is None:
88
88
        return ref
158
158
                ref = branch_name_to_ref(getattr(branch, "name", ""))
159
159
                keys.add(ref)
160
160
            try:
161
 
                for tag_name, revid in branch.tags.get_tag_dict().iteritems():
 
161
                for tag_name, revid in branch.tags.get_tag_dict().items():
162
162
                    if repo.has_revision(revid):
163
163
                        keys.add(tag_name_to_ref(tag_name))
164
164
            except errors.TagsNotSupported:
198
198
def remote_refs_dict_to_tag_refs(refs_dict):
199
199
    base = {}
200
200
    peeled = {}
201
 
    for k, v in refs_dict.iteritems():
 
201
    for k, v in refs_dict.items():
202
202
        if is_peeled(k):
203
203
            peeled[k[:-3]] = v
204
204
        else: