过滤器文件从 diff 输出中移动和复制
我经常查看 Mercurial 的 diff 合并,令我烦恼的是,移动的文件显示为文件删除 + 文件添加,通常位于 diff 中的两个不同位置。如果有一种方法可以用消息“文件从 .. 移动到 ..”来替换该输出,那就太好了。复制的文件也是如此。
我听说 git 有一个副本检测算法,也可以处理文件中的一些更改。
是否有一个 Mercurial 扩展或一个独立的工具,我可以将差异提供给它来检测这些文件副本?
I look a lot at diff merges from mercurial, and it annoys me that moved files are shown as file deletion + file addition, often at two different places in the diff. It would be great if there was a way to replace that output by the message "file moved from .. to ..". The same goes for copied files.
I have heard that git has a copy detection algorithm that can also handle some changes in the files.
Is there a mercurial extension or a standalone tool I can feed my diff to that detects these file copies as well?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Mercurial 中的复制检测机制具有
addremove 操作
:
git(!) 扩展格式可能有帮助您可以获得所需的输出(如此处所示 ):
The copy detection mechanism in Mercurial has a "similarity" parameter for
addremove
operation:The git(!) extended format might help you to get the desired output (as illustrated here):