Jump to content

Xml validation trigger


  • Please log in to reply
No replies to this topic

#1 etcriss



  • Members
  • Pip
  • 1 posts

Posted 27 July 2018 - 07:38 PM

I'm trying to set up a p4 trigger to run and validate xml files on submit to prevent simple invalid xml problems.

I'm trying to figure out what p4 commands need to be run by the trigger by testing them out in console before writing code. I have a simple changelist, 12345, that contains a text file with a single line change. I would like to be able to print the entire fie to a string and then convert it to xml for validation.

My problem is that, at least running in console, the command p4 print file.txt@12345, p4 print file.txt@=12345, etc. all appear to be printing the committed file in the depot, not what is in the pending changelist.

Maybe this will change depending on the trigger type I implement, but I would really like to figure this out before writing code.

Has anyone else attempted this? How can I get these commands to look at the changelist instead of the depot?

Thank you.

Also tagged with one or more of these keywords: Trigger

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users