From 4e3d6739a17dcc9efc5adb1d915be0a886db700e Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Sat, 18 Apr 2009 15:18:35 -0700 Subject: [PATCH] Print '(no branches)' if the output of `repo branches` is empty This way its clear the command did something, and reported that it had nothing to show you, because you have no active branches in this client. Signed-off-by: Shawn O. Pearce --- subcmds/branches.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subcmds/branches.py b/subcmds/branches.py index d5a0812f..57d8c88a 100644 --- a/subcmds/branches.py +++ b/subcmds/branches.py @@ -96,6 +96,10 @@ Summarizes the currently available topic branches. n.append(name) names = n + if not names: + print >>sys.stderr, ' (no branches)' + return + width = 25 for name in names: if width < len(name):