Perforce:是否可以对多个文件(而不是文件夹)执行集成命令?

发布于 2024-10-06 11:58:19 字数 380 浏览 1 评论 0原文

我正在尝试执行“集成”perforce 命令(请参阅: http://www.perforce.com/perforce/doc.current/manuals/cmdref/integrate.html)在文件列表上,而不是在单个文件或特定文件夹上。

这样的事可能吗?

换句话说,是否可以在一个命令中指定多个文件(及其各自的集成路径)?这将为我省去为每个要集成的文件调用此命令的麻烦,并在此过程中减少 P4 服务器上的往返次数。

如果没有,您还有其他命令可以推荐吗?

谢谢

I'm trying to execute an "Integrate" perforce command (see: http://www.perforce.com/perforce/doc.current/manuals/cmdref/integrate.html) on a list of files and not on a single file or a specific folder.

Is such a thing possible ?

In other words, is it possible to specify multiple files (and their respective integration paths) in one command ? This would save me the trouble of having to call this command for each file that I'd like to integrate and in the process reduces the number of round-trips on the P4 server.

If not, do you have another command to recommend?

Thanks

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

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

发布评论

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

评论(3

各自安好 2024-10-13 11:58:19

您可以创建一个分支,然后通过该分支进行集成。我知道这听起来很奇怪,但在 Perforce 中,所有分支都是存储在服务器中的一组集成映射。然后,您可以在 p4Integrate 上使用 -b 来指定分支。

You could create a branch, and then integrate through the branch. I know that sounds weird, but in Perforce all a branch is is a set of integration mappings stored in the server. You then use -b on p4 integrate to specify the branch.

伴我心暖 2024-10-13 11:58:19

在 p4v 中,您可以Ctrl+单击多个文件,然后右键单击并选择集成它们。我不认为就集成路径而言你可以做任何花哨的事情;也就是说,如果您将两个文件集成在同一源目录中,它将采用相同的目标目录。或者,如果您要集成两个文件 dev/dir1/file1dev/dir2/file2,您可以选择 dev2/... 作为您的文件。目标目录,您将有 dev2/dir1/file1dev2/dir2/file2

编辑添加:如果您正在寻找命令行解决方案,您可以使用 Laurence 的并根据您的喜好编辑分支规范。

In p4v you can Ctrl+click multiple files, then right-click and choose to Integrate them. I don't think you can do anything fancy as far as integration paths; that is if you are integrating two files in the same source directory it will assume the same target directory. Or, if you are integrating two files dev/dir1/file1 and dev/dir2/file2 you can choose dev2/... as your target directory and you will have dev2/dir1/file1 and dev2/dir2/file2.

Edit to add: If you are looking for a command line solution, you can use Laurence's and edit the branch specification to your heart's content.

傲性难收 2024-10-13 11:58:19

您可以使用以下命令对文件列表进行操作:

p4 -x filelist.txt

请参阅

p4 help usage

-x 标志指示 p4 从
指定文件。如果指定“-”,则读取标准输入。

您可以通过这种方式直接将参数传递给 p4integrate,或者您可以使用相同的方法创建标签

p4 -x filelist.txt tag -l mylabel

,然后在集成的源端引用该标签

p4 integrate //depot/src_stream/...@mylabel //depot/target_stream/...

You can operate on a filelist using:

p4 -x filelist.txt

See

p4 help usage

The -x flag instructs p4 to read arguments, one per line, from the
specified file. If you specify '-', standard input is read.

You could pass the arguments to p4 integrate directly this way or you could use the same method to create a label

p4 -x filelist.txt tag -l mylabel

And then reference the label on source side of an integration

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