Mercurial > hg
comparison hgext/convert/cvs.py @ 6813:e1d8e79d7c8f
Bug:1201 hg convert on CVS working copy produces Traceback
Fix identified by frank@kingswood-consulting.co.uk
Changed usage fron os.environ["HOME"] to expanduser("~/.cvspass") as
this is the
only usage of this construct in mercurial sources.
author | Martin OConnor <martinoc@gmail.com> |
---|---|
date | Wed, 25 Jun 2008 19:41:43 +0100 |
parents | 308988071b90 |
children | d8159dd15db3 |
comparison
equal
deleted
inserted
replaced
6801:71e339714586 | 6813:e1d8e79d7c8f |
---|---|
159 format0 = ":pserver:%s@%s:%s" % (user, serv, root) | 159 format0 = ":pserver:%s@%s:%s" % (user, serv, root) |
160 format1 = ":pserver:%s@%s:%d%s" % (user, serv, port, root) | 160 format1 = ":pserver:%s@%s:%d%s" % (user, serv, port, root) |
161 | 161 |
162 if not passw: | 162 if not passw: |
163 passw = "A" | 163 passw = "A" |
164 pf = open(os.path.join(os.environ["HOME"], ".cvspass")) | 164 pf = open(os.path.expanduser("~/.cvspass")) |
165 for line in pf.read().splitlines(): | 165 for line in pf.read().splitlines(): |
166 part1, part2 = line.split(' ', 1) | 166 part1, part2 = line.split(' ', 1) |
167 if part1 == '/1': | 167 if part1 == '/1': |
168 # /1 :pserver:user@example.com:2401/cvsroot/foo Ah<Z | 168 # /1 :pserver:user@example.com:2401/cvsroot/foo Ah<Z |
169 part1, part2 = part2.split(' ', 1) | 169 part1, part2 = part2.split(' ', 1) |