Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What SCM does support symlinks under Windows and Linux?

Tags:

I found out that subversion doesn't support symlinks under Windows.

I'm wondering if somebody knows a SCM tool that is able to work with symlinks under both Windows and Linux?

SCM tools currently missing symlink support under Windows:

  • Clear Case
  • Subversion
  • Mercurial
  • Perforce
like image 502
sorin Avatar asked Jan 30 '10 07:01

sorin


1 Answers

Most SCM focus on storing normalized data (think of your SCM as a database). This means that they store source files and build scripts instead of storing executable files derived from them. People could store both but it leads to unnecessary duplication.

Similarly, symlinks are references to other files and represent a similar problem to data normalization.

Furthermore, pointers in general are hard to reason about. Adding support for pointers (symlinks) in a SCM means that certain operations will need to examine where the symlinks point and act accordingly. This makes merges harder, adding/updating symlinks is tricky because you need to figure out where it points (in repo vs. out of repo, two symlinks to same file, etc).

For these reasons, most VCS/SCM do not allow you to manage symlinks. Most SCM do have support for user defined hooks. Using custom hooks or other scripts to manage the symlinks is a better approach because it means the SCM doesn't have to reason about them (it's ignorant to them), and you are side-stepping the issue of data normalization that they create.

So, in conclusion, you're best off writing scripts that manages your symlinks and then calling those at the appropriate times (clone/checkout, update/commit, etc).

like image 170
Jason Dagit Avatar answered Oct 11 '22 13:10

Jason Dagit