diff --git a/subcmds/upload.py b/subcmds/upload.py index d341458d..0ad3ce26 100644 --- a/subcmds/upload.py +++ b/subcmds/upload.py @@ -278,8 +278,9 @@ Gerrit Code Review: https://www.gerritcodereview.com/ script = [] script.append('# Uncomment the branches to upload:') for project, avail in pending: + project_path = project.RelPath(local=opt.this_manifest_only) script.append('#') - script.append('# project %s/:' % project.RelPath(local=opt.this_manifest_only)) + script.append(f'# project {project_path}/:') b = {} for branch in avail: @@ -302,8 +303,8 @@ Gerrit Code Review: https://www.gerritcodereview.com/ script.append('# %s' % commit) b[name] = branch - projects[project.RelPath(local=opt.this_manifest_only)] = project - branches[project.name] = b + projects[project_path] = project + branches[project_path] = b script.append('') script = Editor.EditString("\n".join(script)).split("\n") @@ -328,9 +329,10 @@ Gerrit Code Review: https://www.gerritcodereview.com/ name = m.group(1) if not project: _die('project for branch %s not in script', name) - branch = branches[project.name].get(name) + project_path = project.RelPath(local=opt.this_manifest_only) + branch = branches[project_path].get(name) if not branch: - _die('branch %s not in %s', name, project.RelPath(local=opt.this_manifest_only)) + _die('branch %s not in %s', name, project_path) todo.append(branch) if not todo: _die("nothing uncommented for upload")