[p4] finding origins

Stephen Vance steve at vance.com
Tue Apr 17 15:33:26 PDT 2007


'p4 filelog -i' and 'p4 change -i' give you all the information you 
need. You would look for the "copy from" and "copy to" entries, 
depending on which side of the integration you're looking at. You may 
also want to look at "ignore to" and "ignore from" as they are sometimes 
used when there are no diffs.

The Revision Graph in P4V gives you the information visually, but not in 
an automatable extract.

Steve

John Kristian wrote:
> Do you know of a program that finds the origins of files in Perforce?  I
> mean, a program that takes a set of Perforce file versions, and finds
> the original file versions from which they were copied.  By 'copied' I
> mean either p4 submitted or p4 integrated, with no difference from the
> previous or source version. I want to follow the chain of copies back to
> the original version.  (Technically, I want to traverse the graph of
> copies back to its roots.)
>
> Source code would be valuable, so I can tailor it.
>
> If I were to implement this, I would make a Perl script that used p4
> commands to traverse the graph of submissions and integrations in
> reverse, and find the versions that weren't copied.  Better ideas would
> be welcome.
>
> Why? In my Perforce depot, files are often integrated from branch to
> branch with no change.  For example, this signifies that software is
> 'code complete' or that it's been tested and found ready for a
> particular use.  When troubleshooting, we often want to know the origins
> of a given set of files, to understand what went wrong or to start a
> patch branch.
>
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>
>   


More information about the perforce-user mailing list