Search code examples
mercurialmercurial-convert

Can I use wildcards in the filemap of hg convert


I have a repository with one file (subdir/a.txt), and the one revision, adding it.

If I run hg convert with a filemap consisting of include subdir/a.txt, it works just fine.

But if the filemap is include subdir/*.txt, include */a.txt, or include **/*.txt, the resultant repository has no revisions in it.

Is it possible do use wildcards in the filemap of hg convert?

--

The reason I want to do this is so that I can create a new repository with history, but without any binary files. I want to be able to do something like exclude **/*.dll. Is there any way to do that?


Solution

  • Wildcards do not seem to be supported, but you can use hg manifest --all to get a list of all files present in all changesets, and do some filtering and editing of the output to generate what to exclude. Something like the following to list all the DLL file paths on Windows:

    hg manifest --all | findstr \.dll