Reputation: 483
How to retrieve back the stream or branch details associated with workspace using p4 command line option. I currently able to retrieve all data with respect to the workspace via using commnad as follows:
p4 client -o C:/myproject
And after its execution i get all the details associated with the workspace "C:/myproject". so, can anybody please help me in figuring it out. I want to retreive stream details by using my workspace only. so please help. Have searched a lot but not able to find how.
Upvotes: 1
Views: 2891
Reputation: 803
To retrieve stream details by using the workspace only, you can use the 'p4 client -o' command. If the client is truly a streams client, it will show the 'Stream:' field. For example:
EXAMPLE 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
You can also use the 'p4 clients' command to specify which client workspaces are with which stream. For example:
EXAMPLE 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 '
REFERENCES
http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_clients.html
http://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.html
Upvotes: 1
Reputation: 1023
If you run:
p4 info
from within the workspace, it will show you the client and the client stream:
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
Hope this helps, Jen.
Upvotes: 2