mirror of
https://github.com/facebook/sapling.git
synced 2025-01-06 04:43:19 +03:00
6331cb6323
Summary: 1.) Windows doesn't support close_fds if stdin/stdout/stderr is redirected. It throws out this Exception: 'close_fds is not supported on Windows platforms if you redirect stdin/stdout/stderr'. This diff resolves this issue by importing mercurial util to use file_fd only on posix 2.) Originally, stable is implemented as a mercurial extension and gets expanded as the following (take update as an example): ``` hg up stable -> calls getstablerev("--pick-best") in stable.py -> calls a bash script in hg repo, e.g. ovrsource or fbsource ``` However, bash is not supported on Windows. To resolve this, this diff sets up cwd in `subprocess.Popen` and then modifies stablerev to take in a command in string format instead of a script. This way, we can pass in either the bash script for fbsource(backward compatible) or `python <xxx.py>` for ovrsource. Reviewed By: quark-zju Differential Revision: D17140170 fbshipit-source-id: ea8ae76883cc34a0517fa7e9eae3cbb3ba901353 |
||
---|---|---|
.. | ||
hgdemandimport | ||
hgext | ||
mercurial | ||
__init__.py |