检测 Perforce 未打开的修改文件 [英] Detecting Perforce unopened modified files

查看:36
本文介绍了检测 Perforce 未打开的修改文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试找出一种方法来检测未打开进行编辑但已在本地修改的文件.p4 fstat 为任何给定的文件返回一个值 headModTime,但这是仓库中的更改时间,不应等于文件系统的 stat> 上次修改时间.

I'm trying to figure out a way to detect files that are not opened for editing but have nevertheless been modified locally. p4 fstat returns a value headModTime for any given file, but this is the change time in the depot, which should not be equal to the filesystem's stat last modified time.

我希望存在比备份原始文件、强制文件同步然后运行差异更轻量级的操作.想法?

I'm hoping that there exists a more lightweight operation than backing up the original file, forcing a sync of the file, and then running a diff. Ideas?

推荐答案

来自:http://answers.perforce.com/articles/KB/3481/?q=disconnected&l=en_US&fs=Search&pn=1

具体参见第 2 步:

2.接下来,打开编辑"任何已更改的文件:

2 . Next, open for "edit" any files that have changed:

p4 diff -se //myclient/... | p4 -x - edit

p4 diff -se 返回相应客户端文件与客户端 #have 修订版有任何不同的库文件的名称.

p4 diff -se returns the names of depot files whose corresponding client file differs in any way from the clients #have revision.

这篇关于检测 Perforce 未打开的修改文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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