Reputation: 441
So the problem I need to solve is this:
Let's say I have about 100 branches where CL can be integrated, but my task is to find all branches where initial CL100 was integrated.
How to do it? My team mates have been doing this manually (it takes hours, sometimes days to find all branches).
I just wonder if there some tool to list all branches where initial CL was integrated? If there's none what would be initial starting point of writing script to do this?
I tried using
p4 -ztag changes -i //depot/...@123,@123
but it only shows CL integration history not exactly what I'm looking for.
Upvotes: 0
Views: 94
Reputation: 71517
The graphical option is to use the Revision Graph tool. Open up the file in Revision Graph, select the revision, use the "Highlight Descendants" option, then filter to "Show only highlighted files".
If you want to implement this yourself in code, it's basically just running p4 filelog
recursively and then doing a simple graph search on the resulting structure. Unfortunately P4V isn't open source, but IIRC Revision Graph's underlying data structure is still the same one from the old Half-Life mod that showed branching history in a similar fashion; this would be the starting point (I apologize in advance to anyone reading this code -- it was literally my first ever C++ coding project so it's a bit rough): https://swarm.workshop.perforce.com/files/guest/sam_stafford/p4hl/src/dlls/FileLogCache.h
Upvotes: 4