PolishRenegade Posted March 24, 2014 Report Share Posted March 24, 2014 Hello, I'm wondering if it's possible to tell Plastic to automatically check-out files placed in the lock.conf file for the entire workspace? And force update on it? The goal is the ensure that only the latest version of the file can worked on (I know, blasphemy! in the world of branched version control) at any given time on a workspace. In other words: - Once changed, a file is automatically exclusively checkout for all users - Even after "Checking-in", it is still locked for everyone who is not on the same branch - Only the latest, on the same branch, checked-in version of the file can ever be modified I guess it's a bit exotic but it would essentially remove all merging conflicts with not merge-able files. Thank you! Link to comment Share on other sites More sharing options...
manu Posted March 25, 2014 Report Share Posted March 25, 2014 Hi! What you can do is to tell the Plastic SCM server to only allow to checkout a file if the revision the the HEAD one. That will present merge operation since a client working with an outdated revision will get an error if he try to check it out, then he will need to update to get the latest and finally check it out if nobody has it locked. To configure it you need to add a keyword ("requirehead") to each rule in the lock.conf file. rep: myrep lockserver:localhost:8084 requirehead *.pdf During check-out on the client side, if the rule says "requirehead", then you check whether the head of the branch is the working changeset. If not, it cancels the exclusive checkout and tells you that you need to update the branch. This goes for both the CLI and the GUI. Hope it helps! Link to comment Share on other sites More sharing options...
PolishRenegade Posted March 25, 2014 Author Report Share Posted March 25, 2014 Thank you for answering. Unfortunately this doesn't work on multiple branches. I already had "requirehead" in my lock.conf. So, I tried to checkout a file that wasn't the revision head of a file, the revision head was on another branch, child of it. The checkout worked. So when my actual revision from the other branch would had merged, it would had created a conflict. Consider the following branches: 1(root) 1-1 (branch from 1) 1-2 (another branch from 1) You can checkout and check-in the file on branch 1-1 and you can also do it on branch 1-2, as long as both checkouts are in their own branch head changeset and not at the same time. So when branches 1-1 and 1-2 merges back into the root branch 1, you get a conflict. The only solution is to have an automatic check-out that would only be checked-in at merge. Is that possible? Link to comment Share on other sites More sharing options...
manu Posted April 1, 2014 Report Share Posted April 1, 2014 Sorry that is not possible right now. On the other hand it sounds interesting, do you mind insert the idea inside our uservoice page? www.plasticscm.uservoice.com/forums/15467-general Link to comment Share on other sites More sharing options...
PolishRenegade Posted April 14, 2014 Author Report Share Posted April 14, 2014 That's unfortunate. I've posted the suggestion: http://plasticscm.uservoice.com/forums/15467-general/suggestions/5777349-workspace-wide-exclusive-checkout Thank you. Link to comment Share on other sites More sharing options...
manu Posted April 28, 2014 Report Share Posted April 28, 2014 Thanks for your time adding the new feature suggestion! Link to comment Share on other sites More sharing options...
PolishRenegade Posted May 30, 2014 Author Report Share Posted May 30, 2014 Update; I've added more use-case information to the suggestion for more precision in response to a user's comment. Link to comment Share on other sites More sharing options...
manu Posted June 2, 2014 Report Share Posted June 2, 2014 Thanks, let me notify Pablo. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.