relink first checks the candidate files and then checks if the files are located on the same device. I do not see any disadvantages by checking the device first. This would result in a speedup when a repo on a network drive is selected by accident. Currently samedevice is checked in prune() for every file. This should probably be kept. But it could additionaly be tested for the repo folder (.hg, .hg/store or ...) in relink() before calling collect().
$ hg --config extensions.churn= churn hgext/relink.py | head jesse.glick@sun.com 149 **************************************************************** mg@lazybytes.net 49 ********************* timeless@gmail.com 26 *********** sid.bugzilla@gmail.com 24 ********** mpm@selenic.com 16 ******* mg@aragost.com 9 **** durin42@gmail.com 5 ** adrian@cadifra.com 2 * benoit.boissinot@ens-lyon.org 2 * brodie@bitheap.org 2 *
For what itβs worth I (formerly jesse.glick@sun.com) no longer use Mercurial on a regular basis, so I am not likely to be submitting new patches.
Fixed by http://selenic.com/repo/hg/rev/c69e5911888d Simon Heimberg <simohe@besonet.ch> relink: abort earlier when on different devices (issue3916) Add a first check of the devices before collecting candidate files. This is much quicker when big repos are on different devices. Keep the existing check in prune. It checks for same device of the files. This could probably be different in a special repo store (with symlinks). (please test the fix)