leaf = merge.split('/')[-1]
return '%s/%s' % (remote, leaf), None
else:
- raise ValueError, ("Cannot determine upstream branch for branch "
+ raise ValueError("Cannot determine upstream branch for branch "
"'%s' remote='%s', merge='%s'" % (branch, remote, merge))
result = command.RunPipe([pipe], capture=True, raise_on_error=False,
capture_stderr=True)
if result.return_code != 0:
- raise OSError, 'git checkout (%s): %s' % (pipe, result.stderr)
+ raise OSError('git checkout (%s): %s' % (pipe, result.stderr))
def Clone(git_dir, output_dir):
"""Checkout the selected commit for this build
result = command.RunPipe([pipe], capture=True, cwd=output_dir,
capture_stderr=True)
if result.return_code != 0:
- raise OSError, 'git clone: %s' % result.stderr
+ raise OSError('git clone: %s' % result.stderr)
def Fetch(git_dir=None, work_tree=None):
"""Fetch from the origin repo
pipe.append('fetch')
result = command.RunPipe([pipe], capture=True, capture_stderr=True)
if result.return_code != 0:
- raise OSError, 'git fetch: %s' % result.stderr
+ raise OSError('git fetch: %s' % result.stderr)
def CreatePatches(start, count, series):
"""Create a series of patches from the top of the current branch.
if level > 10:
msg = "Recursive email alias at '%s'" % lookup_name
if raise_on_error:
- raise OSError, msg
+ raise OSError(msg)
else:
print(col.Color(col.RED, msg))
return out_list
if not lookup_name in alias:
msg = "Alias '%s' not found" % lookup_name
if raise_on_error:
- raise ValueError, msg
+ raise ValueError(msg)
else:
print(col.Color(col.RED, msg))
return out_list