TortoiseHg复制相似性功能 [英] TortoiseHg Copy Similarity feature

查看:78
本文介绍了TortoiseHg复制相似性功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

提交对Mercurial的更改时,它可以使用命令

When committing changes to Mercurial, it can auto-detect move/copy/renames by using the command

hg addremove -similarity 100

hg addremove -similarity 100

相似度后的数字表示两个文件的相似度需要在0-100%之间才能使水星决定其移动,复制或重命名,而不仅仅是一个新文件.

The number after similarity indicates how similar two files need to be from 0-100% for mercurial to decide its a move, copy or rename instead of just a new file.

这是一个很棒的功能. TortoiseHg可以这样做吗?

This is a great feature. Can TortoiseHg do this?

推荐答案

可以.如果您查看 TortoiseHg手册,则会发现第4.12节标题为重命名猜测".引用:

Yes it can. If you take a look at the TortoiseHg manual you'll find section 4.12 entitled "Rename Guessing". To quote:

  1. 选择一个或多个未修订的文件
  2. 将相似度栏(最低相似度百分比)滑动到所需的匹配百分比
  3. 查找重命名查找副本
  4. 选择候选匹配并接受良好匹配
  5. 重复直到所有未版本控制的文件都匹配
  1. Select one or more Unrevisioned Files
  2. Slide the similarity bar (Minimum Similarity Percentage) to the percentage match you want
  3. Press either Find Renames or Find Copies
  4. Select candidate matches and accept good matches
  5. Repeat until all unversioned files are matched

最妙的是第5步:实际上,您可以随时切换相似性,然后Tortoise可以即时更改要视为重命名的文件.小心地将滑杆滑动到正确的百分比,然后重新检查,即可获得大部分所需的功能.

The nice thing is step 5: you can actually toggle the similarity as you go, and Tortoise changes what files are considered renames on the fly. You can get most of what you want by sliding the bar carefully to the right percentage and re-checking.

这篇关于TortoiseHg复制相似性功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆