mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-22 20:58:22 +00:00
buildman: Support upstream branch name containing /
Buildman assumes that branch names do not have a slash in them, since slash is used to delimit remotes, etc. This means that a branch called 'WIP/tryme' in remote dm ends up being 'tryme'. Adjust the logic a little, to try to accommodate this. For now, no tests are added for this behaviour. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
be6a249b41
commit
a44cb1f240
1 changed files with 3 additions and 2 deletions
|
@ -147,8 +147,9 @@ def get_upstream(git_dir, branch):
|
||||||
if remote == '.':
|
if remote == '.':
|
||||||
return merge, None
|
return merge, None
|
||||||
elif remote and merge:
|
elif remote and merge:
|
||||||
leaf = merge.split('/')[-1]
|
# Drop the initial refs/heads from merge
|
||||||
return '%s/%s' % (remote, leaf), None
|
leaf = merge.split('/', maxsplit=2)[2:]
|
||||||
|
return '%s/%s' % (remote, '/'.join(leaf)), None
|
||||||
else:
|
else:
|
||||||
raise ValueError("Cannot determine upstream branch for branch "
|
raise ValueError("Cannot determine upstream branch for branch "
|
||||||
"'%s' remote='%s', merge='%s'"
|
"'%s' remote='%s', merge='%s'"
|
||||||
|
|
Loading…
Add table
Reference in a new issue