[p4] finding origins

John Kristian jkristian at netflix.com
Tue Apr 17 09:05:22 PDT 2007


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.



More information about the perforce-user mailing list