Y:\>hg -R Y:/mercFlow.cache/vm-linux rename Migration-2010/create_directory_stru
cture.pl Migration-2010/create_directory_structure.pl2
abort: Migration-2010/create_directory_structure.pl not under root
Run Code Online (Sandbox Code Playgroud)
我在使用 Mercurial 的 Windows 中。我正在尝试重命名\移动文件作为一个简单的测试。Y:/mercFlow.cache/vm-linx/Migration-2010/create_directory_structure.pl 存在并且可以在文件浏览器中浏览。Migration-2010/create_directory_Structure.pl 似乎确实存在于 vm-linux 本地存储库下。
这里出了什么问题?
使用时需要使用相对于当前工作目录的路径hg -R——也就是说,该-R选项不会更改hg进程的工作目录。该--cwd选项确实会更改工作目录。
这说明了差异:
$ hg init test
$ echo hello > test/hello.txt
$ hg -R test add test/hello.txt
$ hg -R test status test/hello.txt
A test/hello.txt
$ hg --cwd test status hello.txt
A hello.txt
Run Code Online (Sandbox Code Playgroud)
这不起作用:
$ hg -R test status hello.txt
abort: hello.txt not under root
$ hg --cwd test status test/hello.txt
test/hello.txt: No such file or directory
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3303 次 |
| 最近记录: |