[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Subversion Doesn't Have Branches aka Crossing the Streams aka Branches as First Class Objects?

From: Zé <jose.passes_at_gmx.com>
Date: Sun, 19 May 2013 09:51:22 +0100

On 05/18/2013 09:16 PM, Johan Corveleyn wrote:
> So what's the actual problem (or problems) with SVN's branching and
> tagging? Where does it hurt your workflow? What would make SVN not
> "hurt you" in that way?
>
> Please be concrete, and give examples of what really bothers you as a
> user or an admin in your daily work. Saying that "branches are not
> first class", or "I don't like it that Subversion implements
> branches/tags by copying directories" are too abstract, and really not
> relevant. Why should I care how SVN implements its branches
> internally, as long as it works for the use cases I need?

This has already been repeated multiple times. Didn't you followed the
thread?

Again, the problem is that subversion does not support branches or tags.
  All it supports is basic file operations on a file system, and they
are not adequate for simulating branches or tags.

here's a small, concrete, reproducible example.

1) Create a brand new repository:

$ svnadmin create /tmp/repository

2) Set the repo initial layout:

$ svn mkdir branches tags trunk

3) Populate the trunk:

$ svn checkout file:///tmp/repository working_copy
$ cd working_copy/trunk
$ touch main.c
$ svn add main.c
$ svn commit -m "Initial import"

4) Start a feature branch by copying the trunk directory to a dedicated
subdirectory:

$ svn copy file:///tmp/repository/trunk
file:///tmp/repository/branches/awesome_feature

5) Work on the feature:

$ svn checkout file:///tmp/repository/branches/awesome_feature/ feature
$ cd feature
$ touch good_idea_but_undoable.c
$ svn add good_idea_but_undoable.c
$ svn commit -m "This is a dead-end development branch, doomed to be a
complete waste of developer's time"

6) Delete a development branch subdirectory:

$ svn delete file:///tmp/repository/branches/awesome_feature

7) This is the problem:

$ svn checkout --revision 3 file:///tmp/repository/branches wc
$ cd wc && tree

ze_at_ubuntu:wc$ tree
.
└── awesome_feature
     â”œâ”€â”€ good_idea_but_undoable.c
     â””── main.c

1 directory, 2 files

-- 
Zé
Received on 2013-05-19 10:51:59 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.