summaryrefslogtreecommitdiffstats
path: root/subcmds/abandon.py
diff options
context:
space:
mode:
Diffstat (limited to 'subcmds/abandon.py')
-rw-r--r--subcmds/abandon.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/subcmds/abandon.py b/subcmds/abandon.py
index 85d85f5a..c3d2d5b7 100644
--- a/subcmds/abandon.py
+++ b/subcmds/abandon.py
@@ -69,7 +69,8 @@ It is equivalent to "git branch -D <branchname>".
69 nb = args[0] 69 nb = args[0]
70 err = defaultdict(list) 70 err = defaultdict(list)
71 success = defaultdict(list) 71 success = defaultdict(list)
72 all_projects = self.GetProjects(args[1:]) 72 all_projects = self.GetProjects(args[1:], all_manifests=not opt.this_manifest_only)
73 _RelPath = lambda p: p.RelPath(local=opt.this_manifest_only)
73 74
74 def _ProcessResults(_pool, pm, states): 75 def _ProcessResults(_pool, pm, states):
75 for (results, project) in states: 76 for (results, project) in states:
@@ -94,7 +95,7 @@ It is equivalent to "git branch -D <branchname>".
94 err_msg = "error: cannot abandon %s" % br 95 err_msg = "error: cannot abandon %s" % br
95 print(err_msg, file=sys.stderr) 96 print(err_msg, file=sys.stderr)
96 for proj in err[br]: 97 for proj in err[br]:
97 print(' ' * len(err_msg) + " | %s" % proj.relpath, file=sys.stderr) 98 print(' ' * len(err_msg) + " | %s" % _RelPath(proj), file=sys.stderr)
98 sys.exit(1) 99 sys.exit(1)
99 elif not success: 100 elif not success:
100 print('error: no project has local branch(es) : %s' % nb, 101 print('error: no project has local branch(es) : %s' % nb,
@@ -110,5 +111,5 @@ It is equivalent to "git branch -D <branchname>".
110 result = "all project" 111 result = "all project"
111 else: 112 else:
112 result = "%s" % ( 113 result = "%s" % (
113 ('\n' + ' ' * width + '| ').join(p.relpath for p in success[br])) 114 ('\n' + ' ' * width + '| ').join(_RelPath(p) for p in success[br]))
114 print("%s%s| %s\n" % (br, ' ' * (width - len(br)), result)) 115 print("%s%s| %s\n" % (br, ' ' * (width - len(br)), result))