diff mercurial/commands.py @ 390:50aea13227a2

create .hg/hgrc with [paths] default entry only if source was given on hg init. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 create .hg/hgrc with [paths] default entry only if source was given on hg init. manifest hash: 8229e52ba4d3a6be51e053986230d195cff78966 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFCstisW7P1GVgWeRoRAqaVAJ0SK+3Sjki5OD61bCZj1HEo5hYcsQCfRV0z MJpYg9kiWJg8a4CzASoa+Hs= =Ql0q -----END PGP SIGNATURE-----
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 17 Jun 2005 15:05:32 +0100
parents c07c6fb2f0a8
children e3f564643888
line wrap: on
line diff
--- a/mercurial/commands.py	Fri Jun 17 14:56:28 2005 +0100
+++ b/mercurial/commands.py	Fri Jun 17 15:05:32 2005 +0100
@@ -384,13 +384,13 @@
             other = hg.repository(ui, source)
             cg = repo.getchangegroup(other)
             repo.addchangegroup(cg)
+
+        f = repo.opener("hgrc", "w")
+        f.write("[paths]\n")
+        f.write("default = %s\n" % source)
     else:
         repo = hg.repository(ui, ".", create=1)
 
-    f = repo.opener("hgrc", "w")
-    f.write("[paths]\n")
-    f.write("default = %s\n" % source)
-
 def log(ui, repo, f):
     """show the revision history of a single file"""
     f = relpath(repo, [f])[0]