mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-01-08 16:14:26 +00:00
Merge "Change usages of xrange() to range()"
This commit is contained in:
commit
6287543e35
@ -168,7 +168,7 @@ class GitConfig(object):
|
|||||||
elif old != value:
|
elif old != value:
|
||||||
self._cache[key] = list(value)
|
self._cache[key] = list(value)
|
||||||
self._do('--replace-all', name, value[0])
|
self._do('--replace-all', name, value[0])
|
||||||
for i in xrange(1, len(value)):
|
for i in range(1, len(value)):
|
||||||
self._do('--add', name, value[i])
|
self._do('--add', name, value[i])
|
||||||
|
|
||||||
elif len(old) != 1 or old[0] != value:
|
elif len(old) != 1 or old[0] != value:
|
||||||
|
2
main.py
2
main.py
@ -87,7 +87,7 @@ class _Repo(object):
|
|||||||
name = None
|
name = None
|
||||||
glob = []
|
glob = []
|
||||||
|
|
||||||
for i in xrange(0, len(argv)):
|
for i in range(len(argv)):
|
||||||
if not argv[i].startswith('-'):
|
if not argv[i].startswith('-'):
|
||||||
name = argv[i]
|
name = argv[i]
|
||||||
if i > 0:
|
if i > 0:
|
||||||
|
2
repo
2
repo
@ -606,7 +606,7 @@ def _ParseArguments(args):
|
|||||||
opt = _Options()
|
opt = _Options()
|
||||||
arg = []
|
arg = []
|
||||||
|
|
||||||
for i in xrange(0, len(args)):
|
for i in range(len(args)):
|
||||||
a = args[i]
|
a = args[i]
|
||||||
if a == '-h' or a == '--help':
|
if a == '-h' or a == '--help':
|
||||||
opt.help = True
|
opt.help = True
|
||||||
|
@ -58,7 +58,7 @@ The '%prog' command stages files to prepare the next commit.
|
|||||||
out.header(' %s', 'project')
|
out.header(' %s', 'project')
|
||||||
out.nl()
|
out.nl()
|
||||||
|
|
||||||
for i in xrange(0, len(all_projects)):
|
for i in range(len(all_projects)):
|
||||||
p = all_projects[i]
|
p = all_projects[i]
|
||||||
out.write('%3d: %s', i + 1, p.relpath + '/')
|
out.write('%3d: %s', i + 1, p.relpath + '/')
|
||||||
out.nl()
|
out.nl()
|
||||||
|
Loading…
Reference in New Issue
Block a user