Check the convert extension, especially the --filemap option.
Include by adding the following to mercurial.ini :
[extensions] convert =
Create a file map to exclude:
exclude path/to/file1 exclude path/to/file2
Then convert the repo:
hg convert srcrepo destrepo --filemap <map>
Please note that in Mercurial 2.1.1 there is an error causing an error with the specified command:
initializing destination destrepo repository abort: invalid mode ('r') or filename
Just add the --splicemap <nonexistent file> option to fix the problem.
Mark Tolonen Apr 11 2018-12-12T00: 00Z
source share