(This is not a direct answer to how to get hg to read from a list of files - but an alternative idea).
My thought is to use hg addremove
instead of add
since it already is designed to work in "batch".
From hg addremove --help
:
hg addremove [OPTION]... [FILE]...
add all new files, delete all missing files
...
options ([+] can be repeated):
-I --include PATTERN [+] include names matching the given patterns
...
-n --dry-run do not perform actions, just print output
(some details omitted)
So a command like the following might work:
hg addremove --include path\to\files\prefix*.*
(The question doesn't have any specifics about filenames or paths to know more specifically how to structure the include
details.)
This only marks the files for addition; it doesn't automatically commit. So you would be able to run this multiple times, varying the inclusion criteria, committing each time in multiple batches.
Also note that hg commit
accepts a similar --include
option. So alternately you could addremove
100% of your files in one go, and then issue multiple commits for only a portion of all the files each. For instance, just commit one directory at a time, or some other scheme that is easy to do and get under the 10K file limit.