如何使用p4命令行选项检索与工作空间关联的流或分支详细信息。我目前能够使用commnad检索与工作空间相关的所有数据,如下所示:
p4 client -o C:/myproject
在执行后,我获得了与工作区“C:/ myproject”相关的所有细节。所以,任何人都可以帮我搞清楚。我想通过仅使用我的工作区来检索流细节。所以请帮忙。已搜索了很多,但无法找到如何。
答案 0 :(得分:1)
如果你跑:
p4 info
从工作区内,它将显示客户端和客户端流:
User name: testuser
Client name: streams_ws
Client host: Jens-iMac.local
Client root: /Users/jen/workspaces/testing/15.1_streams
Client stream: //streams/dev
Current directory: /Users/jen/workspaces/testing/15.1_streams
希望这有帮助, 仁。
答案 1 :(得分:1)
要仅使用工作区检索流详细信息,可以使用'p4 client -o'命令。如果客户端是真正的流客户端,它将显示“流:”字段。例如:
示例A
$ p4 -ztag client -o bruno_jam
... Client bruno_jam
... Update 2011/11/07 12:16:05
... Access 2011/03/24 19:15:31
... Owner bruno
... Description Bruno's workspace
... Root C:\P4DemoWorkspaces\bruno_jam
... Options noallwrite noclobber nocompress unlocked nomodtime rmdir
... SubmitOptions submitunchanged
... LineEnd local
... Stream //jam/main
... View0 //jam/main/... //bruno_jam/...
$ p4 client -o bruno_jam | grep "Stream:"
# Stream: The stream to which this client's view will be dedicated.
Stream: //jam/main
您还可以使用“p4 clients”命令指定哪个客户端工作区与哪个流相关联。例如:
例B
$ p4 clients -S //jam/dev2.3
Client jc_jam 2011/11/07 root C:\P4DemoWorkspaces\jc_jam 'Joe's workspace '
$ p4 clients -S //pb/2.0-int
Client jc_pb 2011/11/07 root C:\P4DemoWorkspaces\jc_pb 'Joe's workspace for PB '
$ p4 clients -S //jam/main
Client admin_jam-main 2014/09/25 root /home/myadmin/myspaces/admin_jam-main 'Created by admin. '
Client bruno_jam 2011/11/07 root C:\P4DemoWorkspaces\bruno_jam 'Bruno's workspace '
参考
http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_clients.html
http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.html