首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用SVN添加新文件

使用SVN添加新文件
EN

Stack Overflow用户
提问于 2016-06-22 06:20:33
回答 1查看 63关注 0票数 1

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

代码语言:javascript
复制
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和我得到了这样的信息:

代码语言:javascript
复制
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 .时的输出完全相同

你知道发生了什么事吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-06-22 08:41:53

add操作按预期工作,这就是为什么status操作提供相同的输出。但是,如果指定要添加的文件夹,则不需要--force

代码语言:javascript
复制
svn add wap-sprint wap-sprint2

修改还没有完成,Subversion不允许您在没有显式提交消息的情况下提交,即使它是空的。很明显是在抱怨.

代码语言:javascript
复制
(...) Could not use external editor to fetch log message (...)

所以,正如它所暗示的,要么设置一个环境变量.

代码语言:javascript
复制
(...) consider setting the $SVN_EDITOR environment (...)

这将使它在您想提交但没有提供任何提交消息时启动编辑器,或者只是在命令行中提供提交消息:

代码语言:javascript
复制
# 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
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/37960047

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档