Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set upstream on all local branches #219

Merged
merged 2 commits into from
Jan 20, 2025
Merged

Conversation

FreddieAkeroyd
Copy link
Member

@FreddieAkeroyd FreddieAkeroyd commented Jan 19, 2025

This sets the upstream for all branches after an install and pulls before making local instrument branch, this ensures any hotfixes post build of release are immediately installed

Comment on lines +50 to +54
subprocess.check_call(
f"cd /d {EPICS_PATH} && FOR /F \"delims=* \" %i IN ('git branch') "
"DO git branch --set-upstream-to=origin/%i %i",
shell=True,
)
Copy link
Contributor

@Tom-Willemsen Tom-Willemsen Jan 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this just git config push.autoSetupRemote true or am I missing something?

And if we can't use the git config flag for some reason, is there a reason this loop needs to be in bat rather than using gitpython to loop in python?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think autSetupRemote means you can push without using -u whereas we want to pull here and need to setup where to pull from. Upsteam is more recent, will it let you do a push first (even though there is nothing to push and upsteam is ahead) which would just setup the remote and then allow a pull?

the only reason i didn't use gitpython here was the rest of the file didn't use it and i was minimising how much i changed

Copy link
Contributor

@Tom-Willemsen Tom-Willemsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will merge for the moment and can discuss at some other date when we're not snowed under with release stuff

@Tom-Willemsen Tom-Willemsen merged commit eb2fa2e into master Jan 20, 2025
3 checks passed
@Tom-Willemsen Tom-Willemsen deleted the set_upstream_on_install branch January 20, 2025 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants