diff python/setup_repo.py @ 402:c00b70509fff

flesh out
author Jeff Hammel <jhammel@mozilla.com>
date Tue, 30 Jul 2013 03:32:31 -0700
parents f652f9d4765b
children 62eb670a408f
line wrap: on
line diff
--- a/python/setup_repo.py	Tue Jul 30 03:30:30 2013 -0700
+++ b/python/setup_repo.py	Tue Jul 30 03:32:31 2013 -0700
@@ -78,8 +78,8 @@
 
         # write local .hgrc file
         # TODO: use ConfigParser
-        f = file(os.path.join('.hg', 'hgrc'), 'w')
-        print >> f, HGRC % { 'host': HOST, 'repo': repo, 'name': name}
+        with file(os.path.join(directory, '.hg', 'hgrc'), 'w') as f:
+            print >> f, HGRC % { 'host': host, 'repo': repo, 'name': name}
 
         # push changes
         call(['hg', 'push', '-R', directory])