14

4

I'm looking to pull data from Kiln, to a production server, but I'd rather not have the .hg folder in the production environment. With Subversion, I did this using svn export which works just like a checkout, except it does not create the .svn directories. Is there an equivalent in Mercurial?

As a last resort, I've set up Apache to disallow access to ^\.hg, but it seems like a much better plan to just not have the files there.

flag

2 Answers

16

hg archive should get the job done for you.

If you run hg archive /target/folder/path/ you'll get a full copy of the current state of the repository's tip revision, without the .hg repository data. You can also supply a specific revision or filename patterns to include or exclude as parameters. See hg help archive for more.

link|flag
0

You could simply delete the .hg folder. If you are "exporting" manually, simply delete it. If you are doing it with a script, 1 extra command to delete the .hg folder is all that's needed.

One of the big up-sides to Mercurial is that it doesn't put an administrative directory in EVERY folder of a code base the way that Subversion does.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.