SVN提交在bash脚本中失败
我正在自动化一个过程,在这个过程中,我需要从SVN存储库中添加/删除一些文件。但是,当我尝试提交更改时,脚本失败。关于我的SVN版本的一些信息&我收到的错误消息是-SVN提交在bash脚本中失败,bash,svn,Bash,Svn,我正在自动化一个过程,在这个过程中,我需要从SVN存储库中添加/删除一些文件。但是,当我尝试提交更改时,脚本失败。关于我的SVN版本的一些信息&我收到的错误消息是- $ svn --version svn, version 1.6.11 (r934486) compiled May 31 2011, 06:01:42 Copyright (C) 2000-2009 CollabNet. Subversion is open source software, see http://subvers
$ svn --version
svn, version 1.6.11 (r934486)
compiled May 31 2011, 06:01:42
Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
The following repository access (RA) modules are available:
* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
- handles 'http' scheme
- handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- with Cyrus SASL authentication
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme
$
我收到的错误是-
svn: '<working directory>/all' is not under version control
其中$changelistFile包含所有需要执行操作的文件。它们同时包含添加和删除。我仍然会犯同样的错误。如果我从bashshell运行“svncommit”命令(在脚本失败后),那么它是成功的,但是从脚本内部它失败了
bash代码片段是-
if [[ $numAdded -gt 0 ]] || [[ $numRemoved -gt 0 ]]; then
svn commit --targets $changelistFile -m $commitMessage
fi
解决这个问题的任何帮助都会非常有帮助
更新--
文件“$changelistFile”不包含所有内容。该文件的内容是
data/2015_10_05_yyyyy_data.cql
test_consolidated_scripts/test_20151007.cql
我试过这个命令
svn commit --targets "$changelistFile" -m $commitMessage
而且它也没有帮助。是否有
$commitMessage
碰巧包含“all”一词?文件和消息应该被引用,以防它们包含空格
svn commit --targets "$changelistFile" -m "$commitMessage"
将您要求的信息作为更新添加到我的原始帖子中。我以为这会对原来的帖子有帮助。事实上我解决了这个问题。约翰,谢谢你的小费。我不得不在$commitMessage中添加“”。我误读了你的建议,因为我是瞎子:-)。它解决了这个问题&我接受你的建议作为我的答案。这有点离题,但Subversion 1.6.x自Subversion 1.8.0发布以来两年都不受支持:是的,不幸的是,这是安装在我们服务器上的版本。我可以设置自己的本地subversion,但还没有这样做。
svn commit --targets "$changelistFile" -m "$commitMessage"