P4 对特定文件夹/文件的更改
我试图在 perforce 上获取特定文件夹结构的最后一次签入,我知道“p4changes-m1'filepath”可以完成这项工作,但问题是文件路径必须是仓库文件-小路。另一方面,我拥有的是本地文件路径,例如“C:\Android\Version10.2\MyApp\”,而不是“//depot/Andoid/Version10.2/MyApp”。
我尝试使用“p4 fstat”、“p4 where”和“p4 files”等命令,但对于所有这些命令,它都可以很好地处理仓库文件路径,如果我给出本地文件路径,它不断抱怨文件不在客户端/没有此类文件。
另一个问题是我无权更改计算机上的 p4client。我该如何让它发挥作用?
总结起来,基本问题是能够获取我拥有本地文件路径的文件夹/文件的最后更改。
问候
I am trying to get the last checkin on a particular folder structure on perforce, I know "p4 changes -m1 'filepath" does the job, but the problem is the filepath has to be the depot file-path. What I have on the other hand is the local filepath something like "C:\Android\Version10.2\MyApp\" and not "//depot/Andoid/Version10.2/MyApp".
I tried using commands like "p4 fstat", "p4 where" and "p4 files", but for all of them it works fine with the depot file path, if I give the local file path, it keeps complaining file(s) not on client/no such file(s).
The other issue is I dont have rights to change the p4client on the machine. How do I get this to work?
Basic question then to sum up is being able to get the last change on a folder/file for which I have the local filepath.
Regards
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果要对文件运行任何命令,这些文件必须位于工作区中。问题可能是,如果您不提供计算机名称,Windows 上的 p4 默认将计算机名称作为工作空间名称。
因此,您必须运行其中
set P4CLIENT=
然后运行 p4changes -m1
,或 p4 -c <客户端名称>更改 -m1
可以是本地文件系统上的文件,因此C:\Android\Version10.2\MyApp\ 是可以接受的。
If you're going to run any commands on files those files have to be in the workspace. The problem is probably that p4 on Windows defaults to the machine name as the workspace name if you don't supply one.
So you either have to run
set P4CLIENT=<clientname>
then runp4 changes -m1 <filename>
,or
p4 -c <clientname> changes -m1 <filepath>
where<filepath>
can be the file on your local file system, soC:\Android\Version10.2\MyApp\
would be acceptable.p4 filelog -m 1
能给你你想要的吗?您可以添加-l
(小写 L,不是一个)开关来获取更多信息。Does
p4 filelog -m 1 <filename>
give you what you want? You can add the-l
(lowercase L, not one) switch to get more information.如果您有本地文件(而不是仓库路径),那么您还应该有客户端规范。您需要使用
-c
选项来指定:If you have a local file (as opposed to the depot-path), then you also should have a client-spec. You need to specify this with the
-c
option: