MCPcopy Index your code
hub / github.com/nodejs/node / DeleteBranch

Method DeleteBranch

deps/v8/tools/release/common_includes.py:438–447  ·  view source on GitHub ↗
(self, name, cwd=None)

Source from the content-addressed store, hash-verified

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.

Callers 3

PrepareBranchMethod · 0.95
RunStepMethod · 0.80
RunStepMethod · 0.80

Calls 8

ConfirmMethod · 0.95
DieMethod · 0.95
GitBranchMethod · 0.80
GitDeleteBranchMethod · 0.80
matchMethod · 0.65
printFunction · 0.50
splitlinesMethod · 0.45
escapeMethod · 0.45

Tested by

no test coverage detected