diff options
author | Ali Utku Selen <aliutku.selen@sonyericsson.com> | 2012-01-25 10:51:12 +0100 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2012-03-12 12:25:40 -0700 |
commit | 76abcc1d1ea2da6cf0ce381486e2f9bf4ca55c36 (patch) | |
tree | 99bb142cb8baeb9f3b0210dee1457f854ea985ba | |
parent | d3153825723b2bec3476e84f2e423c646fd4c598 (diff) | |
download | git-repo-76abcc1d1ea2da6cf0ce381486e2f9bf4ca55c36.tar.gz |
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
-rw-r--r-- | project.py | 2 | ||||
-rw-r--r-- | subcmds/status.py | 13 |
2 files changed, 1 insertions, 14 deletions
@@ -691,7 +691,7 @@ class Project(object): | |||
691 | di = self.work_git.DiffZ('diff-index', '-M', '--cached', HEAD) | 691 | di = self.work_git.DiffZ('diff-index', '-M', '--cached', HEAD) |
692 | df = self.work_git.DiffZ('diff-files') | 692 | df = self.work_git.DiffZ('diff-files') |
693 | do = self.work_git.LsOthers() | 693 | do = self.work_git.LsOthers() |
694 | if not rb and not di and not df and not do: | 694 | if not rb and not di and not df and not do and not self.CurrentBranch: |
695 | return 'CLEAN' | 695 | return 'CLEAN' |
696 | 696 | ||
697 | out = StatusColoring(self.config) | 697 | out = StatusColoring(self.config) |
diff --git a/subcmds/status.py b/subcmds/status.py index 041bcd0f..7187f4b1 100644 --- a/subcmds/status.py +++ b/subcmds/status.py | |||
@@ -101,19 +101,6 @@ the following meanings: | |||
101 | all = self.GetProjects(args) | 101 | all = self.GetProjects(args) |
102 | counter = itertools.count() | 102 | counter = itertools.count() |
103 | 103 | ||
104 | on = {} | ||
105 | for project in all: | ||
106 | cb = project.CurrentBranch | ||
107 | if cb: | ||
108 | if cb not in on: | ||
109 | on[cb] = [] | ||
110 | on[cb].append(project) | ||
111 | |||
112 | branch_names = list(on.keys()) | ||
113 | branch_names.sort() | ||
114 | for cb in branch_names: | ||
115 | print '# on branch %s' % cb | ||
116 | |||
117 | if opt.jobs == 1: | 104 | if opt.jobs == 1: |
118 | for project in all: | 105 | for project in all: |
119 | state = project.PrintWorkTreeStatus() | 106 | state = project.PrintWorkTreeStatus() |