2

Say I create a branch of folder Master in my repository and make some commits to it.

I used TortoiseSVN's Create Branch command, which executes: svn copy FROMURL TOURL to create the branch on the server using the HEAD revision.

Later, the SVN administrator deletes the Master folder, but leaves my branch alone.

Since SVN branches are shallow copies, is my branch now corrupt, or does SVN smartly make a deep copy at the deletion of Master?

Nick Udell
  • 159
  • 1
  • 4
  • 18
  • 1
    SVN isn't going to do anything you don't tell it to do. – Ramhound Apr 13 '15 at 13:53
  • @Ramhound That isn't very helpful. Are you saying my branch will become corrupted (as it will be a series of revisions to files that no longer exist) or not? – Nick Udell Apr 13 '15 at 14:29
  • @NickUdell, the first question is what command did you issue to create the branch? – heavyd Apr 13 '15 at 14:32
  • I used TortoiseSVN's Create Branch command, which executes: `svn copy FROMURL TOURL` to create the branch on the server. – Nick Udell Apr 13 '15 at 14:33
  • You ask if SVN creates a deep copy upon the deletion of `Master`. My response to that question is that SVN only does what you tell it to. So if you delete `Master` before you perform a deep copy then you won't have a deep copy of `Master`. – Ramhound Apr 13 '15 at 14:37
  • I honestly don't know SVN enough to say for sure, but the description of "Cheap Copies" in the [SVN Book](http://svnbook.red-bean.com/en/1.7/svn.branchmerge.using.html) makes it sound like the SVN server handles the situation correctly. – heavyd Apr 13 '15 at 14:45
  • Ok, I shall see if I can get access to my office's svn server to run a test on a new repository and I'll post an answer when I know more. – Nick Udell Apr 13 '15 at 15:18

1 Answers1

3

Branch has a reference to a specific revision. Your branch should be safe. SVN uses references most of the time.

dr4cul4
  • 75
  • 2
  • 6