QUOTE(torekp @ Oct 1 2007, 04:49 AM)
I'm perhaps a little late replying, but here's what I think. I use Subversion, so my examples will be typical for svn repositories, but the ideas should be usable with any SCC system. Subversion does not have any way to tell you where a particular file is used.
If you have subVIs that are shared among multiple projects, it makes sense to maintain those subVIs as separate projects. To that end, you should always use a tagged revision of that subVI project. Tags are considered immutable (although in Subversion this is by convention and not enforced), so always using a tag rather than the trunk guarantees that if someone (yourself?) changes the subVI, the version you use in your project will not change.
In Subversion, to include a subVI in your project, you have to attach an svn:externals property, pointing to the subVI URL in the repository, to your project. Then when you do an svn checkout on your project, you get the subVI too, in its own subdirectory under your project directory.
Now, if you need to change that subVI, which is maintained as its own project, here's what you do. First, completely exit LabView! Change the svn:externals property on your main project to use the subVI project's trunk instead of the tag. (Or change it to whatever revision was used to create that tag.) Then do an svn update, which will automagically replace the tagged version of your subVI with whatever's in the trunk. Now reopen the main project in LabView and it should be good. Now you can modify the subVI and your main project VI to fit your needs. When you're done, save everything, then close LabView to ensure all changes are actually saved. Then commit the subVI back to its trunk. Create a new tag for the subVI in its project. Back to your main project, change the svn:externals property to point to the new tag, do an svn update on your project and you'll get the new tag as part of your project. Open the main project in LabView to make sure all's well, then when you're happy, save the project, close LabView, then commit all of the changes for your main project, which includes committing the svn:externals change. Now you're good.
I have a couple of large LabView projects structured this way. One uses seventeen separate subVI projects, all brought in using svn:external, and I've found that this method is the only way of preserving my sanity when re-using subVIs. I should note that this methodology isn't something that's useful only for LabView; I use it with VHDL sources for FPGAs and C sources for microcontrollers, too.
One more thing: consider setting the svn:needs-lock property for all VIs. In each users's home directory you'll find a subdirectory called .subversion (or perhaps it's in C:\Documents and Settings\username\Application Data\Subversion, G-d I hate Windows), and in there will be a file called config. In that file is a section called [auto-props]. In that section, add the following lines:
*.ctl = svn:needs-lock=*
*.vi = svn:needs-lock=*
Then when you initially svn import a project or svn add a new VI or control, the needs-lock propery will be set. When you check out a file with this property, it will be read-only, so to modify it you need to get a lock from the repository (simple svn lock Foo.vi). You can then modify it. Nobody else can modify the file while you have it locked. This is a Good Thing because LabView VIs are binary and merging is basically impossible. Once you make your changes, commit the file and unlock it so if others need to modify it, they can do so.
Good luck,
-a
PS: if you're using Subversion on Windows, you really need http://tortoisesvn.tigris.org/' target="_blank">TortoiseSVN. Really.