Commits

Anonymous committed 68a96a7

Redirect output of called commands to STDERR.

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

Comments (0)

Files changed (1)

smart-live-rebuild.py

 		if Shared.opts.update:
 			cmd = self.getupdatecmd()
 			out.s3(cmd)
-			self.subprocess = subprocess.Popen(cmd, shell=True)
+			self.subprocess = subprocess.Popen(cmd, stdout=sys.stderr, shell=True)
 		else:
 			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:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.