You are not logged in.

#1 2009-02-07 08:36:45

antis
Member
From: sweden
Registered: 2007-05-18
Posts: 108

Subversion question about projects and branches.

I really need to start understanding revision control and I thought I'd start with subversion.

I know the basics of creating a repository, importing and checking out code, but when it comes to deeper knowledge it's worse.

This spring I will help my sister setting up a wordpress webpage and I thought this would be an excellent opportunity to get some subversion training. Parallell to her wordpress site I will also create one for my self, so now I wonder what the best approach for this would be.

I was thinking about creating one repository with one project in it. This project would host the wordpress code and I would then split the development into two branches. I thought this would be a good idea since both sites will share the same base code.

Or is this really such a good idea? The two branches will most likely never be able to merge into one trunk with the exact same code.

Is it better to create one repository and two separate projects? Can these projects still share code beween them? If I make a great hack for my site I would like to merge it to my sisters project as well.

Well, any hints and tips is appreciated. If you just want to tell me to go and read a book that's just fine, but please be gentle wink

Offline

#2 2009-02-07 14:54:14

chrizel
Member
Registered: 2008-12-21
Posts: 4

Re: Subversion question about projects and branches.

I would recommend to use a distributed VCS like Git or Mercurial. Some of the left Subversion fans might not like it, but I - and many others - think, that DVCS is the one and only true way do do version control.

All the years before, I tried to understand CVS and then SVN. But it just didn't feel right. I understood it, but I didn't like to use it. Then I started to learn about and used Mercurial, and after that Git. And it was wow - DVCS is the first - after years of trying to get used to the traditional stuff - that just feels right. It feels, that it's the only right way do to it. So I love DVCS and I urge you to just learn the right stuff straight ahead and skip SVN.

So what's the advantage? Branching and merging is easier in DVCS and - compared to SVN - a lightweight thing. It is so much fun just to make experimental branches... you can make as many branches as you like and you can just delete them if it didn't turn out to be right. You can switch between your branches instantly and merge them as you like.

Look at all the open source projects that switched to DVCS the last years or months: Linux Kernel, Perl, Ruby on Rails, Android, WINE, Fedora, X.org, VLC, Prototype and much more all switched to Git. Projects like Mozilla, OpenJDK (Java), Pidgin etc. switched to Mercurial. So the DVCS changed the world of VCS in the last years. That's because the development model fits especially well into OpenSource projects. Companies might still use SVN - and yes - it might still have their small uses, but its just a matter of time and by the way, Git works well together with SVN via git-svn too.

So yes, it is kind of a DVCS hype, but hey - for me personally - Git changed my whole development style, and it makes so much more fun, because you gain a lot of power with simple branching and merging and tools like git-rebase, git-bisect, etc.

For further reading:
http://en.wikipedia.org/wiki/Git_(software)
http://git-scm.com/
http://www.kernel.org/pub/software/scm/ … orial.html

Offline

#3 2009-02-09 11:46:23

antis
Member
From: sweden
Registered: 2007-05-18
Posts: 108

Re: Subversion question about projects and branches.

Thanks for your input, eventhough you didn't really answered my question smile

Anyway, I decided to make two separate projects but keep them in the same repository. I think this is the way to go as the projects will never really be the same and a common trunk between them will never work...

Offline

#4 2009-02-14 02:42:08

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: Subversion question about projects and branches.

They can merge/whatever as long as you keep them in the same repository. There is no "project" in svn repository, only directories.

I tried git myself before but switched back, because there was nothing like apache svn module and TortoiseSVN shell integration on windows. I rarely use branch or any advanced features anyway wink

Offline

#5 2009-02-14 02:56:43

Basu
Member
From: Cornell University
Registered: 2006-12-15
Posts: 296
Website

Re: Subversion question about projects and branches.

Distributed VCS' are so popular because they the facilitate the mindset of most programmers: if you see somthing that is broken you can fix it quickly and worry about ordering commits later. If you suddenly have a great idea, you can branch and develop the idea without affecting the main branch. You can merge changes or discard them just as easily. I've used both SVN and Git for personal version control and I use version control more efficiently with Git.


The Bytebaker -- Computer science is not a science and it's not about computers
Check out my open source software at Github

Offline

#6 2009-02-14 04:29:05

aquila_deus
Member
From: Taipei
Registered: 2005-07-02
Posts: 348
Website

Re: Subversion question about projects and branches.

I see. Anyway, most of my projects are not OPEN or even shared  tongue The only reason I use VCS is to keep backup and changes. I use SVN for game modding and config files too. But for the OP .... hmmmm

Last edited by aquila_deus (2009-02-14 04:29:33)

Offline

Board footer

Powered by FluxBB