Skip to content

Commit 2d957e0

Browse files
authored
Add more debugging to ensure_sha (#422)
* add more debugging to ensure_sha * lint
1 parent 4aa6943 commit 2d957e0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

jupyter_releaser/util.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -598,11 +598,13 @@ def ensure_sha():
598598
"""Ensure the sha of the remote branch matches the expected sha"""
599599
current_sha = os.environ["RH_CURRENT_SHA"]
600600
branch = os.environ["RH_BRANCH"]
601+
log("Ensuring sha...")
601602
remote_name = get_remote_name(False)
602-
run(f"git fetch {remote_name} {branch}")
603-
sha = run(f"git rev-parse {remote_name}/{branch}")
603+
run("git remote -v", echo=True)
604+
run(f"git fetch {remote_name} {branch}", echo=True)
605+
sha = run(f"git rev-parse {remote_name}/{branch}", echo=True)
604606
if sha != current_sha:
605-
raise ValueError(f"{branch} is ahead of expected sha {current_sha}")
607+
raise ValueError(f"{branch} current sha {sha} is not equal to expected sha {current_sha}")
606608

607609

608610
def get_gh_object(dry_run=False, **kwargs):

0 commit comments

Comments
 (0)