Source Code Control
Source Code Control with Subversion
Since we have got problems with the built-in SCC with large projects and LabVIEW 8 does not support the built-in SCC anymore, we decided to switch to
SubVersion@GSI. Please follow the previous link for details.
TortoiseSVN (Windows Shell Extension for Subversion) is a very nice graphical Subversion client interface, completely integrated in Windows-Explorer. It is recommended to use the
PushOK SVN Proxy. It makes renaming and moving of file by using the LabVIEW Project Explorer much easier.
Attention: I have got problems with the LabVIEW SCC integration via PushOK (which supports features of Subversion 1.5.1) when using Tortoise Version 1.6.1. You should stay with Tortoise Version 1.5.6,
SVN\TortoiseSVN-1.5.6.14908-win32-svn-1.5.5.msi to avoid such problems.
Refer also to:
Repository Structure
Following directory structure was created. Especially we want to distinguish between
GPL and non GPL software.
Since VIs saved with LV 8 cannot be read with previous LV versions we propose to use the LabVIEW version as starting point for the subsequent directory trees. More could be added if necessary.
labview
- trunk
- C ...
- LVxx (xx Î {71,80})
- GPL
- instr.lib
- Projects
- CS-Framework
- TargetScanner
- ...
- Tools
- user.lib
- non_GPL
- instr.lib
- Projects
- Tools
- user.lib
- ...
- Tags
- Branches
Subversion Repository
The SVN repository for LabVIEW projects is:
https://subversion.gsi.de/labview.
How to get access?
Getting access to our Subversion repository is a two step process.
LDAP Account
Please follow
this link to get a GSI Web Login (LDAP) Account. Please specify the repository URL which you want to access, see above.
- Remark 1: You have to do this only, if you are not working at GSI. GSI employees have an LDAP account in any case. Regards from PROZ2 .
- Remark 2: You need to login first and change your initial password before you can use the subversion repository.
Granting permissions
Adding you (your LDAP user name) to the authentification file of the Subversion repository. Please contact
HolgerBrand, tel 2123,
DennisNeidherr, tel 1885, or
DietrichBeck, tel 2520.
Access Rights
By default, all users have read-only access to the complete repository. However, there are two exceptions.
- Authors and maintainers get write access to their code.
- The repository also contains non-GPL code. If requested by the authors, the general read permission can be removed from the folders containing their code.
Using a Subversion Repository
Local LabVIEW SVN Working Copy
Your local working directory should be
F:\LVSCC on Windows. (svn checkout
https://subversion.gsi.de/labview/trunk F:\LVSCC)
This is a good choice since LV stores absolute pathes to subVIS. All LabVIEW developers working on the same project should use the same root directory to avoid changed VIs due to different relative pathes only.
Viewing and Merging Differences of LabVIEW sources
Refer also to
https://decibel.ni.com/content/docs/DOC-2936.
Viewing Differences of VI/Ctl
In order to view differences of VIs you need to configure the Tortoise to use LabVIEW as external viewer.
Tortoise context menue->Settings->External Programs->Diff Viewer->Advanced: Add a new entry.
- Extension: .vi
- External Program: E:\Program Files\National Instruments\Shared\LabVIEW Compare\LVCompare.exe %base %mine (Two blanks between exe and parameter!)
Merging VI/Ctl
How to
Use Graphical Merge To Combine Individual LabVIEW VIs.
In order to merge VIs you need to configure the Tortoise to use LabVIEW as external merger.
Refer also to
this article for configuration help.
Tortoise context menue->Settings->External Programs->Merge Tool->Advanced: Add a new entry.
- Extension: .vi
- External Program: E:\Program Files\National Instruments\Shared\LabVIEW Merge\LVMerge.exe %base %theirs %mine %merged (Two blanks between exe and parameter!)
You also need to set this external program in the advanded PushOK settings from LabVIEW.
How to deal with Instrument Driver Libraries created using the Wizard
I do not really know why, but moving an instrument driver library created with the instrument driver wizard in LabVIEW\instr.lib to another location, e.g. your subversion working directory, breaks of course the function palettes and more seriously: Projects that are using the driver from this location indicate missing files and those files need to be replaced in all VIs using them. This is at least my observation.
LabVIEW 2009 can ignore .svn folder. Therefore I would recommend to use subversion working directories in LabVIEW/instr.lib:
- Add the instrument driver sources from LabVIEW\instr.lib to the subversion repository using the repository browser.
- Zip or delete the instrument driver directory.
- Checkout of the instrument driver to LabVIEW\instr.lib from the repository
This works at least for me.
Source Code Control with Git
Git is a fast version control system supporting distributed repositories that also supports Subversion.
- http://git-scm.com/
From here you can download git and find documentation and tutorials.
- https://github.com
This platform is hosten open source projects free of charge. It could be used to share your projects with people out of GSI.
- more information about using LabVIEW with Git: Git-User-Group@ni.com
- http://gitorious.gsi.de/
The scientific computing of GSI-IT is using Gitorious as central repository for GSI activities. It is not visibles from outside GSI! You can ask them, if you can get an account there. (In case of major interest we would need to setup and maintain our own Gitorious server for our LabVIEW activities.)
- You will need a SSH-Key. A generator can be found here.
- https://github.com/joerg/LabViewGitEnv
Here you can find a description how to setup the Git environment to support LabVIEW Compare and Merge.
Please contact
HolgerBrand if you need advice.
--
HolgerBrand - 20 Oct 2011