Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.1, 2.0.2, and 2.0.3

stable sync: catch regexp failures in parseurl (fixes #225)

Not an optimal fix, but better than an exception

Changeset d0b3aabed60c

Parent e66b9940ad8f

by Steve Borho

Changes to one file · Browse files at d0b3aabed60c Showing diff from parent e66b9940ad8f Diff from another changeset...

 
34
35
36
37
38
39
 
 
 
 
 
 
 
40
41
42
 
34
35
36
 
 
 
37
38
39
40
41
42
43
44
45
46
@@ -34,9 +34,13 @@
  if user.find(':') != -1:   user, passwd = tuple(user.split(':'))   m = re.match(r'([^:/]+)(:(\d+))?(/(.*))?$', p) - host = m.group(1) - port = m.group(3) - folder = m.group(5) or '.' + if m: + host = m.group(1) + port = m.group(3) + folder = m.group(5) or '.' + else: + qtlib.WarningMsgBox(_('Malformed ssh URL'), hglib.tounicode(path)) + host, port, folder = '', '', ''   elif path.startswith('http://') or path.startswith('https://'):   snpaqf = urlparse.urlparse(path)   scheme, netloc, folder, params, query, fragment = snpaqf