ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
03-28-2015 07:30 AM
Hello,
I like working with svn command line tool and I'm trying to set the lvcompare.exe as the default diff tool. Does anyone knows which string to put in there?
I'm on Windows 8.1
Thanks,
Michel
03-28-2015 08:20 AM
Hello,
I found this link, I will try it and report.
http://labviewwiki.org/Set_up_differencing_capabilities
Michel
03-28-2015 09:47 AM
Hello,
I found the solution. So what I did is very similar to the link above, with more detail in the .bat file. This .bat file was taken from the "Version control with Subversion" book. So here are the steps to configure the svn command line diff tool to use the lvcompare.exe in Windows 8.1:
1. You need to add the following path in the envrionment variables PATH (make sure this is the right path on your computer): C:\Program Files (x86)\National Instruments\Shared\LabVIEW Compare
2. You need to save the following LVdiff.bat file under C:\Program Files (x86)\National Instruments\Shared\LabVIEW Compare
@ECHO OFF REM Configure your favorite diff program here. SET DIFF="lvcompare" REM Subversion provides the paths we need as the last two parameters REM These parameters 6 and 7 (unless you use svn diff -x, in which case, all bets are off). SET LEFT=%6 SET RIGHT=%7 REM Call the diff command (change the following line to make sense for your diff program) %DIFF% %LEFT% %RIGHT% -nobdcosm -nobdpos REM Return an errorcode of 0 if no differences were detected, 1 if some were. REM Any other errorcode will be treated as fatal.
3. If you don't want to use the full command line (svn diff --diff-cmd LVdiff.bat --force "Name.vi") but instead (svn diff --force "Name.vi") you must change the following line in the subversion configuration file located under C:\Users\Michel\AppData\Roaming\Subversion\config
### Set diff-cmd to the absolute path of your 'diff' program. ### This will override the compile-time default, which is to use ### Subversion's internal diff implementation. diff-cmd = LVdiff.bat
4. Now you should be able to compare any VI version using the svn diff --force command.
Michel
03-28-2015 02:55 PM
Here is another link that is similar, but different from, the first link. [I tend to do differencing on a Project level, i.e. several hundred VIs at a time, so I use other methods ...].
Bob Schor
03-30-2015 06:36 AM
Hello Bob,
I just want to point out to the readers that the configuration method I have described is applicable to the "Subversion command line tool" and not the Tortoise client application. This being said, I still use both tools, but the subversion command line tool is more versatile.
Michel
03-30-2015 08:56 AM
Thanks for the clarification. I must confess that I've been much too timid to try the Command Line Tool without a group of colleagues to bail me out when I really mess up! [I seem to have become the local TSVN guru here ...]. However, I have managed to write a LabVIEW utility that will "extract" the TSVN Revision number for a Project File (assuming Working Copy = Project), which I use to "label" my Executables (they identify themselves as <Program Name> <Major>.<Minor>.<Fix>.<Build>, where the fields are populated at Run Time using the new FileVersionInfo call, with the Build being inserted at "Build Time" using a Pre-Build Action that calls my function to store the Working Copy revision in the <Build> slot of the Build specification. The only "catch" is you need to build your executable twice -- the "Pre-Build Action" is a slight misnomer -- the Version information is apparently cached before the Pre-Build Action is called, so the first Build saves the Build Version for the second Build to use. Sigh.
BS
03-30-2015 11:53 AM
Yes, that is a good way to tag the code used to build your executable (I will also do it this way). Regarding the issue of LabVIEW caching the build info, have you try using the following in a post-build VI?
http://www.codeproject.com/Articles/37133/Simple-Version-Resource-Tool-for-Windows