diff options
-rw-r--r-- | subcmds/upload.py | 12 |
1 files changed, 7 insertions, 5 deletions
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/ | |||
278 | script = [] | 278 | script = [] |
279 | script.append('# Uncomment the branches to upload:') | 279 | script.append('# Uncomment the branches to upload:') |
280 | for project, avail in pending: | 280 | for project, avail in pending: |
281 | project_path = project.RelPath(local=opt.this_manifest_only) | ||
281 | script.append('#') | 282 | script.append('#') |
282 | script.append('# project %s/:' % project.RelPath(local=opt.this_manifest_only)) | 283 | script.append(f'# project {project_path}/:') |
283 | 284 | ||
284 | b = {} | 285 | b = {} |
285 | for branch in avail: | 286 | for branch in avail: |
@@ -302,8 +303,8 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
302 | script.append('# %s' % commit) | 303 | script.append('# %s' % commit) |
303 | b[name] = branch | 304 | b[name] = branch |
304 | 305 | ||
305 | projects[project.RelPath(local=opt.this_manifest_only)] = project | 306 | projects[project_path] = project |
306 | branches[project.name] = b | 307 | branches[project_path] = b |
307 | script.append('') | 308 | script.append('') |
308 | 309 | ||
309 | script = Editor.EditString("\n".join(script)).split("\n") | 310 | script = Editor.EditString("\n".join(script)).split("\n") |
@@ -328,9 +329,10 @@ Gerrit Code Review: https://www.gerritcodereview.com/ | |||
328 | name = m.group(1) | 329 | name = m.group(1) |
329 | if not project: | 330 | if not project: |
330 | _die('project for branch %s not in script', name) | 331 | _die('project for branch %s not in script', name) |
331 | branch = branches[project.name].get(name) | 332 | project_path = project.RelPath(local=opt.this_manifest_only) |
333 | branch = branches[project_path].get(name) | ||
332 | if not branch: | 334 | if not branch: |
333 | _die('branch %s not in %s', name, project.RelPath(local=opt.this_manifest_only)) | 335 | _die('branch %s not in %s', name, project_path) |
334 | todo.append(branch) | 336 | todo.append(branch) |
335 | if not todo: | 337 | if not todo: |
336 | _die("nothing uncommented for upload") | 338 | _die("nothing uncommented for upload") |