Remove debugging statements

This commit is contained in:
David Murphy 2024-12-20 13:58:29 -07:00 committed by Daniel Wozniak
parent 4a0ddd4c5a
commit 2656f446c7

View file

@ -528,7 +528,6 @@ class GitProvider:
if HAS_PSUTIL:
cur_pid = os.getpid()
process = psutil.Process(cur_pid)
dgm_process_dir = dir(process)
cache_dir = self.opts.get("cachedir", None)
gitfs_active = self.opts.get("gitfs_remotes", None)
if cache_dir and gitfs_active:
@ -1780,9 +1779,7 @@ class Pygit2(GitProvider):
return None
try:
## DGM head_sha = self.peel(local_head).hex
head_sha = str(self.peel(local_head).id)
print(f"pygit2 checkout, head_sha '{head_sha}'", flush=True)
except AttributeError:
# Shouldn't happen, but just in case a future pygit2 API change
# breaks things, avoid a traceback and log an error.
@ -1841,14 +1838,9 @@ class Pygit2(GitProvider):
self.repo.create_reference(local_ref, pygit2_id)
try:
## DGM target_sha = self.peel(self.repo.lookup_reference(remote_ref)).hex
target_sha = str(
self.peel(self.repo.lookup_reference(remote_ref)).id
)
print(
f"pygit2 _perform_checkout, target_sha '{target_sha}'",
flush=True,
)
except KeyError:
log.error(
@ -1930,21 +1922,11 @@ class Pygit2(GitProvider):
else:
try:
# If no AttributeError raised, this is an annotated tag
## DGM tag_sha = tag_obj.target.hex
tag_sha = str(tag_obj.target.id)
print(
f"pygit2 _perform_checkout for tag_obj.target, tag_sha '{tag_sha}'",
flush=True,
)
except AttributeError:
try:
## DGM tag_sha = tag_obj.hex
tag_sha = str(tag_obj.id)
print(
f"pygit2 _perform_checkout for tag_obj, tag_sha '{tag_sha}'",
flush=True,
)
except AttributeError:
# Shouldn't happen, but could if a future pygit2
# API change breaks things.
@ -2298,13 +2280,7 @@ class Pygit2(GitProvider):
blob = None
break
if isinstance(blob, pygit2.Blob):
## DGM return blob, blob.hex, mode
dgm_blob_hex_eq = str(blob.id)
print(
f"pygit2 find_file, old blob.hex now str blob.id '{dgm_blob_hex_eq}'",
flush=True,
)
return blob, dgm_blob_hex_eq, mode
return blob, str(blob.id), mode
return None, None, None
def get_tree_from_branch(self, ref):