用户工具

站点工具


linux:p4

差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录前一修订版
后一修订版
前一修订版
linux:p4 [2021/03/15 19:02] – [13. p4 changes] zhangguolinux:p4 [2023/03/17 10:12] (当前版本) – 外部编辑 127.0.0.1
行 37: 行 37:
 将已经放入p4 changelist,但是还没有p4 submit的文件,回退到修改前的版本。 将已经放入p4 changelist,但是还没有p4 submit的文件,回退到修改前的版本。
  
 +<code bash>
 +p4 revert xxxx_file
 +</code>
  
 +
 +<code bash>
 +p4 revert //...
 +
 +Revert every file you have open, in every one of your pending changelists, to its pre-opened state.
 +
 +p4 revert -c default //...
 +
 +Revert every file open in the default changelist to its pre-opened state.
 +
 +p4 revert -n *.txt
 +
 +Preview a reversion of all open .txt files in the current directory, but don't actually perform the revert.
 +
 +p4 revert -c 31 *.txt
 +
 +Revert all .txt files in the current directory that were open in changelist 31.
 +
 +p4 revert -a
 +
 +Revert all unchanged files. This command is often used before submitting a changelist.
 +
 +</code>
 ===== - p4 diff ===== ===== - p4 diff =====
 只有放入p4 changelist里面的文件 (即需要先用p4 edit xxx命令),才可以进行p4 diff。 只有放入p4 changelist里面的文件 (即需要先用p4 edit xxx命令),才可以进行p4 diff。
行 43: 行 69:
 这跟git不一样,git可以直接git diff, p4 有些麻烦。 这跟git不一样,git可以直接git diff, p4 有些麻烦。
  
 +
 +
 +
 +===== - p4 files =====
 +显示p4指示路径有哪些文件。
 +
 +<code bash>
 +p4 files //depot/... Provides information about all files in the depot.
 +p4 files //clientname/... Provides information about all depot files visible through the client view.
 +p4 files @2011/03/10 Provides information about all depot file revisions that existed on March 10, 2011.
 +p4 files @2011/03/31:08:00,@2011/03/31:17:00 Lists all files and revisions changed during business hours on March 31, 2011.
 +p4 files //depot/proj2/...@p2lab Lists files and revisions under the directory //depot/proj2/... tagged by label p2lab.
 +p4 files //depot/file.c Show information on the head revision of //depot/file.c. (that is, the highest revision in the implied range of #1,#head)
 +p4 files -a //depot/file.c Show information on every revision of //depot/file.c (that is, all revisions in the implied range of #1,#head)
 +p4 files -A //arch/depot/proj/... If an administrator has used p4 archive to transfer //depot/proj/... to an archive P4 Command depot named arch, displays information about the files in the archived project.
 +</code>
  
 ===== - p4 print ===== ===== - p4 print =====
行 56: 行 98:
 将p4 changelist里面的文件上传到p4 将p4 changelist里面的文件上传到p4
  
 +
 +<code bash>
 +p4 submit -d "xxxx"
 +</code>
  
 ===== - p4 changelist ===== ===== - p4 changelist =====
行 108: 行 154:
 p4 删除文件。 p4 删除文件。
  
 +===== - p4 client =====
 +
 +删除p4 client
 +
 +<code bash>
 +p4 [g-opts] client -d [-f [-Fs]]clientname
 +</code>
linux/p4.1615806179.txt.gz · 最后更改: 2023/03/17 10:12 (外部编辑)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki