mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 07:17:55 +03:00
subrepo: silence git output when ui.quiet is set
This commit is contained in:
parent
4c966e44c6
commit
196def6fd2
@ -623,10 +623,14 @@ class gitsubrepo(abstractsubrepo):
|
||||
are not supported and very probably fail.
|
||||
"""
|
||||
self._ui.debug('%s: git %s\n' % (self._relpath, ' '.join(commands)))
|
||||
# print git's stderr, which is mostly progress and useful info
|
||||
# unless ui.quiet is set, print git's stderr,
|
||||
# which is mostly progress and useful info
|
||||
errpipe = None
|
||||
if self._ui.quiet:
|
||||
errpipe = open(os.devnull, 'w')
|
||||
p = subprocess.Popen(['git'] + commands, bufsize=-1, cwd=cwd, env=env,
|
||||
close_fds=util.closefds,
|
||||
stdout=subprocess.PIPE)
|
||||
stdout=subprocess.PIPE, stderr=errpipe)
|
||||
if stream:
|
||||
return p.stdout, None
|
||||
|
||||
|
@ -81,8 +81,7 @@ clone root
|
||||
|
||||
update to previous substate
|
||||
|
||||
$ hg update 1 2>/dev/null
|
||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
||||
$ hg update 1 -q
|
||||
$ cat s/g
|
||||
g
|
||||
$ hg debugsub
|
||||
|
Loading…
Reference in New Issue
Block a user