diff options
| author | Renaud Paquay <rpaquay@google.com> | 2016-11-01 15:51:59 -0700 |
|---|---|---|
| committer | Renaud Paquay <rpaquay@google.com> | 2017-08-31 13:49:26 -0700 |
| commit | e8595e9df7980b0b7d9111de43d294c4439d474c (patch) | |
| tree | 1a7034b7854eb47965b8112ccaf3b33687cac583 /main.py | |
| parent | 227ad2ef42f47798d24814dfc2cef8119c313ab7 (diff) | |
| download | git-repo-e8595e9df7980b0b7d9111de43d294c4439d474c.tar.gz | |
Support pager on Windows
Windows does not support pipe|fork, but we can simulate by creating
the pager as a child process, redirecting stdout/in/err appropriately
and then waiting for the child process to terminate after we are
done executing the repo command.
Change-Id: I5dd2bdeb4095e4d93bc678802e53c6d4eda0235b
Diffstat (limited to 'main.py')
| -rwxr-xr-x | main.py | 3 |
1 files changed, 2 insertions, 1 deletions
| @@ -55,7 +55,7 @@ from error import NoSuchProjectError | |||
| 55 | from error import RepoChangedException | 55 | from error import RepoChangedException |
| 56 | import gitc_utils | 56 | import gitc_utils |
| 57 | from manifest_xml import GitcManifest, XmlManifest | 57 | from manifest_xml import GitcManifest, XmlManifest |
| 58 | from pager import RunPager | 58 | from pager import RunPager, TerminatePager |
| 59 | from wrapper import WrapperPath, Wrapper | 59 | from wrapper import WrapperPath, Wrapper |
| 60 | 60 | ||
| 61 | from subcmds import all_commands | 61 | from subcmds import all_commands |
| @@ -542,6 +542,7 @@ def _Main(argv): | |||
| 542 | print('fatal: %s' % e, file=sys.stderr) | 542 | print('fatal: %s' % e, file=sys.stderr) |
| 543 | result = 128 | 543 | result = 128 |
| 544 | 544 | ||
| 545 | TerminatePager() | ||
| 545 | sys.exit(result) | 546 | sys.exit(result) |
| 546 | 547 | ||
| 547 | if __name__ == '__main__': | 548 | if __name__ == '__main__': |
