Jump to content

Unlocking Files from Command Line


DimancheCorp
 Share

Recommended Posts

Hello,

I'm working on an Unreal project with a small team of five and we've noticed a few files were "exclusively locked" while actually none of us had them locked on our machines.

I think it is because I recently changed the Lock rules of the repository to stop locking .uasset files and I think the "lock state" of these files must have been lost somewhere. They've maybe never been "unlocked" officially. It's more an annoyance than anything because each time we're saving our Unreal project we've got a source control warning from these files but we can still "make them writable" to save what we've done. This warning is getting old quick though ^^

Anyway I'm reading here that the admin (me) can unlock files manually using the "command line".

https://support.unity.com/hc/en-us/articles/360047499731--Workflow-How-to-unlock-a-file-

Problem is: I'm using Windows and I have no idea what and where the "command line" tool is. I'm feeling pretty dumb actually. I tried opening "cm.exe" since the command lines start with "cm" but to no avail. Can someone help me and specify exactly what tool I should launch?

Thanks for your help :)

Link to comment
Share on other sites

Posted (edited)

Thanks ! So I figured it could be the Windows cmd tool but running commands doesn't work for me there so I had given up that lead.

EDIT : nevermind it works! I could enter "cm unlock" and "cm showcommands". My bad.

However I think I'm supposed to write something to specify which file to unlock exactly after "cm unlock" but I don't know what exactly.

image.png.e8370d2ba477d1ad08b160ae46cf8c77.png

EDIT 2 : Ok it gives me a few more info but unfortunately it's inintelligible to me. Do items have individual "GUIDs"? I can't seem to find anything in the workspace explorer by rightclicking them.

image.png.afef9a70c45b3b079672925dc48c5856.png

Also "repserverspec" would be this according to the "help objectspec" command, but I have no idea where to find this information.

image.png.b001c0122955fcc99d8ad752173ef075.png

 

This really is not beginner friendly, damn ^^'

Edited by DimancheCorp
Link to comment
Share on other sites

Hi,

Please run the "cm unlock --help" to get the details and some examples.

You will need to get first the guid of the items tom unlock via "cm listlocks --server=YourOrganziation@cloud"

Regards,

Carlos.

Link to comment
Share on other sites

Hello Carlos,

Thank you so much ! It worked ! 

First I was trying "cm listlocks" without adding the server but by adding the server name I got a full list of locked GUIDs.

Then I stumbled a little bit with "cm unlock" but finally grasped that I needed to add the server since I was using the Cloud service.

Eventually the correct command was "cm unlock YourOrganization@cloud [GUIDs separated with a space]"

Again, thanks for your help! :D:D

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...