在 p4 还原后删除新文件 [英] Deleting new files after a p4 revert

查看:138
本文介绍了在 p4 还原后删除新文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在远程机器上测试对源代码所做更改的工作流程如下:

My workflow for testing my changes to our source code on a remote machine is the following:

1) 在本地机器上:搁置我想测试的更改

1) On local machine: Shelve changes that I'd like to test

2) 在远程机器 (ssh) 上:

2) On remote machine (ssh):

$ p4 revert //... 
$ p4 sync
$ p4 unshelve -s <changelist number>
$ ./run_test_scripts

当我只对已经存在的文件进行更改时,这似乎工作正常.如果我添加了新文件,这些文件将在 p4 unshelve 期间创建,但不会在 p4 revert 期间删除.文档说这就是 p4 revert 所做的,所以这并不意外,但是如果我想再次测试相同的文件会导致一些问题:

This seems to work fine when I've only made changes to files that already exists. If I've added new files these will be created during p4 unshelve, but not deleted during p4 revert. The documentation says that this is what p4 revert does so it isn't unexpected, but causes some problems if I want to test the same files again:

$ p4 revert //... 
<some file>#none - was add, abandoned
$ p4 sync
File(s) up-to-date.
$ p4 unshelve -s <changelist number>
Can't clobber writable file <some file>

有什么办法可以删除 Perforce 放弃的文件?

Is there way I can delete the files abandoned Perforce?

推荐答案

我认为您正在寻找的是 p4 revert -w.来自帮助:

I think what you're looking for is p4 revert -w. From the help:

-w 标志会导致打开的文件在恢复时从工作区中删除.

注意:我将 2013.2/719516 客户端用于 2013.2/708877 服务器,以防最近添加了开关...

Note: I'm using the 2013.2/719516 client against a 2013.2/708877 server, in case that switch was added recently...

这篇关于在 p4 还原后删除新文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆