简体   繁体   English

将树中的文件添加并提交到SVN

[英]Add and commit files in a tree to SVN

I have a directory tree under SVN control, and I want to add and commit several new files in the tree. 我在SVN的控制下有一个目录树,我想在树中添加并提交几个新文件。 Some of the files are already under SVN, and others are not. 有些文件已经在SVN下,而其他文件则不在。 Sometimes not even the parent directories of the new files are under SVN yet. 有时甚至新文件的父目录都不在SVN下。 I have the names of all the new files, but I do not know which ones are under SVN yet and which ones are not. 我拥有所有新文件的名称,但是我不知道哪些文件在SVN下,哪些文件不在。

I'm looking for a simple way to add and commit all these files. 我正在寻找添加和提交所有这些文件的简单方法。

Adding the files which are not under SVN yet is actually easy: I do svn add --parents --quiet FILES... . 添加不在SVN下的文件实际上很容易:我确实svn add --parents --quiet FILES... This will add all those files which are not under SVN and do nothing for those which are already registered. 这将添加所有不在SVN下的文件,并且对已注册的文件不执行任何操作。 But there doesn't seem to be a similar operation for svn commit . 但是似乎没有类似的svn commit操作。 When I do svn commit on a file that has just been added, it complains that the parent directory is not yet under SVN control. 当我在刚刚添加的文件上执行svn commit时,它抱怨父目录尚未受SVN控制。 There does not seem to be a --parents option for svn commit . svn commit似乎没有--parents选项。

Any suggestions? 有什么建议么?

AFAIK, svn commit is recursive by default. AFAIK,默认情况下svn commit是递归的。 Commit from the root directory of the tree, and everything should be committed at once. 从树的根目录提交,所有内容应立即提交。

svn add --force
svn commit -m "yes the damn thing works"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM