使用 Mercurial 添加/删除复制的文件,TortoiseHg 可以做到,但是命令行变体是什么?
Mercurial 命令addremove
检测已根据相似性比率重命名的文件。
TortoiseHg 还能够检测副本,即。已复制到磁盘上但未作为副本明确传达给 Mercurial 的文件。
addremove
命令似乎没有任何检测副本的选项,只有重命名。有谁知道执行此操作的等效命令行命令和/或选项是什么?
例如,如果我这样做:
hg init .
echo 111>test1.txt
hg commit -m "initial" --addremove
copy test1.txt test2.txt
??? what do I write here to get the equivalent of: hg cp test1.txt test2.txt
The Mercurial command addremove
detects files that have been renamed according to a similarity ration.
TortoiseHg is also able to detect copies, ie. files that were copied on disk but not explicitly communicated to Mercurial as copies.
It doesn't appear that the addremove
command have any options to detect copies, only renames. Does anyone know what the equivalent command line command and/or options would be to do this?
For instance, if I do this:
hg init .
echo 111>test1.txt
hg commit -m "initial" --addremove
copy test1.txt test2.txt
??? what do I write here to get the equivalent of: hg cp test1.txt test2.txt
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道有什么方法可以使用 CLI 来做到这一点。仅支持移动意味着您可以减少要与丢失或添加的文件进行比较的文件集。
我不知道Tortoise是如何做到的,但我猜它相当昂贵。
I don't know of any way to do it using the CLI. Only supporting moves means you can whittle down the set of files to be compared to those that are either missing or added.
I'm not sure how Tortoise does it, but I'd guess it's pretty expensive.