Jump to content


Question about perforce command triggers and revert

P4V triggers revert

  • Please log in to reply
1 reply to this topic

#1 mister_wilson

mister_wilson

    Advanced Member

  • Members
  • PipPipPip
  • 119 posts
  • LocationMontreal, Quebec

Posted 13 September 2019 - 06:42 PM

Hi,

I'll start off with my version information. The server version is P4D/LINUX26X86_64/2018.2/1724420 (2018/11/02) and the version of the P4V is Rev. P4V/NTX64/2019.1/1830398 on Windows 10 Enterprise

I have two perforce command triggers for revert operations, they are called pre-user-revert and post-user-revert.

>> Is there an easy way to get the reverted files in the post-user-revert trigger if the user reverts a pending changelist? (by this time the changelist is gone and i can't get the files that were reverted)

If a user reverts by file then this isn't a problem since the file is part of the input.

I was thinking of something along the lines of storing the file list in a temp file before the revert and processing this file in the post-user trigger or possibly something with p4 keys but I was wondering if there is an easier/better way?

Let me know if anything is unclear or if you need any additional information.

Thanks,

-Jonathan Wilson

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 947 posts

Posted 13 September 2019 - 08:23 PM

Quote

I was thinking of something along the lines of storing the file list in a temp file before the revert and processing this file in the post-user trigger or possibly something with p4 keys but I was wondering if there is an easier/better way?

I think that's the way to go; I'd probably use a sqlite db with entries keyed on command line plus workspace, or something along those general lines.

The other option I can think of is picking through logs/journals, but yech.





Also tagged with one or more of these keywords: P4V, triggers, revert

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users