Jump to content


Get "Last Modified" time of submitted file during change-content trigger?

triggers change content fstat headModTime file date time

  • Please log in to reply
1 reply to this topic

#1 scottjenkins

scottjenkins

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 19 August 2015 - 02:15 PM

How do you get the "last modified" date/time of a file in a changelist from a change-content trigger? This date becomes the "headModTime" value when running fstat on the file after it has been committed. I can't seem to find a way to access it after the file has been transferred from the client, but before the commit. Any ideas?

#2 scottjenkins

scottjenkins

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 19 August 2015 - 05:01 PM

Nevermind - had a typo in my python code. I was calling p4.run_fstat(DEPOT_ROOT + "...@" + changelist) instead of p4.run_fstat(DEPOT_ROOT + "...@=" + changelist). That sneaky '=' refers to a pending changelist. Without it, the changelist doesn't exist in the depot yet, so it defaulted to HEAD as far as I can tell. "headModTime" returns the latest mod time as I would expect.





Also tagged with one or more of these keywords: triggers, change, content, fstat, headModTime, file, date, time

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users