title: how to detect use of Perforce's "reopen for edit" from a script
body: <p>I'm working on a script to interact with Perforce, which among other things needs to be able to understand pending changelists. For this I use '<code>p4 describe</code>' and '<code>p4 opened</code>', which are pretty straightforward. For instance, a file opened for edit shows up like this (from p4 opened):</p>
  
  <pre><code>//source/stuff/things.h#1 add default change (text)
  </code></pre>
  
  <p>What I <em>can't</em> seem to figure out is how to detect cases where a user has branched a file and then used the 'Reopen for edit' command on that file (which amounts to using '<code>p4 edit</code>' on the file to be branched) prior to submitting it. Same thing goes for integrating a file and then using 'Reopen for edit' before submitting the integration. In the branch case, the file shows up as an 'add' with no indication that there's also a branch going on (so the above example could be either a true add or a reopened branch). In the integrate case it, shows up as an 'edit'. In both cases, after I submit the change I can see that the file was branched/integrated, but I need to be able to do this for pending changes. In theory I would hope to see something like this, where things.h is being branched and edited from thangs.h:</p>
  
  <pre><code>//source/stuff/things.h#1 add default change (text)
    branch from //source/other/thangs.h#42
  </code></pre>
  
  <p>Does anybody know of a way to accomplish this? I'll also mention that I'm running an old-ish version of Perforce (from 2004), so perhaps it's doable in newer versions and I just need to update my software.</p>