08-27-2011 11:13 AM
I created an application recently. Every day I will copy and paste the previous day project directory, rename it and modify it. When I finished I deleted the older folder and left the latest version on the desktop. Yesterday I thought to do quick modification after assessing executable application for few days. I found certain subvis were deleted/moved.
Is there a recommended method of saving every day project development work?
Solved! Go to Solution.
08-27-2011 11:17 AM
08-27-2011 02:40 PM
I second the motion. I was carrying "the latest" around on a USB key, copying it to desktop, working, copying back, going home, working, etc. So easy to make a mistake that way! With Subversion (or any other Version Control system), you always have the old versions, you can go back and "start over" at any time. A real life-saver.
08-27-2011 03:43 PM
I had a go with it. Didn't succeed 100%. When I make changes to vi and use diff with previous version I get the error
"Unable to open repository file".
I had added in settings of Tortoise SVN following commands under external programs
For compare
"C:\Program Files\National Instruments\Shared\LabVIEW Compare\LVCompare.exe"
%mine %base -nobdcosm -nobdpos
For merge
C:\Program Files\National Instruments\Shared\LabVIEW Merge\LVMerge.exe" %base
%mine %theirs %merged
Besides being able to see side by side differences in front panel and block diagram, I wonder if I could add multiple SVN repositories with different names in C directory for different projects? So I wonder if I could do the following:
Add multiple SVN repositories in C directory
In windows explorer create a blank folder and import this into one of the SVN repository
Go to repo-browser, choose path for above SVN repository and export my blank folder into a new empty folder. Name it for my first project and start working on this until its finished. So I hope, this way I will have a good record of all changes made to the project on daily basis. If this is the standard way then I wonder how we save changes to the project folder as every change will leave vi/folder with a red mark? And will I still be able to revert it back to an old version say a week old?
Thanks for help
Kind Regards
Austin
08-27-2011 04:35 PM - edited 08-27-2011 04:40 PM
You can have a repository for each project or a single repository for multiple projects. Using a single repository means that the revision number increments for every project. But that doesn't really matter. Think of the SVN revision number as an internal tracking thing and use tags.
It sounds like for what you want to do you can just create a tag every day. Commit all your work at the end of the day and create a tag something like "Project Name-8-27-2011".
My repository looks something like this
So when you create a project just make the three subdirectories trunk, tags and branches under it. Put all your code in the trunk then import the project.
After you import the project then check out the trunk into a working directory. Make your changes then at the end of the day do a commit. Right after the commit create a tag for the date. You will be ready to start working the next day in your working directory. At the end of the day do the same thing. No need to do another checkout or copy any directories anywhere. In fact copying directories for any kind of version control is definately the wrong way. Let Subversion do the managment for you. That's what it's for
You should also create other logical tags such as "Version 1.0", "Version 1.1" etc.
Using this you can easily get the code from any day or version. You can do either a checkout or an export.
08-27-2011 05:00 PM
Thanks for your reply
Sorry I am new to svn and source code management- would you mind telling how the tags are created.
Kind Regards
08-27-2011 05:55 PM
08-28-2011 08:10 AM - edited 08-28-2011 08:19 AM
One important correction. I said "repos/project name/project name_8_28_2011". That should read "repos/project name/tags/project name_8_28_2011". Also "the express" should read "the examples" That's what happens when I try posting from my phone using Swype.
Another advantage of using one repository for all your projects instead of a different repository for each is managment. You should back up your repository from time to time using svn dump. They can become corrupted which sucks.