Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # coding: utf-8 | 2 # coding: utf-8 |
| 3 # | 3 # |
| 4 # Copyright 2007 Google Inc. | 4 # Copyright 2007 Google Inc. |
| 5 # | 5 # |
| 6 # Licensed under the Apache License, Version 2.0 (the "License"); | 6 # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 # you may not use this file except in compliance with the License. | 7 # you may not use this file except in compliance with the License. |
| 8 # You may obtain a copy of the License at | 8 # You may obtain a copy of the License at |
| 9 # | 9 # |
| 10 # http://www.apache.org/licenses/LICENSE-2.0 | 10 # http://www.apache.org/licenses/LICENSE-2.0 |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1299 # -M/-C will not print the diff for the deleted file when a file is renamed. | 1299 # -M/-C will not print the diff for the deleted file when a file is renamed. |
| 1300 # This is confusing because the original file will not be shown on the | 1300 # This is confusing because the original file will not be shown on the |
| 1301 # review when a file is renamed. So first get the diff of all deleted files, | 1301 # review when a file is renamed. So first get the diff of all deleted files, |
| 1302 # then the diff of everything except deleted files with rename and copy | 1302 # then the diff of everything except deleted files with rename and copy |
| 1303 # support enabled. | 1303 # support enabled. |
| 1304 cmd = [ | 1304 cmd = [ |
| 1305 "git", "diff", "--no-color", "--no-ext-diff", "--full-index", "--ignore- submodules" | 1305 "git", "diff", "--no-color", "--no-ext-diff", "--full-index", "--ignore- submodules" |
| 1306 ] | 1306 ] |
| 1307 diff = RunShell(cmd + ["--diff-filter=D"] + extra_args, env=env, | 1307 diff = RunShell(cmd + ["--diff-filter=D"] + extra_args, env=env, |
| 1308 silent_ok=True) | 1308 silent_ok=True) |
| 1309 diff += RunShell(cmd + ["-C", "--diff-filter=ACMRT"] + extra_args, env=env, | 1309 diff += RunShell(cmd + ["-C", "-C", "--diff-filter=ACMRT"] + extra_args, env =env, |
|
M-A Ruel
2012/06/11 00:01:59
This needs to happen upstream first.
| |
| 1310 silent_ok=True) | 1310 silent_ok=True) |
| 1311 if not diff: | 1311 if not diff: |
| 1312 ErrorExit("No output from %s" % (cmd + extra_args)) | 1312 ErrorExit("No output from %s" % (cmd + extra_args)) |
| 1313 return diff | 1313 return diff |
| 1314 | 1314 |
| 1315 def GetUnknownFiles(self): | 1315 def GetUnknownFiles(self): |
| 1316 status = RunShell(["git", "ls-files", "--exclude-standard", "--others"], | 1316 status = RunShell(["git", "ls-files", "--exclude-standard", "--others"], |
| 1317 silent_ok=True) | 1317 silent_ok=True) |
| 1318 return status.splitlines() | 1318 return status.splitlines() |
| 1319 | 1319 |
| (...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2344 os.environ['LC_ALL'] = 'C' | 2344 os.environ['LC_ALL'] = 'C' |
| 2345 RealMain(sys.argv) | 2345 RealMain(sys.argv) |
| 2346 except KeyboardInterrupt: | 2346 except KeyboardInterrupt: |
| 2347 print | 2347 print |
| 2348 StatusUpdate("Interrupted.") | 2348 StatusUpdate("Interrupted.") |
| 2349 sys.exit(1) | 2349 sys.exit(1) |
| 2350 | 2350 |
| 2351 | 2351 |
| 2352 if __name__ == "__main__": | 2352 if __name__ == "__main__": |
| 2353 main() | 2353 main() |
| OLD | NEW |