Add file to subversion, while automatically adding parent directory node(s) if not added already

svn

Solution

Use the `--parents` option to `svn add` to add intermediate parents:

svn add --parents directory/file

Problem

When I want to add a file in a directory using ``` svn add directory/file.extension ``` and directory has not been added yet, I get an error that says that directory's node cannot be found and needs to be added first. So I can do ``` svn add directory --depth=empty svn add directory/file.extension ``` Can I automate the last two steps? Perhaps with a fitting parameter to svn add?

Original source