[p4python] p4 diff2 vs. run_diff2

Wright, Richard richardw at cobaltgroup.com
Mon Dec 12 10:38:21 PST 2005


I think it's a "feature".  (Although I have mentioned to support in regard
to the output of the -G option that I would prefer it to be otherwise.)

>From 
http://perforce.com/perforce/doc.051/user/p4apinotes.txt under "New
functionality in 2004.2":

	#58146
	    'p4 diff2' supports tagged output.  By setting the value of
"api" 
	    to "56" (2003.2) the application will not get tagged output when

	    compiled with 2004.2 API and run against a 2004.2 server.  Note
	    tagged diff2 output supresses the actual diff of files and only
	    supplies summary information.

-Rick


-----Original Message-----
From: p4python-bounces at perforce.com
[mailto:p4python-bounces at perforce.com]On Behalf Of Robert Cowham
Sent: Monday, December 12, 2005 8:46 AM
To: 'Nicholas Guarracino'
Cc: p4python at perforce.com
Subject: Re: [p4python] p4 diff2 vs. run_diff2


I think this is an oddity of the API. I will investigate when I get some
time as to where the output goes if you call parse_forms().

I wonder what difference tagged() makes instead of parse_forms()?

You certainly shouldn't be using diff instead.

Meanwhile, the work around is to not use parse_forms() and just parse the
output - sorry about that.

Robert

> -----Original Message-----
> From: p4python-bounces at perforce.com 
> [mailto:p4python-bounces at perforce.com] On Behalf Of Nicholas 
> Guarracino
> Sent: 09 December 2005 22:26
> To: p4python at perforce.com
> Subject: [p4python] p4 diff2 vs. run_diff2
> 
> I'm trying to see what's changed in a particular file using 
> diff2. On the command line I can run
> 
> p4 -dc //depot/file at filerev1 //depot/file at filerev2
> 
> And it shows me the diff, just as expected. Going through the 
> python API gives me a dictionary with keys 'status', 
> 'depotFile', etc. However, nowhere do I see the actual output 
> of the diff2 command. What I discovered is that if I don't 
> run parse_forms() at the start of my script, run_diff2 does 
> return the output, albeit in a much less organized fashion. 
> Is there any way to see the actual diff2 output after calling 
> parse_forms()? Should I be using diff instead of diff2?
> 
> Thanks!
> 
> -- 
> 
> Nicholas Guarracino
> DataViz, Inc.
> 
> _______________________________________________
> p4python mailing list
> p4python at maillist.perforce.com
> http://maillist.perforce.com/mailman/listinfo/p4python
> 
> 


_______________________________________________
p4python mailing list
p4python at maillist.perforce.com
http://maillist.perforce.com/mailman/listinfo/p4python



More information about the p4python mailing list