× Perforce

Find perforce Label info from Workspace

  • scmuser
  • scmuser's Avatar Topic Author
  • Visitor
  • Visitor
6 years 3 months ago #323 by scmuser
Hi,

I have perforce workspace which is synced with p4 label specification. i want to know which label has been sync here in my workspace.

Could you please let me know the command for this?

Please Log in to join the conversation.

More
6 years 3 months ago #325 by mnanjala
It's not easy, especially when you consider that the workspace might be only partly synced to that label. i.e, the label was used with a more restrictive path than that in the label itself.

One rather crude method is to take each label that might apply to the workspace (you can determine this by the view in the labels, or if you use a meaningful naming convention) and do a test sync (p4 sync -n) of each one in the workspace. With luck, only one of them will show zero actions. However, it's possible that more than one will seem correct, or that none of them will.Essentially, you're trying to access label information backwards.
They are aliases for a particular state of the repository, but are not a state in and of themselves. (I.e., "synced to which label" isn't really meaningful in Perforce.)

If you need to duplicate the state of a workspace into another workspace, are you aware that workspace names are also labels?
You can sync one workspace to the same state as another by using the other workspace's name. (Assuming the views are compatible.)

Please Log in to join the conversation.

Time to create page: 1.520 seconds

What corporate management say about us?

Rajesh is very knowledgeable instructor he has a good exposure on real time issue and case studies he is experienced in large environment issue and challenges. I really liked how Rajesh used a lot of examples so that concepts were more easily understood, I like the examples that Rajesh give to help us remember things…they are usually real scenario, real life problems that we encounter frequently. <br /> He is well organised in terms of study materiel that you can refer anytime after you complete your course. His blogs are crisp and has to the point key content that he discussed during session to remember if you refer them remotely.

Gaurav Vishnoi
I am having 11+ years of experience in java, due to increasing complexity of system and environment I opted for this tanning and find it very useful., Noida
Sep 02, 2016

Authors

Login