mercurial/subrepo.py
changeset 13111 560b8001f765
parent 13110 cad35f06c031
child 13120 8568bbdfbafe
equal deleted inserted replaced
13110:cad35f06c031 13111:560b8001f765
   621 
   621 
   622         The methods tries to call the git command. versions previor to 1.6.0
   622         The methods tries to call the git command. versions previor to 1.6.0
   623         are not supported and very probably fail.
   623         are not supported and very probably fail.
   624         """
   624         """
   625         self._ui.debug('%s: git %s\n' % (self._relpath, ' '.join(commands)))
   625         self._ui.debug('%s: git %s\n' % (self._relpath, ' '.join(commands)))
   626         # print git's stderr, which is mostly progress and useful info
   626         # unless ui.quiet is set, print git's stderr,
       
   627         # which is mostly progress and useful info
       
   628         errpipe = None
       
   629         if self._ui.quiet:
       
   630             errpipe = open(os.devnull, 'w')
   627         p = subprocess.Popen(['git'] + commands, bufsize=-1, cwd=cwd, env=env,
   631         p = subprocess.Popen(['git'] + commands, bufsize=-1, cwd=cwd, env=env,
   628                              close_fds=util.closefds,
   632                              close_fds=util.closefds,
   629                              stdout=subprocess.PIPE)
   633                              stdout=subprocess.PIPE, stderr=errpipe)
   630         if stream:
   634         if stream:
   631             return p.stdout, None
   635             return p.stdout, None
   632 
   636 
   633         retdata = p.stdout.read().strip()
   637         retdata = p.stdout.read().strip()
   634         # wait for the child to exit to avoid race condition.
   638         # wait for the child to exit to avoid race condition.