开发者

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.


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.


Try

p4 changes //depot_name/my_folder/...@2011/02/01,2011/03/01 to get all the changes in the my_folder folder between Feb 01, 2011 and March 01, 2011. If you need it between Feb 01, 2011 and the latest revision use @now in place of 2011/03/01. For dates, you can also put in times, in the format hh:mm:ss so p4 changes //depot_name/my_folder/...@2011/02/01:03:22:50,2011/03/01:04:05:06 will only look between the dates Feb 01, 2011 at 3:22:50AM and March 01, 2011 4:05:06AM


Not sure if revision range actually works for views, versus specific files are you are indicating. One of the most intuitive uses for this would be to get a range of changes lists:

p4 changes //view/...@1210,@1200

You would expect to get 10 or less changelists reported back, but what you get is either nothing, or all of them. This is my client version, not sure if they fixed this with subsequent releases.

Perforce - The Fast Software Configuration Management System. Copyright 1995-2010 Perforce Software. All rights reserved. Rev. P4/NTX86/2010.1/265509 (2010/09/24).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜