Hi guys:
I'd like to understand when creating a branch, SVN just make a entire copy from trunk or make use of some mechanism to achieve it?
Thanks.
Hi guys:
I'd like to understand when creating a branch, SVN just make a entire copy from trunk or make use of some mechanism to achieve it?
Thanks.
AFAIK, what it makes is a reference to the Revision you're branching from and then records the Deltas for anything you check in.
To quote the SVN book:
Subversion's repository has a special design. When you copy a directory, you don't need to worry about the repository growing huge—Subversion doesn't actually duplicate any data. Instead, it creates a new directory entry that points to an existing tree. If you're a Unix user, this is the same concept as a hard-link. From there, the copy is said to be “lazy”. That is, if you commit a change to one file within the copied directory, then only that file changes—the rest of the files continue to exist as links to the original files in the original directory.
SVN makes a copy of the trunk at a point so that it can keep the history of the trunk in the branch.
Here is a good breakdown of what it is http://svnbook.red-bean.com/en/1.0/ch04.html
SVN do not copy you files, it just make link to your starting revision in trunc(or somewhere else). So, repository size is not growing.