Mercurial > hg
changeset 5008:b6c3abdbe0eb
convert: urlify svn repos if necessary.
We should also try to extract the URL from an svn working directory.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Thu, 26 Jul 2007 10:42:44 -0700 |
parents | 81f8ff2a9bf2 |
children | 30570c2f576f |
files | hgext/convert/subversion.py |
diffstat | 1 files changed, 7 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/subversion.py Wed Jul 25 15:58:10 2007 +0900 +++ b/hgext/convert/subversion.py Thu Jul 26 10:42:44 2007 -0700 @@ -36,6 +36,11 @@ except ImportError: pass +def geturl(path): + if os.path.isdir(path): + return 'file://%s' % os.path.normpath(os.path.abspath(path)) + return path + class CompatibilityException(Exception): pass class changedpath(object): @@ -74,10 +79,10 @@ url = url[:at] except ValueError, e: pass - self.url = url + self.url = geturl(url) self.encoding = 'UTF-8' # Subversion is always nominal UTF-8 try: - self.transport = transport.SvnRaTransport(url=url) + self.transport = transport.SvnRaTransport(url=self.url) self.ra = self.transport.ra self.ctx = self.transport.client self.base = svn.ra.get_repos_root(self.ra)