(message: str)
| 123 | |
| 124 | |
| 125 | def branch(message: str) -> None: |
| 126 | current_commit = get_current_commit() |
| 127 | |
| 128 | # Remove the temporary branch and worktree. |
| 129 | invoke_call("git", "subrepo", "clean", _SUBREPO_NAME) |
| 130 | # Ensure we have all of the subrepo refs. |
| 131 | invoke_call("git", "subrepo", "fetch", _SUBREPO_NAME) |
| 132 | # Populate the subrepo/src/debugpy/_vendored/pydevd branch with new changes. |
| 133 | invoke_call("git", "subrepo", "branch", _SUBREPO_NAME) |
| 134 | |
| 135 | # Enter worktree; changes here are applied to the subrepo/src/debugpy/_vendored/pydevd branch. |
| 136 | with cwd(_SUBREPO_TMP): |
| 137 | # Remove all commits after the last pull and restage the difference. |
| 138 | invoke_call("git", "reset", "--soft", current_commit) |
| 139 | |
| 140 | hasModifiedFile = invoke_output("git", "status","-s").strip() |
| 141 | |
| 142 | if hasModifiedFile: |
| 143 | # Commit changes with a new message. |
| 144 | invoke_call("git", "commit", "-m", message) |
| 145 | |
| 146 | |
| 147 | def push_to_fork(fork_remote: str, fork_branch: str) -> None: |
no test coverage detected
searching dependent graphs…