When running the upload script, look for uncommitted changes and check before upload if necessary.#343
Conversation
| if has_uncommitted_changes(): | ||
| reply = input( | ||
| "\n\nWARNING: There are local uncommitted changes. Are you sure you wish to proceed? (y/N):" | ||
| ).lower().strip() | ||
| if not reply or reply[0] != "y": | ||
| sys.exit(1) | ||
|
|
There was a problem hiding this comment.
I think we should not allow it to proceed if there are uncommitted changes.
There could be a situation where the keyboard was accidentally and quickly typed "y", without reading the prompt.
I'd rather have the user clear all uncommitted changes first before pushing to RS. That way, we can be stricter in guaranteeing the code being pushed is from the approved Phab review without anything extra added.
There was a problem hiding this comment.
I think there's cases that we do want to potentially allow this - e.g. a quick test on dev or staging of something. Forcing commit is additional overhead, though I respect we are trying to be careful here.
How about not allowing uncommitted at all on production, but allowing it for dev & stage?
There was a problem hiding this comment.
Sounds good! Let's not allow uncommitted only on production.
…k before upload if necessary.
d591157 to
b1b6eec
Compare
If uncommitted changes are detected, the developer will be prompted and has to enter "y" before they can proceed.