如何查找两个时间戳期间对 perforce depot 文件夹的所有签入

发布于 2024-11-02 22:52:58 字数 71 浏览 1 评论 0原文

我同时使用命令行和 p4v。 我需要找到在两个时间戳(或时间)之间进入文件夹的所有签入。

任何帮助将不胜感激。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

白鸥掠海 2024-11-09 22:52:58

这可以使用 P4V 或 P4 命令行应用程序来完成。无论哪种方式,您都需要了解使用 Perforce 文件规范。具体来说,对于您所询问的内容,我们将使用 @yyyy/mm/dd 格式来指定检查文件的日期范围。

首先,我只需输入 p4changes 即可显示当前客户端规范的所有更改列表:

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 '

如您所见,我有五个可用的更改列表及其日期。如果我想限制这一点,我将使用日期文件规范修改 p4changes 命令,如下所示:

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

这告诉我一些事情:首先,我使用了 *通配符仅检查指定文件夹的内容 - 无子文件夹。如果您需要递归查看,请使用 ... 规范而不是 *。另外,我通过用逗号分隔开始日期和结束日期来给出日期范围,并将其附加在文件规范的末尾。该命令的输出告诉我,在 2010 年期间,只有更改列表 1 实际上对此文件夹中的任何文件进行了更改。

要使用 P4V 执行相同的操作,您可以在两个不同的视图中看到它。最简单的方法是使用 Depot 或 Workspace 视图简单导航到相关文件夹,然后打开“历史记录”选项卡(单击看起来像时钟的图标)。无论如何,更改列表通常按日期排序,但如果不是,您只需单击列标题即可调整排序顺序并直观地检查给定的日期范围。

使用“延时摄影”视图有点复杂,但也会为您提供更精确的视图。打开 P4V,导航到您想要检查使用 Depot 或 Workspace 视图的历史记录的文件夹,然后右键单击该文件夹。在弹出菜单中选择“修订图”,打开后,下拉“工具”菜单并选择“延时视图”。

在“延时拍摄”窗口中,您可以在顶部选择模式(选择多个修订)和内容范围(选择日期范围)。这应该可以让您直观地识别有问题的文件。

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.

雪若未夕 2024-11-09 22:52:58

尝试

p4changes //depot_name/my_folder/...@2011/02/01,2011/03/01 获取 2011 年 2 月 1 日至 2011 年 3 月 1 日期间 my_folder 文件夹中的所有更改如果您在 2011 年 2 月 1 日到最新版本之间需要它,请使用 @now 代替 2011/03/01。对于日期,您还可以输入时间,格式为 hh:mm:ss,因此 p4 会更改 //depot_name/my_folder/...@2011/02/01:03:22 :50,2011/03/01:04:05:06 只会查看 2011 年 2 月 1 日 3:22:50AM 和 2011 年 3 月 1 日 4:05:06AM 之间的日期

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

蘑菇王子 2024-11-09 22:52:58

不确定修订范围是否确实适用于视图,而不是您指示的特定文件。最直观的用途之一是获取一系列更改列表:

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

您希望得到 10 个或更少的更改列表报告,但您得到的要么什么也没有,要么全部都是。这是我的客户端版本,不确定他们是否在后续版本中修复了这个问题。

Perforce - 快速软件配置管理系统。
版权所有 1995-2010 Perforce 软件。版权所有。
修订版 P4/NTX86/2010.1/265509 (2010/09/24)。

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).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文