Fine-grained force_switch to branch. We cannot force every time because of previous_gdb.sum

This commit is contained in:
Sergio Durigan Junior 2015-07-25 18:42:30 -04:00
parent 36c02e149c
commit f09af5c266
2 changed files with 4 additions and 4 deletions

View file

@ -30,7 +30,7 @@ class CopyOldGDBSumFile (ShellCommand):
return SUCCESS
# Switch to the right branch inside the BUILDER repo
switch_to_branch (builder, branch)
switch_to_branch (builder, branch, force_switch = True)
try:
copyfile ("%s/%s/gdb.sum" % (wb, builder),
@ -57,7 +57,7 @@ class GdbCatSumfileCommand(ShellCommand):
branch = 'master'
# Switch to the right branch inside the BUILDER repo
switch_to_branch (builder, branch)
switch_to_branch (builder, branch, force_switch = False)
parser = DejaResults()
cur_results = parser.read_sum_text(self.getLog('stdio').getText())

View file

@ -23,7 +23,7 @@ log files of the COMMIT that was tested."""
return None
def switch_to_branch (builder, branch):
def switch_to_branch (builder, branch, force_switch = False):
"""Switch (or create) to BRANCH on BUILDER repo."""
repodir = os.path.join (get_web_base (), builder)
repo = git.Repo.init (path = repodir)
@ -42,7 +42,7 @@ def switch_to_branch (builder, branch):
else:
myhead = repo.heads[branch]
myhead.checkout (force = True)
myhead.checkout (force = force_switch)
class SaveGDBResults (ShellCommand):
name = 'save build results'