(self, name, cwd=None)
| 436 | return answer == "" or answer == "Y" or answer == "y" |
| 437 | |
| 438 | def DeleteBranch(self, name, cwd=None): |
| 439 | for line in self.GitBranch(cwd=cwd).splitlines(): |
| 440 | if re.match(r"\*?\s*%s$" % re.escape(name), line): |
| 441 | msg = "Branch %s exists, do you want to delete it?" % name |
| 442 | if self.Confirm(msg): |
| 443 | self.GitDeleteBranch(name, cwd=cwd) |
| 444 | print("Branch %s deleted." % name) |
| 445 | else: |
| 446 | msg = "Can't continue. Please delete branch %s and try again." % name |
| 447 | self.Die(msg) |
| 448 | |
| 449 | def InitialEnvironmentChecks(self, cwd): |
| 450 | # Cancel if this is not a git checkout. |
no test coverage detected