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

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