diff options
author | Conley Owens <cco3@android.com> | 2012-10-09 14:29:46 -0700 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2012-10-09 14:29:46 -0700 |
commit | 3a6cd4200e42fbb5a21b3fb8d3c9738c0320cc63 (patch) | |
tree | 68ae5094d6530453887fb35a73fd5fa55f55a034 /subcmds/stage.py | |
parent | 25f17682ca4ecd8acc887462d4bebc7c429cf110 (diff) | |
parent | 8a68ff96057ec58e524a3e41a2d8dca7b5d016bc (diff) | |
download | git-repo-3a6cd4200e42fbb5a21b3fb8d3c9738c0320cc63.tar.gz |
Merge "Coding style cleanup"
Diffstat (limited to 'subcmds/stage.py')
-rw-r--r-- | subcmds/stage.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/subcmds/stage.py b/subcmds/stage.py index 4c221dba..2ec48069 100644 --- a/subcmds/stage.py +++ b/subcmds/stage.py | |||
@@ -48,8 +48,8 @@ The '%prog' command stages files to prepare the next commit. | |||
48 | self.Usage() | 48 | self.Usage() |
49 | 49 | ||
50 | def _Interactive(self, opt, args): | 50 | def _Interactive(self, opt, args): |
51 | all = filter(lambda x: x.IsDirty(), self.GetProjects(args)) | 51 | all_projects = filter(lambda x: x.IsDirty(), self.GetProjects(args)) |
52 | if not all: | 52 | if not all_projects: |
53 | print >>sys.stderr,'no projects have uncommitted modifications' | 53 | print >>sys.stderr,'no projects have uncommitted modifications' |
54 | return | 54 | return |
55 | 55 | ||
@@ -58,8 +58,8 @@ The '%prog' command stages files to prepare the next commit. | |||
58 | out.header(' %s', 'project') | 58 | out.header(' %s', 'project') |
59 | out.nl() | 59 | out.nl() |
60 | 60 | ||
61 | for i in xrange(0, len(all)): | 61 | for i in xrange(0, len(all_projects)): |
62 | p = all[i] | 62 | p = all_projects[i] |
63 | out.write('%3d: %s', i + 1, p.relpath + '/') | 63 | out.write('%3d: %s', i + 1, p.relpath + '/') |
64 | out.nl() | 64 | out.nl() |
65 | out.nl() | 65 | out.nl() |
@@ -93,11 +93,11 @@ The '%prog' command stages files to prepare the next commit. | |||
93 | if a_index is not None: | 93 | if a_index is not None: |
94 | if a_index == 0: | 94 | if a_index == 0: |
95 | break | 95 | break |
96 | if 0 < a_index and a_index <= len(all): | 96 | if 0 < a_index and a_index <= len(all_projects): |
97 | _AddI(all[a_index - 1]) | 97 | _AddI(all_projects[a_index - 1]) |
98 | continue | 98 | continue |
99 | 99 | ||
100 | p = filter(lambda x: x.name == a or x.relpath == a, all) | 100 | p = filter(lambda x: x.name == a or x.relpath == a, all_projects) |
101 | if len(p) == 1: | 101 | if len(p) == 1: |
102 | _AddI(p[0]) | 102 | _AddI(p[0]) |
103 | continue | 103 | continue |