Show More
@@ -1,6 +1,6 b'' | |||||
1 | # CVS conversion code inspired by hg-cvs-import and git-cvsimport |
|
1 | # CVS conversion code inspired by hg-cvs-import and git-cvsimport | |
2 |
|
2 | |||
3 | import os, locale, re, socket |
|
3 | import os, locale, re, socket, errno | |
4 | from cStringIO import StringIO |
|
4 | from cStringIO import StringIO | |
5 | from mercurial import util |
|
5 | from mercurial import util | |
6 | from mercurial.i18n import _ |
|
6 | from mercurial.i18n import _ | |
@@ -202,7 +202,7 b' class convert_cvs(converter_source):' | |||||
202 | if not passw: |
|
202 | if not passw: | |
203 | passw = "A" |
|
203 | passw = "A" | |
204 | cvspass = os.path.expanduser("~/.cvspass") |
|
204 | cvspass = os.path.expanduser("~/.cvspass") | |
205 |
|
|
205 | try: | |
206 | pf = open(cvspass) |
|
206 | pf = open(cvspass) | |
207 | for line in pf.read().splitlines(): |
|
207 | for line in pf.read().splitlines(): | |
208 | part1, part2 = line.split(' ', 1) |
|
208 | part1, part2 = line.split(' ', 1) | |
@@ -217,6 +217,11 b' class convert_cvs(converter_source):' | |||||
217 | passw = part2 |
|
217 | passw = part2 | |
218 | break |
|
218 | break | |
219 | pf.close() |
|
219 | pf.close() | |
|
220 | except IOError, inst: | |||
|
221 | if inst.errno != errno.ENOENT: | |||
|
222 | if not getattr(inst, 'filename', None): | |||
|
223 | inst.filename = cvspass | |||
|
224 | raise | |||
220 |
|
225 | |||
221 | sck = socket.socket() |
|
226 | sck = socket.socket() | |
222 | sck.connect((serv, port)) |
|
227 | sck.connect((serv, port)) |
General Comments 0
You need to be logged in to leave comments.
Login now