Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Explain slow Mercurial clone?

Tags:

mercurial

Is there a way to determine why a given repository takes a long time to clone?

I'm guessing at some point we added some big files which we then deleted, and downloading this history probably causes the clone to be so slow.

We're not sure which files they are and if we could actually (permanently) delete them from the repo.

Any ideas?

like image 784
Marcus Leon Avatar asked Oct 10 '22 10:10

Marcus Leon


1 Answers

you can't alter history of repo but you can create a new repo with selective history in it using hg convert, but this will require everyone switching to the new repo which may or may not be an issue for you depending how the project is run.

to use hg convert to strip a file create a file filemap with the following contents

exclude path/to/really/big/file

then run the command

hg convert --filemap filemap oldrepo newrepo

If you haven't had many deletes you may be able to find it with:

hg log --template "{file_dels} "

which will show all the files deleted for all commits

like image 165
jk. Avatar answered Oct 13 '22 12:10

jk.