comparison hgext/convert/cvs.py @ 5173:7e05bdeee7de

convert: raise Abort instead of NoRepo when CVS pserver auth fails. At this point we know the source is CVS, so we should not go through the rest of the converters.
author Brendan Cully <brendan@kublai.com>
date Wed, 15 Aug 2007 14:38:18 -0700
parents 7106f4899aa0
children 9400d677efc7
comparison
equal deleted inserted replaced
5172:6b4c332f241b 5173:7e05bdeee7de
151 sck = socket.socket() 151 sck = socket.socket()
152 sck.connect((serv, port)) 152 sck.connect((serv, port))
153 sck.send("\n".join(["BEGIN AUTH REQUEST", root, user, passw, 153 sck.send("\n".join(["BEGIN AUTH REQUEST", root, user, passw,
154 "END AUTH REQUEST", ""])) 154 "END AUTH REQUEST", ""]))
155 if sck.recv(128) != "I LOVE YOU\n": 155 if sck.recv(128) != "I LOVE YOU\n":
156 raise NoRepo("CVS pserver authentication failed") 156 raise util.Abort("CVS pserver authentication failed")
157 157
158 self.writep = self.readp = sck.makefile('r+') 158 self.writep = self.readp = sck.makefile('r+')
159 159
160 if not conntype and root.startswith(":local:"): 160 if not conntype and root.startswith(":local:"):
161 conntype = "local" 161 conntype = "local"