Ask HN: Is anyone using lock-based version control?
Hi all,
I am just curious if anyone is using any lock-based approaches to version control for collaborative production of software or other digital assets. It seems like the merge model, exemplified by Git, is ubiquitous to the point that nobody is experimenting with any other workflows.
I think lock-based version control would would very well with trunk-based development. Separate devs branch from mainline, files get locked for everyone else as they are edited, and so it is necessary to work in very tight iterations and merge back to mainline very frequently.
Is anyone working with a lock-based approach to version control, either for personal projects, or in an organisational setting?
Thanks :)
(
16 comments
| 14 points
| on HN
)
Perforce does trunk based development and checkouts involve talking to the server (depot). This allows you to see who else has a file checked out, but doesn't block you from editing. I have used Perforce for multiple years in a thousand+ developer org, and have never actually needed to see who else has a file checked out.
Some of the versioned files being modified while working on game data are difficult to manually resolve conflicts in. At best they're a bunch of XML that you can kind of decipher but which contain various UUIDs to different assets and schematics connections which are not intuitive to resolve by hand. At worst they aren't even parse-able by a normal human. Then you have things like versioned animation sandboxes which have to be locked for any changes and submitted from a CI machine, not allowing any content creator to touch them lest they don't have the right source locally to reimport from. Files were even locked while running through a presub process to ensure no conflicts were introduced between presubmit initialization and commit. Users could check them out and work on them, but not submit until the in-flight presub touching those files was done (at which point you just hope that the conflict won't be too painful to resolve).
Having locked files was usually considered a hassle though, and more of a necessity of an imperfect workflow rather than a feature. Having the _option_ to lock was often very useful and practical, but actually running into a locked file when you just want to change an asset configuration or something could be annoying.
I do like to see who else has a file checked out because you can usually also tell which workspace it's checked out to, in our environment that's quite helpful since I can tell which PC it's on.
We have a main trunk, and a branch for each major version released, upon which we apply fixes and occasionally small feature updates as requested by customers.
We’re a small team, so it works pretty well for us. We’ve worked this way for 15+ years.
I used VSS myself back in the day, but things like git have a lot more features that make things like branching/merging much easier than fighting VSS.
Out of all the version control systems I've used (SCCS,PVCS,Envy/Developer,VSS,SVN and finally git/github), I found github to be the easiest to use whether building my own stuff or collaborating in larger groups. VSS was barely functional compared to even ancient things like sccs.
Most of these version control systems are part of a larger software package call a PLM system (Product Lifecycle Management) designed to help manage all aspects of product development from concept through to manufacturing.
https://en.m.wikipedia.org/wiki/Product_lifecycle
I also still experience it on Wiki edits, and for office document management systems. My experience there is that it works for a tiny amount of users, but once you start hitting the lock things get painful.
Although that said I did used to play a game where a community mod pack was delivered via SVN - you'd simply check out the repo into your mods folder and everything just worked, and updating became trivial. This was a fair while ago before Git LFS was mainstream and SVN had better large file support (as in many files in the hundreds of megabytes per each, not multi-gig assets - this was in the era post dialup but while residential "broadband" speeds were still quite slow).
The predecessors, SVN and CVS, also do not use a locked checkout model. The "C" in CVS is "concurrent": people working at the same time in multiple checked-out sandboxes (of a central repo), picking up changes with "cvs up", which merges.
Nobody in their right mind used version control with central locking in the last 35 years.