"hg convert --filemap" and include directive

Ernie Rael err at raelity.com
Tue Jan 20 22:29:10 UTC 2015


On 1/19/2015 3:16 PM, Ernie Rael wrote:
>
>    For example, to import all files except doc subdirectory, but
>    include doc/foo bar.txt and include doc/FAQ renaming it to faq, use:
>
>        # Documentation is to be converted to separate repository.
>        exclude "doc"
>        include "doc/foo bar.txt"
>        rename "doc/FAQ" "faq"
>
> There is one, and only one, include statement and it is a file. 
> According to docs, only this file should be converted.

Sure enough, with the above example filemap from the wiki the 
destination only gets a single file. The example can be made to work 
since "include ." works. The example can be written as
>        # Documentation is to be converted to separate repository.
>        include "."
>        exclude "doc"
>        include "doc/foo bar.txt"
>        include "doc/FAQ"
>        rename "doc/FAQ" "faq"
I'll update the wiki in a few days, unless I hear otherwise. The only 
issue I can see is that "include ." working is an accident and shouldn't 
be used in the example (in which case implementing the example is 
tedious and can't be done without enumerating all the top level 
files/directories).

-ernie



More information about the Mercurial mailing list