Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN Copy: Create destination path if it doesn't exist

Tags:

copy

svn

Is there some option I can use to create a directory in case it doesn't exist when I'm copying a directory within a SVN server to another directory within the same server? For example:

svn copy file:///home/svn/folder/app/trunk file:///home/svn/folder/app/branches/release

...when there's no /branches/ folder? I know I can do it if I just wanted to create a single level directory (it would work if the command stopped at "/branches" however I want to copy it further into "release"). However if I try that command it will complain about the lack of a /branches/ folder to create the /release folder in.

Any solution either obvious or creative to this? I'd just like something that creates the path structure I specify if it finds it doesn't exist.

like image 520
Sergio Morales Avatar asked May 10 '11 23:05

Sergio Morales


People also ask

Does working copy path'...'exist in repository?

Working copy path '...' does not exist in repository." Doing a bit of where no recipe was found for how to reproduce the problem. relatively simple recipe using Subversion 1.2.1 on Linux. It could maybe be Checked out revision 0.

Does XCOPY always create the destination directory in MSBuild?

So no. xcopy will not (always) create the destination directory I hate the PostBuild step, it allows for too much stuff to happen outside of the build tool's purview. I believe that its better to let MSBuild manage the copy process, and do the updating. You can edit the .csproj file like this:

How to create a non-existing target directory automatically during file copying?

In this article, we’ve addressed three techniques to create the non-existing target directory automatically during file copying: 1 mkdir -p && cp 2 A simple Bash function wrapping the combination above 3 install -D (-m)


1 Answers

Add the --parents option to the svn copy command (type svn help copy for more details and other things you can do with copy).

like image 56
Quick Joe Smith Avatar answered Oct 10 '22 14:10

Quick Joe Smith