Ian Bicking: the old part of his blog

Distributed vs centralized scm comment 000

I just stumbled across this thread again, and noticed that something appears to have gone uncorrected here. Subversion does do branching cheaply. The whole tree is not copied into the branch: subversion internally stores what amounts to a symbolic link.

It may be the case that if you check out from the top of the tree, you'll get multiple copies of the files. I'm just pointing out how the repository itself works. (This is all described in the svn book.)

Comment on Re: Distributed vs. Centralized Version Control
by Kevin Dangoor


I don't think that's the duplication Greg is talking about. What's he's referring to is this sequence:

  1. Branch trunk -> foo (cheap, no dup files)
  2. hack hack hack on trunk (modify 20 files)
  3. Merge trunk changes to foo (oops)

At stage 3, we've now got 20 modified files in foo, for which we are storing diffs in both the trunk and in foo. Instead, the modified trunk files could be "re-branched". You'd still need a new revision in the branch, obviously, but it would just be with the new pointers. This is probably yet another issue that really needs true branch and merge history tracking.

# Steve Greenland