commit - 7e80b89c28fc52536c8d4cd8a1df02f8598a545a
commit + beb8f959f7e4e80360854f0969331b48974ff386
blob - 71de0a97318ce099eeb356458c6f8e9153a0ef9a
blob + 4a2a83350706f7cfa28e7581baf9d6a1c97aefbb
--- dulwich/client.py
+++ dulwich/client.py
)
from dulwich.refs import (
read_info_refs,
- ANNOTATED_TAG_SUFFIX,
+ PEELED_TAG_SUFFIX,
_import_remote_refs,
)
from dulwich.repo import Repo
"""
missing = set(wants) - {
- v for (k, v) in refs.items() if not k.endswith(ANNOTATED_TAG_SUFFIX)
+ v for (k, v) in refs.items() if not k.endswith(PEELED_TAG_SUFFIX)
}
if missing:
raise InvalidWants(missing)
blob - ccef377c35774ca0f40daa705116704d70fdbffa
blob + 6a9baac77f06b53c286baa5b450324ddfdd6dcfc
--- dulwich/object_store.py
+++ dulwich/object_store.py
PACK_SPOOL_FILE_MAX_SIZE,
)
from dulwich.protocol import DEPTH_INFINITE
-from dulwich.refs import ANNOTATED_TAG_SUFFIX, Ref
+from dulwich.refs import PEELED_TAG_SUFFIX, Ref
INFODIR = "info"
PACKDIR = "pack"
sha
for (ref, sha) in refs.items()
if (sha not in self or _want_deepen(sha))
- and not ref.endswith(ANNOTATED_TAG_SUFFIX)
+ and not ref.endswith(PEELED_TAG_SUFFIX)
and not sha == ZERO_SHA
]
blob - 31d590f8a356e3a7829dfdf267e04c359bac0dcc
blob + b2322a04fe90cb9954eb03a8e03b56bdc5577c59
--- dulwich/refs.py
+++ dulwich/refs.py
LOCAL_BRANCH_PREFIX = b"refs/heads/"
LOCAL_TAG_PREFIX = b"refs/tags/"
BAD_REF_CHARS = set(b"\177 ~^:?*[")
-ANNOTATED_TAG_SUFFIX = b"^{}"
+PEELED_TAG_SUFFIX = b"^{}"
+# For backwards compatibility
+ANNOTATED_TAG_SUFFIX = PEELED_TAG_SUFFIX
+
class SymrefLoop(Exception):
"""There is a loop between one or more symrefs."""
self._peeled = {}
for line in f.readlines():
sha, name = line.rstrip(b"\n").split(b"\t")
- if name.endswith(ANNOTATED_TAG_SUFFIX):
+ if name.endswith(PEELED_TAG_SUFFIX):
name = name[:-3]
if not check_ref_format(name):
raise ValueError("invalid ref name %r" % name)
peeled = peel_sha(store, sha)
yield o.id + b"\t" + name + b"\n"
if o.id != peeled.id:
- yield peeled.id + b"\t" + name + ANNOTATED_TAG_SUFFIX + b"\n"
+ yield peeled.id + b"\t" + name + PEELED_TAG_SUFFIX + b"\n"
def is_local_branch(x):
return {
ref: sha
for (ref, sha) in refs.items()
- if not ref.endswith(ANNOTATED_TAG_SUFFIX)
+ if not ref.endswith(PEELED_TAG_SUFFIX)
}
tags = {
n[len(LOCAL_TAG_PREFIX) :]: v
for (n, v) in stripped_refs.items()
- if n.startswith(LOCAL_TAG_PREFIX) and not n.endswith(ANNOTATED_TAG_SUFFIX)
+ if n.startswith(LOCAL_TAG_PREFIX) and not n.endswith(PEELED_TAG_SUFFIX)
}
refs_container.import_refs(LOCAL_TAG_PREFIX, tags, message=message, prune=prune_tags)
blob - 3cd323f5a44bb429b2c8fd3d7c13d18c6f61d887
blob + 0c65477af374c2cd9261805d2ad59f04d763b690
--- dulwich/repo.py
+++ dulwich/repo.py
continue
else:
if isinstance(obj, Tag):
- refs[ref + ANNOTATED_TAG_SUFFIX] = obj.object[1]
+ refs[ref + PEELED_TAG_SUFFIX] = obj.object[1]
refs[ref] = sha
wants = determine_wants(refs)
blob - 9b045eeddbada1386098f6c3630b629a693cb6ff
blob + 95f570dc709461390beffcd545c4379d5fb0e25b
--- dulwich/server.py
+++ dulwich/server.py
)
from dulwich.refs import (
RefsContainer,
- ANNOTATED_TAG_SUFFIX,
+ PEELED_TAG_SUFFIX,
write_info_refs,
)
from dulwich.repo import (
self.proto.write_pkt_line(line)
if peeled_sha != sha:
self.proto.write_pkt_line(
- format_ref_line(ref + ANNOTATED_TAG_SUFFIX, peeled_sha))
+ format_ref_line(ref + PEELED_TAG_SUFFIX, peeled_sha))
# i'm done..
self.proto.write_pkt_line(None)