Finding Large Files in Mercurial Repository

a 夏天 提交于 2019-12-05 03:39:33

Check hg help fileset. Something like

hg files "set:size('>1M')"

should do the trick for you. You might need to operate over all revisions, though as it only operates on one revision. In bash I'd try something like

for i in `hg log -r"all()" "set:size('>400k')" --template="{rev}\n"`; do hg files -r$i "set:size('>400k')"; done | sort | uniq

might do the trick. Maybe it can be optimized as it's currently a bit duplication and might run for quite a bit; on the OpenTTD repository with 22000 commits it took on my laptop just short of 10 minutes.

(Also check hg help on templates, files and grep)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!