0

First of, i'm using Subversion together with TortoiseSVN 1.7.10.

Current structure: ParentFolder/CurrentFolder/myfile.txt

Wanted structure: ParentFolder/NewFolder/myfile.txt

i.e. what I want to do is to move all (one in this case) files in one directory to a new directoy.

These are the different actions i've tried;

  1. Simply do a svn rename operation on the CurrentFolder.
  2. Create the new folder, use the svn move operation of myfile.txt into the new directory, then svn delete the CurrentFolder.
  3. Shift right-click on the CurrentFolder and just drag it into the same place, choose SVN Move and Rename versioned items here entering the "NewFolder" as the name.

This is what will be shown if I choose to commit the changes using either approach 1 or 2. If I choose to "Proceed with the commit" the files will get copied (as expected) but the history will only say that a new folder has been copied from the previous one.

enter image description here

I haven't found another question wih the exact same problem. The following question addresses the problem of moving files in SVN to an existing folder, but I want to move it into a new folder.

What would be the correct approach for this pretty "simple" problem?

Community
  • 1
  • 1
Jim Aho
  • 9,932
  • 15
  • 56
  • 87
  • 1
    Did you try doing the rename of the folder in the repository browser? That might work better. – crashmstr Apr 16 '14 at 14:23
  • No @crashmstr I didn't try that. It sounds like a work-around for the problem. Is that a known approach to the problem? – Jim Aho Apr 16 '14 at 14:28
  • Unless you need to make multiple changes as one commit, sometimes the repository browser is simpler. The drawback is that changes are immediate and cannot be combined into one commit. – crashmstr Apr 16 '14 at 14:30

1 Answers1

0

Export it (removes the svn stuff) to the location you seek. Add it and commit. Then remove the other and commit.

Anthony Horne
  • 2,522
  • 2
  • 29
  • 51
  • You will lose history this way. You can look at relocate if you want. See: http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-dug-relocate.html. Due to changes in documentation, it is better to refer to the TortoiseSVN website directly for this. – Anthony Horne Apr 16 '14 at 14:40
  • Also, you may need to run clean on the parent folder afterwards. Keep a copy of the exported content until you are sure everything has been moved successfully. – Anthony Horne Apr 16 '14 at 14:41