【发布时间】:2015-10-08 03:55:49
【问题描述】:
我正在自动化一个需要从 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://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
我的文件夹中没有名为“all”的文件(或)目录。我也尝试过使用以下命令 -
svn commit --targets $changelistFile -m $commitMessage
其中 $changelistFile 包含所有需要操作的文件。它们包含添加和删除。我仍然得到同样的错误。如果我从 bash shell 运行“svn commit”命令(在我的脚本失败之后)它是成功的,但是在脚本中它会失败。
bash 代码 sn-p 是 -
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
它也没有帮助。
【问题讨论】:
-
有点跑题了,但是自 Subversion 1.8.0 发布以来的两年内不支持 Subversion 1.6.x:subversion.apache.org/docs/release-notes/1.8.html
-
是的,很遗憾,我们的服务器上安装了这个版本。我可以设置自己的本地颠覆,但还没有这样做。