Jump to content

Questions About Exclusive Check-Out


jdyeager

Recommended Posts

I'm trying to get exclusive check-out working with a Unity3D project, but I'm not able to tell if I have it set up correctly. My lock.conf file looks like this: 

 

rep: My Project lockserver:localhost:8087

*.unity

*.prefab

 

 

And it's placed in the 'server' folder of my Plastic install on my server machine. I've restarted the server (and the machine) to get the lock to take effect, but I don't see exclusive check-out working on client machines.

 

What I expected to happen is:

- lock.conf is configured on the server for a repository

- User A checks out a scene file on Branch A in that repository

- User B tries to check out the same scene on another branch (with the same root as Branch A)

- User B sees a message that they are unable to check out the scene because of the lock by User A on Branch A.

 

Instead I just see nothing. Both users are able to check out the same scene file with no warning to either. I've tried this both in the Unity editor plugin and in the standalone Plastic SCM client. I'm assuming that I'm probably just doing something wrong or that what I expect isn't the way exclusive check out works. But I'm not really sure what else to try at this point, so I thought I would ask here.

 

Also if it means anything, if I navigate to my workspace and use the 'cm listlocks' command I also see nothing. From what I understand that should show what locks are currently acquired, so getting nothing there seems to indicate that I must not have locking configured correctly on the server. Is there a command to tell what files are configured as 'lockable' by the server for a repository?

 

Thanks,

 

- Josh

Link to comment
Share on other sites

Hi, I´ve performed a fast test and it seems that it´s working. Please follow the next steps:

 

- Open a command line: "plastic --configure"  and check if your Plastic client is properly configured with "localhost" server.

- Create a "lock.conf" file with the same info you posted above.

- Open Plastic GUI --> Items --> Right-click --> Checkout "FileName.unity"

- Open a command line and type: "cm listlocks"

 

After that I´m getting the locked file as command output.

 

Please, review if the scene you are checking out is a ".unity" file.  Also review if user A and user B client are configured against the same "localhost" server. Maybe both users have their own "localhost" server but the lock information is not being shared between them.

 

Regards,

Carlos

Link to comment
Share on other sites

Thanks for the reply, I think I've figured it out. It seems that using "localhost" as the lockserver name will only work for a client running on the same machine as the server with the lock.conf file. I guess I assumed that clients on other machines wouldn't care what lockserver name was listed in the lock.conf file, since the server would be the one that needed to resolve it to a plastic server and it should know that localhost is itself.

 

From my testing though, it seems that if I use "localhost" in lock.conf, only a Plastic client running on the same machine as the server can get locks on files. Clients running on other machines can check out files with no effect.

 

If I change the lockserver name to the actual machine name (as listed in the Plastic client configuration interface), then all clients can acquire locks on files. Is this the expected behavior?

 

Thanks,

 

- Josh

Link to comment
Share on other sites

  • 4 weeks later...

I have a remote lock server configured. I have a lock.conf file in my project root.

 

e.g.:

rep:default lockserver:10.11.12.13:8087
*.conf
*.cs
*.txt

We have three clients: one local to the server and two remotes (on different laptops).

 

When I check out a file on one client, the other clients do not see anything different. Nothing suggestive of an exclusive checkout or a lock, etc. Other clients were able to change the file and commit/push their changes back to the server.

 

What am I missing?

Link to comment
Share on other sites

Hi,

 

Are you working on a distributed way, right? If it´s you case, the configuration is a bit different. From: http://www.plasticscm.com/whats-new/checkout.aspx

 

Locking is simple when you’ve a centralized set-up, but Plastic SCM is a DVCS, so you can be working on your own server on your laptop, or a team server and you still need to “lock” some files.

The solution is to designate a “lock server” so that each time you try to checkout a file that is defined as “lockable”, your server will contact the “lock server” and try to get exclusive checkout access.

If you look carefully at the “lock.conf” file, you’ll see there’s an entry called “lockserver” defined for each repository entry. It means you can define a different server as “lock server” than the one you’re currently using.

 

Regards,

Carlos

Link to comment
Share on other sites

First post here and I'm just trying to get my head around the exclusive checkout feature on a related issue:

 

Is it possible to perform exclusive checkout with a git based bitbucket repository?  I'm hoping to setup git on bitbucket as our main repository and have a few remotely located developers collaborate around that.  But I'm not sure if this is possible or if there are any perculiarities with the lock.conf file related to a git repository that I should know about. I'm guessing I can't do what I want because I need to point to an actual server with plastic SCM running on it?

Link to comment
Share on other sites

Hi,

 

The exclusive checkout feature ("lock.conf") is a Plastic feature independent from GitSync. GitSync will synchronize a Plastic and a git repository but you cannot use a "lock.conf" in a git repository. The "lock.conf" must point to a Plastic server.

 

Regards,

Carlos

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...