Click here to Skip to main content
15,922,427 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Codeproject,

I've been a programmer for quite some years now, and have never bothered to search a way to properly back the project up(automatically). After a while of searching today I found out something called an 'SVN', I've managed to set it up locally without a server as I do not wish to share this on a server.

I was wondering there was a way for my SVN 'VisualSVN' on how to make it automatically back it up as a new version once the solution is build(Either by debugging, or a force build.).

I'm a complete chimpanzee if it comes to external tools for Visual Studio, so I'm sorry if this should be obvious.
Posted

1 solution

The concept of "backup" is incompatible with the idea of Revision Control, which is designed to avoid backing up. Instead, the whole history of all changes is saved. Of course, you can backup the whole codebase, and you can create tags, which is not a part of Subversion, but is a common practice. The tags are not saved on each build, they are saved on important steps, such as releases, or some steps when you change the version of your software.

However, you may mean simple commit of the most recent changes. And still, I'll strongly recommend not to include even the commit to the build project. You should better isolate development, batch build and commit to code repository. Normally, a developer builds the solution several times, tests it preliminarily, and, after making sure the changes make sense, commits them to the repository. The idea is: commits could be quite frequent, sometime in a few minutes after each other, but they should be consistent, never disrupt the work of other developers of the same solution (mistakes happen though, but I'm talking to principles). Each time a developer creates a consistent set of changes of fixes in one or very few aspects of the code, it makes sense to commit. At the same time, in the middle of just one such change, a developer may need to do full batch build several times. And what, do you want to commit some possible garbage?

I would advise you to review your development cycle instead. At the same time, batch commit is not a problem at all. Just read the Subversion client documentation (regular console-only client, of course). But, first of all, think at using just a good client. You bay never need such batch. Better think of perfect comprehensive batch build, a must for cultured development cycle.

—SA
 
Share this answer
 
Comments
Dimitri Nostarik 9-Jul-14 15:48pm    
Wise words from a wise man. I think I should just learn myself to commit as soon as an important factor changed. Thanks a bunch.
Sergey Alexandrovich Kryukov 9-Jul-14 17:48pm    
My pleasure; I'm very glad if my advice helps you.
Good luck, call again.
—SA
Dimitri Nostarik 9-Jul-14 19:01pm    
Your advise always helps me, I thank you for that. The last seven to nine years of programming(I'm 17) have been getting better and better.
Maciej Los 9-Jul-14 16:00pm    
Very, very well explained!
+5!
Sergey Alexandrovich Kryukov 9-Jul-14 17:49pm    
Thank you, Maciej.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900