At work we use ClearCase as our source code repository. I want to find the equivalent of 'svn:externals', but for ClearCase. Is there such a thing?
-
What about usual links ? (Unix based environment ?) – khmarbaise Dec 08 '10 at 15:38
-
We are hosting in a Windows environment. Is the 'links' just a unix option? – rcravens Dec 08 '10 at 15:46
-
Related question, a component-based VCS and "svn:external" are not compatible: http://stackoverflow.com/questions/3131912/why-are-git-submodules-incompatible-with-svn-externals/3132221#3132221 – VonC Dec 08 '10 at 17:56
2 Answers
There is no equivalent in ClearCase to Subversion's svn:externals
property. The closest you can get is using ClearCase's internal symbolic links via the cleartool ln -s
command. If you're linking files, you can try using hard links, but they can cause user confusion.
I've had problems with svn:externals
and have stopped using them. It is way too easy to specify an actively changing HEAD as the svn:externals
link, and then forget about that when you create a tag. That can cause your tagged version to change without your knowledge.
In order to get around this you should only tag to a specified revision AND make sure you use revision pinning since a later revision might move or delete the directory tree you were linking to. (There's a debate whether a link to the tags
directory counts as a specified version, or whether you really need to use -r
).
A better way is to treat directories from subcomponents your linking to via things like svn:exterals
as actual releases and store them on some sort of release server. When you do your build of your application, you copy the needed files from the release server to your project much the way Maven and Ant/Ivy do. If your release is really just source code, you can store it on your release server as a tarball.
The big advantage is that this method is now independent of special features in your version control system.

- 105,218
- 39
- 216
- 337
-
+1 for release dependencies (in an external referential, imported through ant/ivy/maven), as opposed to source dependencies. Plus this is more detailed than my answer ;) – VonC Dec 08 '10 at 17:54
Not really:
- only ClearCase UCM comes close to be able to reference a set of file with a precise label (baseline)
- there is no way to include a set of file (component) within a component

- 1,262,500
- 529
- 4,410
- 5,250