sapling/eden/scm
Jun Wu 88df00bd2f util: do not redirect stdout
Summary:
out could be stdout but not a tty. In that case, do not redirect stdout to
pipes.  This might solve some arc pull issues.

Write `a.py`:

  util.system('ls -l /proc/self/fd/1')
  util.system('ls -l /proc/self/fd/1', out=ui.fout)
  ui.system('ls -l /proc/self/fd/1')

Before:

  hg dbsh a.py > /tmp/b; cat /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:44 /proc/self/fd/1 -> /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:44 /proc/self/fd/1 -> pipe:[2144298266]
  l-wx------ 1 quark users 64 Apr 13 11:44 /proc/self/fd/1 -> /tmp/b

  CHGDISABLE=1 hg dbsh a.py > /tmp/b; cat /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:47 /proc/self/fd/1 -> /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:47 /proc/self/fd/1 -> pipe:[2144352743]
  l-wx------ 1 quark users 64 Apr 13 11:47 /proc/self/fd/1 -> pipe:[2144352745]

After:

  lhg dbsh a.py > /tmp/b; cat /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:45 /proc/self/fd/1 -> /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:45 /proc/self/fd/1 -> /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:45 /proc/self/fd/1 -> /tmp/b

  CHGDISABLE=0 lhg dbsh a.py > /tmp/b; cat /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:55 /proc/self/fd/1 -> /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:55 /proc/self/fd/1 -> /tmp/b
  l-wx------ 1 quark users 64 Apr 13 11:55 /proc/self/fd/1 -> /tmp/b

Reviewed By: skotchvail

Differential Revision: D27744057

fbshipit-source-id: 62cab690a5cf32b2b3c68c776c627476b0f975d8
2021-04-13 13:43:39 -07:00
..
contrib makefile: pick Python that is more likely to build with setup.py 2021-04-08 14:20:12 -07:00
distutils_rust py3: fix simple Windows py3 issues 2021-02-11 09:50:25 -08:00
doc py3: fix test-help.t 2020-04-09 18:25:54 -07:00
edenscm util: do not redirect stdout 2021-04-13 13:43:39 -07:00
edenscmnative checkout: bindings for check_unknown_files 2021-04-13 11:47:54 -07:00
exec place a README file under scratch directory to describe what it is for 2021-04-12 15:17:33 -07:00
hgcache_size_logger add hgcache size logger 2020-08-26 04:24:50 -07:00
i18n apply pyfmt with usort to opted-in sources 2020-11-10 21:25:54 -08:00
lib io: add ways to test if a stream is a std stream 2021-04-13 13:43:39 -07:00
newdoc notes: add 2019-10 Manifests, Past and Future 2021-03-04 08:52:27 -08:00
pystubs eden: make the EdenFS import helper use EdenAPI's /trees endpoint instead of /complete_trees 2021-02-22 14:23:40 -08:00
slides apply black 20.8b1 formatting update 2020-10-14 20:21:52 -07:00
tests commitcloud: do not send backup bookmarks part 2021-04-13 03:07:50 -07:00
.editorconfig Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
.flake8 bookmarks: clean up scratch remotenames 2021-03-10 11:55:53 -08:00
.gitignore gitignore: track Makefile under scm 2021-03-04 08:52:27 -08:00
COPYING Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
gen_version.py version: a Rust crate providing version information 2020-05-18 09:00:40 -07:00
hgeditor Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
Makefile makefile: pick Python that is more likely to build with setup.py 2021-04-08 14:20:12 -07:00
README.rst Move fb-mercurial sources into an eden/scm subdirectory. 2019-11-13 16:04:48 -08:00
setup3.py lib: remove unused C code 2021-04-08 16:50:13 -07:00
setup.py lib: remove unused C code 2021-04-08 16:50:13 -07:00

Mercurial
=========

Mercurial is a fast, easy to use, distributed revision control tool
for software developers.

Basic install::

 $ make            # see install targets
 $ make install    # do a system-wide install
 $ hg debuginstall # sanity-check setup
 $ hg              # see help

Running without installing::

 $ make local      # build for inplace usage
 $ ./hg --version  # should show the latest version

See https://mercurial-scm.org/ for detailed installation
instructions, platform-specific notes, and Mercurial user information.