hgext/convert/subversion.py
changeset 5020 780051cca03c
parent 5010 6b2d8caf87b2
child 5050 2bd996d0aaf8
equal deleted inserted replaced
5010:6b2d8caf87b2 5020:780051cca03c
    37 except ImportError:
    37 except ImportError:
    38     pass
    38     pass
    39 
    39 
    40 def geturl(path):
    40 def geturl(path):
    41     try:
    41     try:
    42         #extract URL from working directory
    42         return svn.client.url_from_path(svn.core.svn_path_canonicalize(path))
    43         return svn.client.url_from_path(path)
       
    44     except SubversionException:
    43     except SubversionException:
    45         pass
    44         pass
    46     if os.path.isdir(path):
    45     if os.path.isdir(path):
    47         return 'file://%s' % os.path.normpath(os.path.abspath(path))
    46         return 'file://%s' % os.path.normpath(os.path.abspath(path))
    48     return path
    47     return path