Similar to this link but for mercurial. I'd like to find the files that are most contributing to the size of my mercurial repository.
I intend to use hg convert to create a new, smaller repository. I'm just not sure yet which files are contributing to the repository size. They could be files that have already been deleted.
What is a good way to find these anywhere in the repository history? There are over 20,000 commits. I'm thinking a powershell script, but I'm not sure what the best way to go about this is.
hg log -r"all()" "set:size('>1024k')" --template="{rev}\n" | Foreach { hg files -r $_ "set:size('>1024k')" >> results.txt; get-content results.txt | sort | get-unique > results2.txt; Remove-Item results.txt; Move-Item results2.txt results.txt }
and the bat file would befor /F %i in ('hg log -r"all()" "set:size('>1024k')" --template="{rev}\n"') DO hg files -r %i "set:size('>1024k')" >> results.txt
(that doesn't sort/filter though) – Dunne