Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Find perforce Label info from Workspace

scmuser created the topic: Find perforce Label info from Workspace
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?

mnanjala replied the topic: Re:Find perforce Label info from Workspace
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.)

Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments
DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x