Now when creating working directory in mercurial_fetch() it calls "hg clone" which is quite slow on a large repositories. It copies the whole repository with all changesets/manifests/etc while all we need is just the latest files from repository and "hg archive" command does exactly that and it is much faster. So attaching trivial patch for this. Reproducible: Always Steps to Reproduce:
Created attachment 193847 [details, diff] Do "hg archive" instead of "hg clone" when creating a working directory
No, some packages may rely on being built inside a repository (for example to get revision id).