Make 'repo status' show the branch you are currently on

Signed-off-by: Shawn O. Pearce <sop@google.com>
diff --git a/subcmds/status.py b/subcmds/status.py
index 0b6006f..b0d419a 100644
--- a/subcmds/status.py
+++ b/subcmds/status.py
@@ -64,6 +64,19 @@
     all = self.GetProjects(args)
     clean = 0
 
+    on = {}
+    for project in all:
+      cb = project.CurrentBranch
+      if cb:
+        if cb not in on:
+          on[cb] = []
+        on[cb].append(project)
+
+    branch_names = list(on.keys())
+    branch_names.sort()
+    for cb in branch_names:
+      print '# on branch %s' % cb
+
     for project in all:
       state = project.PrintWorkTreeStatus()
       if state == 'CLEAN':