Got this error message after copying some Mercurial repositories from one machine to another: “failed to import extension hgext.exportfiles”. Huh? Explanation follows.
So what’s going on here is that the target machine didn’t have the exportfiles extension, but the source did.
This extension lets you export all files changed in a revision or a revision range. It’s especially helpful in working with multiple repositories or copies of repositories (as a distributed source control system this is something pretty much anyone using Mercurial will want to do at some point or other).
The export extension (invoked in .hgrc) consists of the exportfiles.py script. On my Fedora systems this should live under /usr/lib64/python2.7/site-packages/hgext.
To call out the extension you would put these lines in ~/.hgrc:
The script file can found here. All I had to do was download it to the hgext directory on my machine and the error was cleared.