10-01-2019 02:36 PM
That's a good add-on - since you can read the version...hmm I might look into that too.
10-29-2020 12:57 AM
Previously used Git for text-based languages, so i prefer Git-Bash console. Acording to Labview requirements on LVmerge I suppose to use TortoiseGit GUI due to its ability to perform an external tool for merge expansion.
Question to those who use console Git. Is there any way to modify .gitconfig file to allow use LV merge via console version?
10-29-2020 09:38 AM
Here is an article on how to set it up.
https://www.sasworkshops.com/setting-up-lvcompare-and-lvmerge/
10-29-2020 12:02 PM
LVCompare and LVMerge ship with LabVIEW, is there something special about the one you're referencing in GitHub? I always thought that it started there and then it was officially adopted into LabVIEW.
Also, based on my searches, I found that many people required a wrapper script because Git didn't provided absolute paths and something about order of the arguments IIRC.
#!/bin/bash
# Args: \"$REMOTE\" \"$LOCAL\"
# Only works with diff, not for difftool
# Method to determine absolute path
# The -W parameter on the pwd command is necessary to return the Windows version of the path.
# Not using the -W parameter will result in a conversion of temp directory to a 'tmp' path meaningful only in the Linux
# environment.
# Piping the result through tr '/' '\\' translates the forward slashes to backslashes.
# Windows understands forward slashes, but LVCompare.exe does not.
abspath () {
(
DIR=$(dirname "$1")
FN=$(basename "$1")
cd "$DIR"
printf "%s/%s" "$(pwd -W)" "$FN" | tr '/' '\\'
)
}
lvcompare="C:\Program Files (x86)\National Instruments\Shared\LabVIEW Compare\LVCompare.exe"
local=$(abspath "$4")
remote=$(abspath "$3")
echo Launching "$lvcompare"
#echo Launching "$lvcompare" -nobdpos -nofppos "$local" "$remote"
exec "$lvcompare" -nobdpos -nofppos "$local" "$remote"
10-29-2020 12:09 PM
The Github repository I point to in my blog post is for a wrapper, just written in LabVIEW. You still need the lvcompare.exe and lvmerge.exe which come with and are automatically installed by LabVIEW Professional.
That Github repo is all open-source so you can go check out exactly what it is doing. It works, so I never really had the need. It does have something to do with absolute versus relative paths, but I don't know all the details.