1. Michał Górny
  2. smart-live-rebuild


Michał Górny  committed 68a96a7

Redirect output of called commands to STDERR.

This is required in order to have clean '--pretend' output.

  • Participants
  • Parent commits 7c0dbe6
  • Branches master

Comments (0)

Files changed (1)

File smart-live-rebuild.py

View file
  • Ignore whitespace
 		if Shared.opts.update:
 			cmd = self.getupdatecmd()
-			self.subprocess = subprocess.Popen(cmd, shell=True)
+			self.subprocess = subprocess.Popen(cmd, stdout=sys.stderr, shell=True)
 			self.subprocess = None
 		return '%s %s origin %s:%s' % (self.env['EGIT_UPDATE_CMD'], self.env['EGIT_OPTIONS'], self.env['EGIT_BRANCH'], self.env['EGIT_BRANCH'])
 	def diffstat(self, oldrev, newrev):
-		subprocess.Popen('%s %s..%s' % (self.env['EGIT_DIFFSTAT_CMD'] or 'git diff', oldrev, newrev), shell=True).wait()
+		subprocess.Popen('%s %s..%s' % (self.env['EGIT_DIFFSTAT_CMD'] or 'git diff', oldrev, newrev), stdout=sys.stderr, shell=True).wait()
 class HgSupport(VCSSupport):
 	inherit = 'mercurial'
 		return ' '.join([self.env['EHG_PULL_CMD']] + self.trustopt)
 	def diffstat(self, oldrev, newrev):
-		subprocess.Popen(['hg', 'diff', '--stat', '-r', oldrev, '-r', newrev] + self.trustopt).wait()
+		subprocess.Popen(['hg', 'diff', '--stat', '-r', oldrev, '-r', newrev] + self.trustopt, stdout=sys.stderr).wait()
 class SvnSupport(VCSSupport):
 	inherit = 'subversion'
 				cmd = ['/usr/sbin/quickpkg', '--include-config=y']
 				cmd.extend(['=%s' % x for x in packages])
 				out.s2(' '.join(cmd))
-				subprocess.Popen(cmd).wait()
+				subprocess.Popen(cmd, stdout=sys.stderr).wait()
 			out.s1('Calling emerge to rebuild %s%d%s packages ...' % (out.white, len(packages), out.s1reset))
 			if opts.offline: