hgext/convert/subversion.py
changeset 8219 21cf74ff2deb
parent 8214 a2af1d92b913
child 8221 f35b933044cc
equal deleted inserted replaced
8218:e61cb2813d2a 8219:21cf74ff2deb
   146 
   146 
   147 # Check to see if a given path is the root of an svn repo over http. We verify
   147 # Check to see if a given path is the root of an svn repo over http. We verify
   148 # this by requesting a version-controlled URL we know can't exist and looking
   148 # this by requesting a version-controlled URL we know can't exist and looking
   149 # for the svn-specific "not found" XML.
   149 # for the svn-specific "not found" XML.
   150 def httpcheck(path, proto):
   150 def httpcheck(path, proto):
   151    return ('<m:human-readable errcode="160013">' in
   151     return ('<m:human-readable errcode="160013">' in
   152            urllib.urlopen('%s://%s/!svn/ver/0/.svn' % (proto, path)).read())
   152             urllib.urlopen('%s://%s/!svn/ver/0/.svn' % (proto, path)).read())
   153 
   153 
   154 protomap = {'http': httpcheck,
   154 protomap = {'http': httpcheck,
   155             'https': httpcheck,
   155             'https': httpcheck,
   156             'file': filecheck,
   156             'file': filecheck,
   157             }
   157             }