Destroy and recreate hg repo on every publish
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Thu, 15 Sep 2011 14:47:56 -0600
changeset 580 76a8d2c3e11f
parent 579 fd21546d45bd
child 581 916f9a259380
Destroy and recreate hg repo on every publish

Takes about a minute, but it seems to work. The hg revision id's I've
gotten are the same when I recreate it. When I tried pulling changes
from the git repo instead of cloning it, I'd always get a KeyError
exception, and this is the simplest workaround I've found.
publish
--- a/publish	Thu Sep 15 14:44:57 2011 -0600
+++ b/publish	Thu Sep 15 14:47:56 2011 -0600
@@ -5,8 +5,10 @@
 cd ~/webroot/spec/editing
 git pull
 git push github
-cd ~/webroot/spec/hg-editing
-hg pull ~/webroot/tmp/editing
-hg push https://dvcs.w3.org/hg/editing
 cd ~/webroot/tmp/editing
 git fetch --all
+cd ~/webroot/spec
+rm -rf hg-editing || true
+hg clone ~/webroot/tmp/editing hg-editing
+cd hg-editing
+hg push https://dvcs.w3.org/hg/editing