【问题标题】:Perforce -- How to obtain a revision number of a file given a specific time periodPerforce - 如何在给定时间段内获取文件的修订号
【发布时间】:2018-03-09 13:03:26
【问题描述】:

我有兴趣在 Perforce 中获取给定特定日期或时间段的文件的修订号。

如果我用p4 files,我发现如果那个时间段没有新的提交,执行p4命令时返回的评论是:

no revision(s) after that date

完整示例如下:

% p4 files //depot/project/file_a.c@2018/03/06,@2018/03/07 
//depot/project/file_a.c@2018/03/06,@2018/03/07 - no revision(s) after that date

但我要查找的信息是file_a.c2018/03/062018/03/07 之间的修订号,无论在该日期或其他时间是否有提交。像这样的东西会很好:

//depot/project/file_a.c#31 - edit change 12345678

我是否使用了正确的 Perforce 命令?谢谢您的帮助。

【问题讨论】:

    标签: perforce revision


    【解决方案1】:

    听起来您真正想要的是截至 2018 年 3 月 7 日文件的最新修订版:

    % p4 files //depot/project/file_a.c@2018/03/07
    

    【讨论】:

    • 酷,比我想象的要简单。感谢您的回答!
    猜你喜欢
    • 1970-01-01
    • 2014-07-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-11
    • 1970-01-01
    相关资源
    最近更新 更多