Fine-grained force_switch to branch. We cannot force every time because of previous_gdb.sum
This commit is contained in:
parent
36c02e149c
commit
f09af5c266
2 changed files with 4 additions and 4 deletions
|
@ -30,7 +30,7 @@ class CopyOldGDBSumFile (ShellCommand):
|
||||||
return SUCCESS
|
return SUCCESS
|
||||||
|
|
||||||
# Switch to the right branch inside the BUILDER repo
|
# Switch to the right branch inside the BUILDER repo
|
||||||
switch_to_branch (builder, branch)
|
switch_to_branch (builder, branch, force_switch = True)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
copyfile ("%s/%s/gdb.sum" % (wb, builder),
|
copyfile ("%s/%s/gdb.sum" % (wb, builder),
|
||||||
|
@ -57,7 +57,7 @@ class GdbCatSumfileCommand(ShellCommand):
|
||||||
branch = 'master'
|
branch = 'master'
|
||||||
|
|
||||||
# Switch to the right branch inside the BUILDER repo
|
# Switch to the right branch inside the BUILDER repo
|
||||||
switch_to_branch (builder, branch)
|
switch_to_branch (builder, branch, force_switch = False)
|
||||||
|
|
||||||
parser = DejaResults()
|
parser = DejaResults()
|
||||||
cur_results = parser.read_sum_text(self.getLog('stdio').getText())
|
cur_results = parser.read_sum_text(self.getLog('stdio').getText())
|
||||||
|
|
|
@ -23,7 +23,7 @@ log files of the COMMIT that was tested."""
|
||||||
|
|
||||||
return None
|
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."""
|
"""Switch (or create) to BRANCH on BUILDER repo."""
|
||||||
repodir = os.path.join (get_web_base (), builder)
|
repodir = os.path.join (get_web_base (), builder)
|
||||||
repo = git.Repo.init (path = repodir)
|
repo = git.Repo.init (path = repodir)
|
||||||
|
@ -42,7 +42,7 @@ def switch_to_branch (builder, branch):
|
||||||
else:
|
else:
|
||||||
myhead = repo.heads[branch]
|
myhead = repo.heads[branch]
|
||||||
|
|
||||||
myhead.checkout (force = True)
|
myhead.checkout (force = force_switch)
|
||||||
|
|
||||||
class SaveGDBResults (ShellCommand):
|
class SaveGDBResults (ShellCommand):
|
||||||
name = 'save build results'
|
name = 'save build results'
|
||||||
|
|
Loading…
Reference in a new issue