Script to load AutoMap with documents from a Mercurial repository
Specify the Mercurial URL to retrieve documents/files from with <HG_URL>.
The Mercurial location contents will be copied to the AutoMap job file directory. Then the "dir" command is used to build a list of filenames with the proper filename extension (*.ditamap), each of which will be included in the AutoMap publication.
A subdirectory called "docs" will be created that contains all the files (including subdirectories) from the Mercurial repository at <HG_URL>. All documents with the specified file extension will be included in the AutoMap publication. In this case filenames with a ".ditamap" extension are published.
rmdir /S /Q docs hg clone -u tip "<HG_URL>" docs dir docs\*.ditamap /B /S /O:N > "${FileListPath}"
Script steps explained:
The above script removes any previously existing "docs" subdirectory inside the directory that contains the AutoMap job file.
All files located in the Git repository located at: <HG_URL> are copied to the "docs" subdirectory.
- Finally the "dir" command is used to create a list of all the files located in the "docs" subdirectory that have the ".ditamap" extension.
Example Mercurial URLs:
http://host.com/path/to/repository ssh://[username@]host.com/path/to/repository