【问题标题】:p4 status -A only to sub directory of perforce workspacep4 status -A 仅对 perforce 工作区的子目录
【发布时间】:2014-11-06 23:31:11
【问题描述】:

我的 perforce 工作区视图中有这样的文件夹。

//depot/... //rajesh_ws/...

其中 //depot/... 包含所有源代码,编译后的代码将被复制到 bin 子目录。我正在同步 //depot/... & 构建它并将二进制文件复制到 bin 子目录中。

现在我想在 Perforce 中提交 bin 文件夹 (//rajesh_ws/bin/...) 而不是所有 (//rajesh_ws/...) 在构建期间生成的许多其他文件。

当我使用“p4 status -A”和“p4 submit”时,它会提交所有文件,包括 //rajesh_ws/... 但我只想提交 bin 文件夹中的文件。对此有什么想法吗?

我正在使用 p4python api 来做同样的事情

脚本 sn-p

p4.run("status", "-A")
p4.run_submit( "-d", "Modifying bin folders")

请推荐

【问题讨论】:

    标签: perforce p4v perforce-client-spec perforce-branch-spec p4python


    【解决方案1】:

    将路径作为参数提供给至少一个命令:

    p4 status -A //rajesh_ws/bin/...
    p4 submit -d "Modifying bin folders" //rajesh_ws/bin/...
    

    "p4 status" 只会打开匹配文件参数的文件(让其他未打开的文件处于未打开状态); "p4 submit" 只会提交与 file 参数匹配的打开文件(其他打开的文件处于打开状态)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-10
      • 1970-01-01
      • 2015-03-11
      • 1970-01-01
      相关资源
      最近更新 更多