Search code examples
mercurialweb-deployment-project

Mercurial HG Archive subdirectory for web deployment


I've got a Mercurial repository that contains a subdirectory for design files and a sub directory for code files.

What's the best way for me to deploy the code subdirectories on my server, keeping it secure, without deploying the design files?


Solution

  • Ideally you should have these in separate repos as Kyle pointed out, optionally, using sub repositories.

    However, with your setup as is something like this might be all you need:

    hg archive -X designDocs /path/to/deploymentDir
    

    or if you need to transfer it first:

    hg archive -X designDocs --type zip /path/to/newDeploymentArchive.zip