# HG changeset patch # User Thomas Arendsen Hein # Date 1186494986 -7200 # Node ID dc2e512cb89a94bee1da6b61aacf14d9e1abca49 # Parent ea7b982b6c0834921aa22388a34a6d8e7a2cb60c CVS import: Support new-style .cvspass-file format. Based on an email from Ralf.Leibold at nuance dot com diff -r ea7b982b6c08 -r dc2e512cb89a hgext/convert/cvs.py --- a/hgext/convert/cvs.py Tue Aug 07 10:24:33 2007 +0200 +++ b/hgext/convert/cvs.py Tue Aug 07 15:56:26 2007 +0200 @@ -107,23 +107,27 @@ user, passw, serv, port, root = m.groups() if not user: user = "anonymous" - rr = ":pserver:" + user + "@" + serv + ":" + root - if port: - rr2, port = "-", int(port) + if not port: + port = 2401 else: - rr2, port = rr, 2401 - rr += str(port) + port = int(port) + format0 = ":pserver:%s@%s:%s" % (user, serv, root) + format1 = ":pserver:%s@%s:%d%s" % (user, serv, port, root) if not passw: passw = "A" pf = open(os.path.join(os.environ["HOME"], ".cvspass")) - for l in pf: - # :pserver:cvs@mea.tmt.tele.fi:/cvsroot/zmailer Ah