comparison 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
comparison
equal deleted inserted replaced
389:ef8ff43f9c11 390:50aea13227a2
382 else: 382 else:
383 repo = hg.repository(ui, ".", create=1) 383 repo = hg.repository(ui, ".", create=1)
384 other = hg.repository(ui, source) 384 other = hg.repository(ui, source)
385 cg = repo.getchangegroup(other) 385 cg = repo.getchangegroup(other)
386 repo.addchangegroup(cg) 386 repo.addchangegroup(cg)
387
388 f = repo.opener("hgrc", "w")
389 f.write("[paths]\n")
390 f.write("default = %s\n" % source)
387 else: 391 else:
388 repo = hg.repository(ui, ".", create=1) 392 repo = hg.repository(ui, ".", create=1)
389
390 f = repo.opener("hgrc", "w")
391 f.write("[paths]\n")
392 f.write("default = %s\n" % source)
393 393
394 def log(ui, repo, f): 394 def log(ui, repo, f):
395 """show the revision history of a single file""" 395 """show the revision history of a single file"""
396 f = relpath(repo, [f])[0] 396 f = relpath(repo, [f])[0]
397 397