使用SVN添加新文件

使用SVN添加新文件,svn,version-control,Svn,Version Control,我有一个名为2016的文件夹,其中有很多项目。我刚刚添加了两个新项目wap-sprint和wap-sprint-2,然后我添加了:$svn add--force.并在控制台中得到了这个: Marcelo@MacBook-Pro-de-MarceloRS /L/W/D/2016> svn add --force . A wap-sprint-2 A wap-sprint-2/assets A wap-sprint-2/assets/css A

我有一个名为
2016
的文件夹,其中有很多项目。我刚刚添加了两个新项目
wap-sprint
wap-sprint-2
,然后我添加了:
$svn add--force.
并在控制台中得到了这个:

Marcelo@MacBook-Pro-de-MarceloRS /L/W/D/2016> svn add --force .
A         wap-sprint-2
A         wap-sprint-2/assets
A         wap-sprint-2/assets/css
A         wap-sprint-2/assets/css/legal.css
A         wap-sprint-2/assets/css/index.css
A         wap-sprint-2/assets/img
A         wap-sprint-2/assets/img/index
A  (bin)  wap-sprint-2/assets/img/index/img01.png
A  (bin)  wap-sprint-2/assets/img/index/img02.png
A  (bin)  wap-sprint-2/assets/img/index/img03.png
A  (bin)  wap-sprint-2/assets/img/index/img04.png
A         wap-sprint-2/includes
A         wap-sprint-2/includes/legal1-endoflease.php
A         wap-sprint-2/includes/target1-endoflease.php
A         wap-sprint-2/includes/target2-promotionalupgrade.php
A         wap-sprint-2/legal.php
A         wap-sprint-2/index.php
A         wap-sprint
A         wap-sprint/includes
A         wap-sprint/includes/target2-promotionalupgrade.php
A         wap-sprint/includes/legal1-endoflease.php
A         wap-sprint/includes/target1-endoflease.php
A         wap-sprint/legal.php
A         wap-sprint/index.php
A         wap-sprint/assets
A         wap-sprint/assets/css
A         wap-sprint/assets/css/legal.css
A         wap-sprint/assets/css/index.css
A         wap-sprint/assets/img
A         wap-sprint/assets/img/index
A  (bin)  wap-sprint/assets/img/index/img01.png
A  (bin)  wap-sprint/assets/img/index/img02.png
A  (bin)  wap-sprint/assets/img/index/img03.png
A  (bin)  wap-sprint/assets/img/index/img04.png
如你所见,有两个新项目,就是我上面提到的。现在,我想提交这些新项目,以便我的同事可以在他们的计算机中看到它们,所以我这样做了:
$svn commit
,我得到了以下信息:

Marcelo@MacBook-Pro-de-MarceloRS /L/W/D/2016> svn ci
svn: E205007: Commit failed (details follow):
svn: E205007: Could not use external editor to fetch log message; consider setting the $SVN_EDITOR environment variable or using the --message (-m) or --file (-F) options
如果我执行了
$svn status
,并且得到了与执行
$svn add--force时完全相同的输出。


您知道发生了什么吗?

添加操作按预期工作,这就是为什么状态操作给出相同的输出。但是,如果指定了要添加的文件夹,则不需要使用
--force

svn add wap-sprint wap-sprint2
更改尚未提交,并且Subversion不允许您在没有显式提交消息的情况下提交,即使它是一条空消息。它显然在抱怨它

(...) Could not use external editor to fetch log message (...)
因此,正如它所建议的,要么设置一个环境变量

(...) consider setting the $SVN_EDITOR environment (...)
这将使它在您想要提交但未提供任何提交消息或仅在命令行上提供提交消息时启动编辑器:

# directly
svn ci -m "added 2 new projects, yadda, yadda"
# alternatively: empty commit message
svn ci -m ""
# alternatively: commit message from file
svn ci -F commitmessage.txt