什么是SVN中的中间目录? [英] What is intermediate directories in SVN?
问题描述
我刚开始学习SVN.请给我您的建议,以了解下面的基本理论.
I just started to learn SVN. Please give me your advice to understand the basic theory below.
svn copy
和 svn move
命令有一个名为 --parents
的选项.它说没有 --parents
选项,它不会创建 中间目录
.
The svn copy
and svn move
command have an option called --parents
.
It says without --parents
option, it would not create intermediate directories
.
谁能告诉我什么是中间目录
?
推荐答案
假设您刚刚在 Subversion 中创建了一个新的 Java 项目.您现在有一个空目录,并且您想为源文件创建一个目录.即使我不使用 Maven,我也喜欢遵循 Maven 目录结构.Maven 说我的源文件应该在 src/main/java
目录下.由于我的公司是 VegiBank.com,这是他们的基础项目,我想创建目录 src/main/java/com/vegibank/foundation
.我可以这样做:
Let’s say you just created a new Java project in Subversion. You now have an empty directory, and you want to create a directory for your source files. I like to follow Maven directory structure even if I’m not using Maven. Maven says my source files should be under the src/main/java
directory. Since my company is VegiBank.com and this is their foundation project, I want to create the directory src/main/java/com/vegibank/foundation
. I could do this:
$ svn mkdir src
$ svn mkdir src/main
$ svn mkdir src/main/java
$ svn mkdir src/main/java/com
$ svn mkdir src/main/java/com/vegibank
$ svn mkdir src/main/java/com/vegibank/foundation
我必须先创建目录才能创建子目录.但是,使用 --parents
选项,我可以用一个命令替换所有这些:
I have to first create the directory in order to create the subdirectory. However, with the --parents
option, I can replace all of those with a single command:
$ svn mkdir --parents src/main/java/com/vegibank/foundation
这使得整个目录树无需我一次创建一个子目录.
That makes the entire directory tree without me creating each single subdirectory one at a time.
这篇关于什么是SVN中的中间目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!