From 66be90722a931fe7f4bdcc194e11a9c13ef5719e Mon Sep 17 00:00:00 2001 From: Frederic Massart Date: Fri, 22 Feb 2013 13:43:03 +0800 Subject: [PATCH] Exit does not fail when branch exists --- lib/workplace.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/workplace.py b/lib/workplace.py index 8c4ceff..51478ff 100644 --- a/lib/workplace.py +++ b/lib/workplace.py @@ -137,7 +137,7 @@ class Workplace(object): else: track = '%s/MOODLE_%s_STABLE' % (C.get('upstreamRemote'), version) branch = 'MOODLE_%s_STABLE' % version - if not repo.createBranch(branch, track): + if not repo.hasBranch(branch) and not repo.createBranch(branch, track): debug('Could not create branch %s tracking %s' % (branch, track)) else: repo.checkout(branch) -- 2.11.0