How do I grab the output of a mercurial command ?

Matt Mackall mpm at selenic.com
Wed Mar 5 09:56:23 CST 2008


On Wed, Mar 05, 2008 at 04:28:22PM +0100, Donszelmann Mark wrote:
> Hi
> 
> this is probably an easy question for a "good" Python/Mercurial  
> programmer. I am not...
> 
> I execute from a python program the command:
> 
> 	commands.unbundle(self.ui, self.repo, bundle,  
> verbose=self.ui.verbose, quiet=self.ui.quiet)
> 
> and catch its exceptions. My question is how do I also "catch/grab"  
> the output that this command
> is writing ("No changesets").

ui.pushbuffer()

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial mailing list