Undo check out of subfolder in TortoiseSVN

svn, tortoisesvn

Solution

In SVN 1.7 you can do `svn up --set-depth exclude some-feature-branch3` (not sure if you can do it in SVN 1.6).

In Tortoise you can right click on `some-feature-branch3` -> 'Update to Revision' -> 'Update Depth: Exclude' -> 'Make Depth Sticky'.

If you can't do it in 1.6 you can do the same trick only with depth `empty`. It will leave the directory itself, but it will be empty which is enough for most practical purposes.

Problem

How do I "un-checkout" a subfolder using TortoiseSVN? What have I tried: - Delete the entire subfolder - Export-in-place, i.e. exporting the folder on top of itself - Search SO for things like undo+svn+checkout - Peek inside the hidden `.svn` folders to see if I could manually edit things The first two options seemed to work at first, but when I hit Check for modifications on the top-level folder it would tell me the subfolder and its contents were "missing". This is of course not what I want. To make things clearer, the relevant bit of my folder structure is similar to this: ``` //Repository/trunk/... //Repository/branches /some-feature-branch1/... /some-feature-branch2/... /some-feature-branch3/... /some-feature-branch4/... etc. ``` In the past I've done the following: - Check out the `//Repository/branches` folder locally, without recursively grabbing the content. - Made individual check-outs of some (but not all) feature branch subfolders I'm trying to remove -say- `some-feature-branch3` from my local disk, but this always leads to status "missing" for the subfolder, when checking the "branches" folder for modifications. Note that I'd prefer a way to fix this using TortoiseSVN, but if it isn't possible a command-line fix would be an acceptable alternative.

Original source