Mercurial equivalent of svn export? - Kiln Knowledge Exchange most recent 30 from http://kiln.stackexchange.com2013-05-19T01:52:27Zhttp://kiln.stackexchange.com/feeds/question/932http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://kiln.stackexchange.com/questions/932/mercurial-equivalent-of-svn-exportMercurial equivalent of svn export?Jack M.2010-03-22T16:25:42Z2011-08-15T01:29:57Z
<p>I'm looking to pull data from Kiln, to a production server, but I'd rather not have the <code>.hg</code> folder in the production environment. With Subversion, I did this using <code>svn export</code> which works just like a <code>checkout</code>, except it does not create the <code>.svn</code> directories. Is there an equivalent in Mercurial?</p>
<p>As a last resort, I've set up Apache to disallow access to <code>^\.hg</code>, but it seems like a much better plan to just not have the files there.</p>
http://kiln.stackexchange.com/questions/932/mercurial-equivalent-of-svn-export/934#934Answer by cdeszaq for Mercurial equivalent of svn export?cdeszaq2010-03-22T16:46:52Z2010-03-22T16:46:52Z<p>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.</p>
<p>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.</p>
http://kiln.stackexchange.com/questions/932/mercurial-equivalent-of-svn-export/936#936Answer by Ben Kamens for Mercurial equivalent of svn export?Ben Kamens2010-03-22T17:00:02Z2010-03-22T17:00:02Z<p><code>hg archive</code> should get the job done for you.</p>
<p>If you run <code>hg archive /target/folder/path/</code> 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 <code>hg help archive</code> for more.</p>