diff --git a/lib/gdbcommand.py b/lib/gdbcommand.py index ab5a837..ab6911e 100644 --- a/lib/gdbcommand.py +++ b/lib/gdbcommand.py @@ -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()) diff --git a/lib/gdbgitdb.py b/lib/gdbgitdb.py index 273f054..46ea086 100644 --- a/lib/gdbgitdb.py +++ b/lib/gdbgitdb.py @@ -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'