【发布时间】:2014-05-15 21:06:17
【问题描述】:
我有一个 bat 文件,我在其中从 cvs 存储库中检出一个文件,运行一个 java 程序来更新文件,然后提交回存储库。我的提交命令遇到了一些问题。有人可以帮忙吗?
path=%path%;c:/cvsnt
cvs -d :ssh:nsbuild:xxxx@cvs1.xxxx.corpintra.net:/cvs login
cvs -d :ssh:nsbuild:xxxx@cvs1.xxxx.corpintra.net:/cvs checkout BGNMigration/JNLP/config/dev/com/xxxx/jnlp/file/xxxx.jnlp
javac UpdateVersions.java
java UpdateVersions
cvs -d /BGNMigration/JNLP/config/dev/com/xxxx/jnlp/file commit -m "Latest build" xxxx.jnlp
输出:
C:\Users\JADOYLE\Desktop\Docs\updateBat>cvs -d /BGNMigration/JNLP/config/dev/com/xxxx/jnlp/file commit -m "Latest build" xxxx.jnlp
cvs [commit aborted]: /BGNMigration/JNLP/config/dev/com/xxxx/jnlp/file/CVSROOT: No such file or directory
【问题讨论】:
-
您的斜线在第一行中的方向错误。在 Windows 中,您使用
` in paths, not/. First line should bepath=%path%;c:\cvsnt`。 -
我将第一行更改为 path=%path%;c:\cvsnt` 但仍然收到相同的输出。为什么它会在我的提交路径末尾抛出 /CVSROOT?
标签: batch-file command commit cvs