changeset 710:db56e65906f4

svnrepo: make the svnurl property obtain the URL from Subversion. This causes an access to the svnurl property to connect to the repository. One of the tests uses an invalid URL, and so had to be updated to bypass this.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Wed, 29 Sep 2010 18:04:26 +0200
parents 2c278d71b73d
children cfc7df19e4dc
files hgsubversion/svnrepo.py tests/test_urls.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/svnrepo.py
+++ b/hgsubversion/svnrepo.py
@@ -95,7 +95,7 @@ class svnremoterepo(mercurial.repo.repos
 
     @property
     def svnurl(self):
-        return self.svnauth[0]
+        return self.svn.svn_url
 
     @propertycache
     def svn(self):
--- a/tests/test_urls.py
+++ b/tests/test_urls.py
@@ -50,7 +50,7 @@ class TestSubversionUrls(test_util.TestB
         ui = test_util.ui.ui()
         ui.setconfig('hgsubversion', 'username', 'bob')
         repo = svnrepo.svnremoterepo(ui, 'svn+ssh://joe@foo/bar')
-        self.assertEqual('svn+ssh://bob@foo/bar', repo.svnurl)
+        self.assertEqual('svn+ssh://bob@foo/bar', repo.svnauth[0])
 
         repo = svnrepo.svnremoterepo(ui, 'svn+http://joe@foo/bar')
         self.assertEqual(('http://foo/bar', 'bob', None), repo.svnauth)