Write hgrc file in text mode, even on Windows.
authorBryan O'Sullivan <bos@serpentine.com>
Fri, 23 Sep 2005 10:31:00 -0700
changeset 1331 cfae1ed2d61f
parent 1330 0fcde73dc3ca
child 1332 404484c9628e
Write hgrc file in text mode, even on Windows.
mercurial/commands.py
--- a/mercurial/commands.py	Fri Sep 23 10:30:41 2005 -0700
+++ b/mercurial/commands.py	Fri Sep 23 10:31:00 2005 -0700
@@ -624,7 +624,7 @@
         abspath = os.path.abspath(source)
         if not opts['pull']:
             copy = True
-        
+
     if copy:
         try:
             # we use a lock here because if we race with commit, we
@@ -652,7 +652,7 @@
         repo = hg.repository(ui, dest, create=1)
         repo.pull(other)
 
-    f = repo.opener("hgrc", "w")
+    f = repo.opener("hgrc", "w", text=True)
     f.write("[paths]\n")
     f.write("default = %s\n" % abspath)