diff options
Diffstat (limited to 'subcmds/rebase.py')
| -rw-r--r-- | subcmds/rebase.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/subcmds/rebase.py b/subcmds/rebase.py index 7c53eb7a..3d1a63e4 100644 --- a/subcmds/rebase.py +++ b/subcmds/rebase.py | |||
| @@ -69,7 +69,7 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
| 69 | 'consistent if you previously synced to a manifest)') | 69 | 'consistent if you previously synced to a manifest)') |
| 70 | 70 | ||
| 71 | def Execute(self, opt, args): | 71 | def Execute(self, opt, args): |
| 72 | all_projects = self.GetProjects(args) | 72 | all_projects = self.GetProjects(args, all_manifests=not opt.this_manifest_only) |
| 73 | one_project = len(all_projects) == 1 | 73 | one_project = len(all_projects) == 1 |
| 74 | 74 | ||
| 75 | if opt.interactive and not one_project: | 75 | if opt.interactive and not one_project: |
| @@ -98,6 +98,7 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
| 98 | config = self.manifest.manifestProject.config | 98 | config = self.manifest.manifestProject.config |
| 99 | out = RebaseColoring(config) | 99 | out = RebaseColoring(config) |
| 100 | out.redirect(sys.stdout) | 100 | out.redirect(sys.stdout) |
| 101 | _RelPath = lambda p: p.RelPath(local=opt.this_manifest_only) | ||
| 101 | 102 | ||
| 102 | ret = 0 | 103 | ret = 0 |
| 103 | for project in all_projects: | 104 | for project in all_projects: |
| @@ -107,7 +108,7 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
| 107 | cb = project.CurrentBranch | 108 | cb = project.CurrentBranch |
| 108 | if not cb: | 109 | if not cb: |
| 109 | if one_project: | 110 | if one_project: |
| 110 | print("error: project %s has a detached HEAD" % project.relpath, | 111 | print("error: project %s has a detached HEAD" % _RelPath(project), |
| 111 | file=sys.stderr) | 112 | file=sys.stderr) |
| 112 | return 1 | 113 | return 1 |
| 113 | # ignore branches with detatched HEADs | 114 | # ignore branches with detatched HEADs |
| @@ -117,7 +118,7 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
| 117 | if not upbranch.LocalMerge: | 118 | if not upbranch.LocalMerge: |
| 118 | if one_project: | 119 | if one_project: |
| 119 | print("error: project %s does not track any remote branches" | 120 | print("error: project %s does not track any remote branches" |
| 120 | % project.relpath, file=sys.stderr) | 121 | % _RelPath(project), file=sys.stderr) |
| 121 | return 1 | 122 | return 1 |
| 122 | # ignore branches without remotes | 123 | # ignore branches without remotes |
| 123 | continue | 124 | continue |
| @@ -130,7 +131,7 @@ branch but need to incorporate new upstream changes "underneath" them. | |||
| 130 | args.append(upbranch.LocalMerge) | 131 | args.append(upbranch.LocalMerge) |
| 131 | 132 | ||
| 132 | out.project('project %s: rebasing %s -> %s', | 133 | out.project('project %s: rebasing %s -> %s', |
| 133 | project.relpath, cb, upbranch.LocalMerge) | 134 | _RelPath(project), cb, upbranch.LocalMerge) |
| 134 | out.nl() | 135 | out.nl() |
| 135 | out.flush() | 136 | out.flush() |
| 136 | 137 | ||
