I got the warning message (not error) when I tried to add a file with colon (:) in its filename to a Hg repo. The repo is basically private, I don't intent to publish it to public, but I think it's still worth to resolve the issue even I don't use Windows.

There are some restrictions on file naming on Windows/DOS file systems. The message was added by a patch and there was a bug report related to this issue. I don't know what will happen if you try to clone such repo, but I am guessing files with illegal names will not be updated into working directory.

From that bug report, there is no remapping to work around, so it is best not to use anything may cause issues on different file systems. By default, it's only a warning, you can still commit the addition action.

If you don't want to see such warning, you can update your hgrc by adding:
[ui]
portablefilenames = ignore
which will suppress the warning message. If you want to stop the actions may cause issues, then gives it abort. You can read more about this configuration in man 5 hgrc.