Pls. see Creating a Subversion branch. I created a repository with a URL http://reposerver/svn/repository/ and checked out a working copy and started adding files to the root instead of doing it into the trunk folder.
Now, we need to create a branch except we don’t have a “trunk” folder. From the above link, user “Wrikken” suggested that we “Possible workaround is to create a folder trunk now, and move the current content of the root sans branches dir into that location. “
Now, we don’t know how to do “move the current content of the root sans branches dir into that location”. What command should we use to do the same ?
When we do ls -la of /var/svn/repository, here’s what we see
total 32
drwxr-xr-x 2 www-data subversion 4096 2010-12-28 18:20 conf
drwxr-xr-x 3 www-data www-data 4096 2010-12-28 18:23 dav
drwxr-sr-x 6 www-data subversion 4096 2010-12-28 18:31 db
-r--r--r-- 1 www-data subversion 2 2010-12-28 18:20 format
drwxr-xr-x 2 www-data subversion 4096 2010-12-28 18:20 hooks
drwxr-xr-x 2 www-data subversion 4096 2010-12-28 18:20 locks
-rw-r--r-- 1 www-data subversion 229 2010-12-28 18:20 README.txt
-rw-r--r-- 1 root root 95 2010-12-28 18:41 svn-commit.tmp
TL DR : We need to create a branch and our repository does NOT have “trunk” and “branches”
so what commands do we need to use to move existing repository content to a trunk directory ?
Thank you,
Execute the following commands in the root of a working copy of the repository (
lsshould output the contents of your repository, not the files and directories quoted in the question).egrep -v '^branches$matches everything exceptbranches. Themvcommand will be clever enough to not try movetrunkinto itself, although it will yell at you with an error you can safely ignore.