Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find all checkins to a perforce depot folder during two timestamps

I am using both command line and p4v. I need to find all checkins that went to a folder between two timestamps ( or times).

Any help will be appreciated.

like image 634
Ankur Agarwal Avatar asked Apr 21 '11 23:04

Ankur Agarwal


People also ask

How do I check my $p4port?

To verify a connection, run the p4 info command. The Server address: field shows the host to which p4 connected and also displays the host and port number on which the Helix Server is listening.

What does clean do in Perforce?

The p4 clean command takes the following actions when finding inconsistencies between files in a user's workspace and corresponding depot files: Files present in the workspace, but missing from the depot are deleted from the workspace. Files present in the depot, but missing from your workspace.

What does p4 Fstat do?

The p4 fstat command dumps information about each file, with information for each field on a separate line. The output is best used within a Helix C/C++ API application where the items can be accessed as variables, but is also suitable for parsing by scripts.

What is depot in p4v?

The Helix Server stores files in shared repositories called depots. By default, there is one local depot named depot on every Helix Server installation. To create or edit a depot, use p4 depot depotname and edit the fields in the depot spec form.


1 Answers

This can be accomplished using P4V or the P4 command line application. Either way, you will need to understand some of the intricacies of using the Perforce File Specifications. Specifically for what you are asking, we will be using the @yyyy/mm/dd format to specify a date range to examine files.

To start off, I am going to just simply type p4 changes to show a list of all changes for the current client spec:

C:\Project>p4 changes
Change 5 on 2011/03/16 by goyuix@laptop 'Initial commit for upgrade to .'
Change 4 on 2010/07/02 by goyuix@desktop 'fixed a bug for really bad reco'
Change 3 on 2010/04/19 by goyuix@desktop 'deleted project.dll from the sourc'
Change 2 on 2010/04/19 by goyuix@desktop 'deletion of library.dll '
Change 1 on 2010/04/18 by goyuix@desktop 'Initial commit '

As you can see, I have five change lists and their dates available. If I wanted to limit that down, I would modify the p4 changes command using the date file spec as follows:

C:\Project>p4 changes //depot/Project/MAIN/*@2010/01/01,@2010/12/31
Change 1 on 2010/04/18 by goyuix@desktop 'Initial commit '

This tells me a few things: First, I used the * wild card which only examines the contents of the specified folder - no children. If you need to look recursively, use the ... spec instead of the *. Also, I gave a date range by separating out the start and end dates with a comma, appended at the end of the file spec. The output of this command tells me that only change list 1 actually made a change to any of the files in this folder during 2010.

To do the same thing using P4V, you can see it in two different views. The easy way is to simple navigate to the folder in question with the Depot or Workspace views, and then open the History tab (click the icon that looks like a clock). Change lists are typically sorted by date anyway, but in case they are not, you can just click on the column header to adjust the sort order and visually inspect for a given date range.

Using the Time Lapse view is a little convoluted - but will give you a more precise view as well. Open P4V, navigate to the folder you wish to examine the history of using either the Depot or Workspace view and right click on that folder. In the popup menu choose the Revision Graph, and once it is opened, drop down the Tools menu and choose Time Lapse View.

In the Time Lapse window, you have choices along the top to choose the Mode (choose multiple revisions) and the content range (pick the scale of dates). This should let you visually identify the files in question.

like image 162
Goyuix Avatar answered Oct 23 '22 23:10

Goyuix