| 459 | self.Die("Please set your EDITOR environment variable, you'll need it.") |
| 460 | |
| 461 | def CommonPrepare(self): |
| 462 | # Check for a clean workdir. |
| 463 | if not self.GitIsWorkdirClean(): # pragma: no cover |
| 464 | self.Die("Workspace is not clean. Please commit or undo your changes.") |
| 465 | |
| 466 | # Checkout main in case the script was left on a work branch. |
| 467 | self.GitCheckout('origin/main') |
| 468 | |
| 469 | # Fetch unfetched revisions. |
| 470 | self.vc.Fetch() |
| 471 | |
| 472 | def PrepareBranch(self): |
| 473 | # Delete the branch that will be created later if it exists already. |