repo status to print project name on clean gits

repo status just prints "# on branch oprofile" if you have branched
in clean status. This doesn't really tell which branch is meant.

Instead we can use the same syntax with modified gits which will
give us detailed information.

Change-Id: I55fe5154d278e10a814281dd2ba501ec6e956730
This commit is contained in:
Ali Utku Selen 2012-01-25 10:51:12 +01:00 committed by Shawn O. Pearce
parent d315382572
commit 76abcc1d1e
2 changed files with 1 additions and 14 deletions

View File

@ -691,7 +691,7 @@ class Project(object):
di = self.work_git.DiffZ('diff-index', '-M', '--cached', HEAD) di = self.work_git.DiffZ('diff-index', '-M', '--cached', HEAD)
df = self.work_git.DiffZ('diff-files') df = self.work_git.DiffZ('diff-files')
do = self.work_git.LsOthers() do = self.work_git.LsOthers()
if not rb and not di and not df and not do: if not rb and not di and not df and not do and not self.CurrentBranch:
return 'CLEAN' return 'CLEAN'
out = StatusColoring(self.config) out = StatusColoring(self.config)

View File

@ -101,19 +101,6 @@ the following meanings:
all = self.GetProjects(args) all = self.GetProjects(args)
counter = itertools.count() counter = itertools.count()
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
if opt.jobs == 1: if opt.jobs == 1:
for project in all: for project in all:
state = project.PrintWorkTreeStatus() state = project.PrintWorkTreeStatus()