[p4python] Strange output of run_diff2 command

Anton Koval' psihonavt at gmail.com
Sun Feb 3 05:42:00 PST 2013


Got it, thank you!

On Sun, Feb 3, 2013 at 3:41 PM, Sven Erik Knop <sknop at perforce.co.uk> wrote:

> Hi Anton,
>
> You do not do anything wrong, the diffs themselves are not available in
> tagged mode.
>
> The solution is to disable tagged mode for this call:
>
> p4.run_diff2(files, tagged=False)
>
>
>
> Cheers,
>
> Sven Erik
>
> Sent from my iPad
>
> On 3 Feb 2013, at 11:20, "Anton Koval'" <psihonavt at gmail.com> wrote:
>
> Hi,
>
> I want to retrieve output of the next command (where p4 is standard
> perforce client):
>
> p4 diff2 //depot/...#1 //depot/...#2
>
> In terminal it is producing something like this:
>
> ==== //depot/bin/build.sh#1 (xtext) - //depot/bin/build.sh#2 (xtext) ==== content
> 1a2
> > #added something 2
> 9c10
> < fi---
> > fi
> ==== //depot/bin/README#1 - <none> ===
> ==== //depot/bin/status_ok#1 - <none> ===
>
> Let's assume that I have next script in python:
>
> from P4 import P4
> p4 = P4()
> p4.port = "1818"
> p4.host = "localhost"
> p4.user = "psih"
> p4.client = "build_verificator_ws2"
> p4.connect()
> changes = p4.run_diff2("//depot/...#1", "//depot/...#2")
> print changes
> p4.disconnect()
>
> After executing python script I will receive something like that:
>
> [{'status': 'content', 'depotFile2': '//depot/bin/build.sh', 'rev': '1', 'rev2': '2', 'type': 'xtext', 'depotFile': '//depot/bin/build.sh', 'type2': 'xtext'},
>
> {'status': 'left only', 'type': 'text', 'rev': '1', 'depotFile': '//depot/bin/README'},
> {'status': 'left only', 'type': 'text', 'rev': '1', 'depotFile': '//depot/bin/status_ok'}]
>
> List of files in depot with revisions but no diffs.
>
> What am I doing wrong?
>
>
>
>
>
>
> _______________________________________________
> p4python mailing list
> p4python at perforce.com
> http://maillist.perforce.com/mailman/listinfo/p4python
>
>
> --------------------------------------------------------------------------------
> This email and any files transmitted with it are confidential and intended
> solely for the use of the individual or entity to whom they are addressed. If
> you have received this email in error please notify the system manager. Please
> note that any views or opinions presented in this email are solely those of the
> author and do not necessarily represent those of Perforce Software. Finally,
> the recipient should check this email and any attachments for the presence of
> viruses. Perforce Software accepts no liability for any damage caused by any
> virus transmitted by this email.
>
> Perforce Software UK Ltd is registered in England and Wales as company no.
> 3816019 at the following address: West Forest Gate, Wellington Road, Wokingham,
> RG40 2AT, UK
> --------------------------------------------------------------------------------
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.perforce.com/pipermail/p4python/attachments/20130203/f82e46c2/attachment-0002.html>


More information about the p4python mailing list