0

I have the following subversion repository:

trunk
    \ folderA
      file1
      file2
      file3

I want to move everything from folderA to a subfolder, like so

trunk
    \ folderA
        \ folderB
          file1
          file2
          file3

Is there an easy way to do this with a single command?

EDIT I should have specified that I was looking for a way to do it using a wildcard. Something along the lines of:

mkdir folderB
mv !(folderB) folderB
  • You should be able to find the answer to this question using Search. This may be an acceptable duplicate: https://stackoverflow.com/questions/62570/how-do-i-move-a-file-or-folder-from-one-folder-to-another-in-tortoisesvn – ʀɣαɳĵ Apr 12 '18 at 18:26

1 Answers1

0

svn move --help...

or go here: http://svnbook.red-bean.com/en/1.7/svn.ref.svn.c.move.html

to see this example:

Move several files in your working copy into a subdirectory:

$ svn move baz.c bat.c qux.c src
A         src/baz.c
D         baz.c
A         src/bat.c
D         bat.c
A         src/qux.c
D         qux.c

from this, you perform an update and repository is updated with same.

CapnJJ
  • 151
  • 5
  • Thank you for the answer, but I have a lot a files in the directory, so this isn't really feasible. I should have specified that I was looking for a wildcard solution. I've updated the question accordingly. – SloppyNick Apr 12 '18 at 18:31
  • do you have access to the repository? you can edit it directly. Another option, that is ugly and not advisable since you will be losing history, is to not use "svn move", but copy them somewhere else, delete them in sandbox (including /svn directory), update sandbox, and then copy them to your sandbox in new location and do another update. kind of ugly, but will work. You sure * doesn't work with svn-move? I haven't tried, but think it should – CapnJJ Apr 12 '18 at 18:37
  • 1
    It appears that svn mv does not support wildcards. I guess I'll have to write a script to match the files, and svn mv them individually. – SloppyNick Apr 12 '18 at 19:00
  • yeh, but no need for a file... on the command line, as that serverfault answer states. either way :) – CapnJJ Apr 12 '18 at 19:05