TortoiseSVN: Adding additional files after using SVN Checkout dialog "Only this item" option

MacGyver picture MacGyver · Oct 31, 2013 · Viewed 13.4k times · Source

Our department is planning on using the "SVN Checkout" option within Tortoise SVN. In that dialog, we select the "Only this item" option and then we click the "Choose items" button and choose all the relevant files we want to check-out. Let's assume a user will make a mistake, and forgot to check out an important file. What is the easiest way to go back and choose that file (or list of files) from trunk?

enter image description here

EDIT:

Suggested changes to @Chad's answer:

A.) If the parent folder of the folder(s) or file(s) you are checking out DOES NOT EXIST in the working copy, then do the following:

  1. Open a Repo-browser for the repository.
  2. Right-click the files that were missed and choose Checkout....
  3. Fix/Set the Checkout directory to where the files should go (add the folders from the folder you clicked to the parent folder of the folder/file you are checking out and make sure you are using backslash characters)
  4. Click OK.
  5. You will get a warning that the "Target folder is not empty". Go ahead and choose the Checkout into the non empty folder option.

The files will be added to the working copy.

DISCLAIMER: If you do not follow step #3, the working copy of the checked out files will be in a strange location not relative to the rest of the files.

B.) If the parent folder of the folder(s) or file(s) you are checking out DOES EXIST in the working copy, then do the following:

  1. Open a Repo-browser for the repository.
  2. Navigate to the parent folder of the file you intend to checkout (avoids the step of having to fix the "Checkout Directory")
  3. Right-click the files that were missed and choose Checkout....
  4. Click OK.
  5. You will get a warning that the "Target folder is not empty". Go ahead and choose the Checkout into the non empty folder option.

The files will be added to the working copy.

EDIT #2:

Suggested update to @gbjbaanb's proposed answer:

To include new folders/files to working copy:

  1. Right click root folder of checked out folder > select "TortoiseSVN" > select "Repo-browser"
  2. Enter credentials (if authentication is cleared in TortoiseSVN > Settings > Saved Data) > click "OK"
  3. Right click items in either the file explorer panel or the file detail panel within the Repository Browser dialog > select "Update item to Revision" > take all defaults in the Update to Revision dialog > click "OK"
  4. Enter credentials (if authentication is cleared in TortoiseSVN > Settings > Saved Data) > click "OK"

NOTE: Repeat step #3 and #4 for all new folders/files being added

DISCLAIMER: Assume you are only adding new folders or files to your working copy/checked out folder.

To exclude folders/files from working copy:

  1. Right click folder or file you wish to exclude
  2. Select Tortoise SVN > Update to Revision
  3. Click "Choose items..." button under the "Update Depth" section of the Update to Revision dialog
  4. Enter credentials (if authentication is cleared in TortoiseSVN > Settings > Saved Data) > click "OK"
  5. Uncheck relevant folder(s) or file(s) > click "OK"

That's the method I used with a very large repository. Only the bits I needed were checked out, when I needed them.

Answer

gbjbaanb picture gbjbaanb · Oct 31, 2013

You right-click on the root, select repo-browser, find the relevant bits you want to download to your working copy, right click and select the "update to revision".

To remove items you have downloaded, right click on the item in your working copy, select the same menu (update to revision) and select "exclude" from the depth box.

That's the method I used with a very large repository. Only the bits I needed were checked out, when I needed them.