Rebol Call 命令的行为与 Dos 命令不完全相同(例如 Subversion 命令行)
这个 Subversion 导入命令适用于 dos 命令行:
"C:\Program Files\Subversion\bin\svn.exe" import c:\myproj file:///c:/svnrepo/myproj -m "test"
如果我尝试使用此脚本通过 Rebol Call Command 发送相同的命令:
Print "This command will and your files to the repository without requiring a working copy"
repo-directory: to-local-file ask "repo: "
project-subdirectory: to-local-file ask "project: "
source-directory: to-local-file ask "source directory: "
comment: ask "comment: "
command: rejoin [{"} Subversion.Directory "bin\svn.exe" {"} " import " source-directory " file:///" (replace/all (to-local-file repo-directory) "\" "/") "/" project-subdirectory " -m " {"} comment {"}]
call/wait/console command
我会得到这个
repo: c:\svnrepo
project: myproj
source directory: c:\myproj
comment: test
svn: The given propagation message is a path (-F was this intended ?) ; force with
'--force-log'
== 1
命令的值与 Dos 命令相同:
>> command
== {"C:\Program Files\Subversion\bin\svn.exe" import c:\myproj file:///c:/svnrepo/m
yproj -m "test"}
>>
所以我附加了 --force-log然后它确实起作用了,但我仍然想知道 Rebol 的行为与 Dos Command 不同的原因(如果有一个我忽略的命令)。
This Subversion import command works on dos command line:
"C:\Program Files\Subversion\bin\svn.exe" import c:\myproj file:///c:/svnrepo/myproj -m "test"
If I try to send the same command with Rebol Call Command with this script:
Print "This command will and your files to the repository without requiring a working copy"
repo-directory: to-local-file ask "repo: "
project-subdirectory: to-local-file ask "project: "
source-directory: to-local-file ask "source directory: "
comment: ask "comment: "
command: rejoin [{"} Subversion.Directory "bin\svn.exe" {"} " import " source-directory " file:///" (replace/all (to-local-file repo-directory) "\" "/") "/" project-subdirectory " -m " {"} comment {"}]
call/wait/console command
I will get this
repo: c:\svnrepo
project: myproj
source directory: c:\myproj
comment: test
svn: The given propagation message is a path (-F was this intended ?) ; force with
'--force-log'
== 1
The value of command is the same as the Dos command:
>> command
== {"C:\Program Files\Subversion\bin\svn.exe" import c:\myproj file:///c:/svnrepo/m
yproj -m "test"}
>>
So I appended --force-log and it did then work but I still would like to know the reason Rebol doesn't behave like Dos Command if there is one that I ignore.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您编写命令 %script.cmd 并从 Rebol 调用该命令,您是否能获得所需的效果?
And if you write the command to say %script.cmd and call that from Rebol, do you get the desired effect?