10-29-2015 04:26 AM
So I have it kinda working. I just used the default VI created for post build actions and ignore the input/output panes that I dont use (this is very annoying why they cannot be edited- but we'll live). It works fine in that it writes the SVN number to the config file at build time which can be read by the application each time. However when I do an SVN commit the SVN revision number is incremented so SVN is always 1 greater that what my application shows. Obviously there is a simple work around and just add 1 to it but this is not the best way.
10-29-2015 08:07 AM
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
10-29-2015 08:28 AM
And that is where the challange lies.
10-29-2015 09:12 AM
... and the Fix for this is surprisingly simple! If you have read any of the Subversion or Tortoise books, you'll see that they recommend that you only put "Source code", not "binaries", under Version Control. Of course, LabVIEW "source" is in "binary" format, but I interpret this to mean "Don't put Builds under Version Control".
Here's how I handle this (and I've been doing this since I started using Tortoise SVN, maybe 5-7 years ago).
A peculiarity I've noticed with TortoiseSVN is that these properties often need to be applied twice (recursively) for some of the "ignore" things to stick. In particular, if you put a new Folder in your Working Copy, you'll need to repeat the recursive Property application.
You might end up with things in your Repository that you (now) want excluded. Use the TSVN "Unversion and Add to Ignore List" command to unversion them. [This gets the .exe's out, for example]. If you have a non-changing .dll or something you really do want to keep in your repository, you can always simply TSVN-Add it by hand.
So now, all you need to do is open your Project, do some modifications, close the Project (that's the step I usually forget to do), Commit, re-open, and Build. Your Build will get the latest Revision Number, and closing the Project won't result in any Subversion changes (because (a) the Builds are "somewhere else", and (b) we set Subversion up to ignore the results of the Build).
Bob Schor
11-03-2015 04:49 AM
That is indeed quiet simple. My folder structure was fine to begin with. I do the build after the commit. I dont think the application and installer need to be added to the ignore list as I dont think builds are seen as changes to SVN. I added them anyway just in case. All is up to date now.
Thanks.
Mark.