the state of thought on inter-/intra- project linking/sharing/externals
Date: 2005-12-27 07:25:54 CET
I have been using subversion professionally for over 8 months now, and am looking into its fitness and flexibility for a new project. One of the biggest concerns I hear from past and current users of VSS is lack of support for sharing files between or within projects. The answers I have seen to this are typically to use symbolic links for within a project (at least under *nix) and use svn:externals between projects. Each method has its own set of tradeoffs and shortcommings. I'm interested in bridging these gaps, but would first like to understand why subversion handles these as it does, and what methedologoical, design, and implementational considerations went into how subversion is today.
For shared files within a project symlinks are usually the most intuitive answer. They do, however have the following issues:
1) They are implemeted by the client OS, so they are hardly ubiquous. Even with such concepts as the "Windows Shortcut" (which is hardly a shadow of a Unix symlink) there is certainly no pairity between platforms.
2) If a user is checking out only PART of a project the symlink may very well point to a parent directory that was NOT checked out, and would therefore be broken.
2b) You can't symlink between projects without knowing where the other project is to be checked out.
3) symlinks will need to be updated in the event a linked file is renamed, moved, or removed.
The alternative to symlinks is svn:externals. svn:externals is implemented WITHIN subversion, so it is much closer to what the problem we're trying to solve, but it too has some issues:
1) svn:externals only supports directories, not individual files (I suspect this has something to do with having a single .svn subdirectory in each directory, but please comment.)
2) commits aren't recursive. (how about updates? etc?) I can immagine situations where you may want recursive or non-recursive commits. should this be added, perhaps, as a per-external setting?
3) URLs need to be absolute, making self-referential projects more work to update in the event of a directory layout change.
This is an archived mail posted to the Subversion Dev mailing list.