Commit 6d067713 authored by Jérome Perrin's avatar Jérome Perrin

testnode: do not fail when switching back to a previously used branch

parent 25cf4933
......@@ -205,6 +205,9 @@ class Updater(object):
self._git('fetch', '--all', '--prune')
if self.branch and \
not ("* %s" % self.branch in self._git('branch').split("\n")):
# Delete branch if already exists
if self.branch in self._git('branch'):
self._git('branch', '-D', self.branch)
self._git('checkout', 'origin/%s' % self.branch, '-b',
self.branch)
self._git('update-index', '--refresh') # see note above
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment