Rebol Call 命令的行为与 Dos 命令不完全相同(例如 Subversion 命令行)

发布于 2024-08-09 19:27:29 字数 1218 浏览 1 评论 0原文

这个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

年华零落成诗 2024-08-16 19:27:29

如果您编写命令 %script.cmd 并从 Rebol 调用该命令,您是否能获得所需的效果?

And if you write the command to say %script.cmd and call that from Rebol, do you get the desired effect?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文