Commit 83632948 authored by Gabriel Monnerat's avatar Gabriel Monnerat

Revert "gitclone: do not force to use 'master' branch when not specified."

This reverts commit 94446fa8.

This commit is blocking to set revision with branch equal master. It
means that the code below is not allowed.

[target]
revision = 1234
branch = master
parent f4804647
......@@ -126,7 +126,7 @@ class Recipe(object):
options.setdefault('location',
os.path.join(buildout['buildout']['parts-directory'], name))
self.repository = options.get('repository')
self.branch = options.get('branch')
self.branch = options.get('branch', GIT_DEFAULT_BRANCH_NAME)
self.revision = options.get('revision')
self.git_command = options.get('git-executable', 'git')
self.name = name
......@@ -140,7 +140,7 @@ class Recipe(object):
# Check if input is correct
if not self.repository:
raise UserError('repository parameter is mandatory.')
if self.revision and self.branch:
if self.revision and self.branch != GIT_DEFAULT_BRANCH_NAME:
# revision and branch options are incompatible
raise UserError('revision and branch (other than master) parameters '
'are set but are incompatible. Please specify only one of them.')
......
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