Chromium Code Reviews| Index: tools/git/mass-rename.py |
| diff --git a/tools/git/mass-rename.py b/tools/git/mass-rename.py |
| index 21fbef76b722063d3933ac9eb7b46b6034da91b2..dcdeb8c235f1ec2bdce0ead33a37195ed3e80434 100755 |
| --- a/tools/git/mass-rename.py |
| +++ b/tools/git/mass-rename.py |
| @@ -28,13 +28,20 @@ def main(): |
| out, _ = popen.communicate() |
| if popen.returncode != 0: |
| return 1 |
| - for line in out.splitlines(): |
| + item = 1 |
| + lines = out.splitlines() |
| + for line in lines: |
|
Dirk Pranke
2017/04/07 22:06:52
Nit: can use:
for item, line in enumerate(lines
|
| + # Print progress |
| + print '[%d/%d]' % (item, len(lines)), |
| + item = item + 1 |
| + |
| parts = line.split('\t') |
| if len(parts) != 3: |
| print 'Skipping: %s -- not a rename?' % parts |
| continue |
| attrs, fro, to = parts |
| if attrs.split()[4].startswith('R'): |
| + print 'Moving: %s' % fro |
| subprocess.check_call([ |
| sys.executable, |
| os.path.join(BASE_DIR, 'move_source_file.py'), |