changeset 346:4b992ebdecc6

improve reliability of Subversion checks. Use the presence of the UUID file for recognising a Subversion-enabled repository locally, and the 'subversion' capability in for recognising them wrappers.outgoing() remotely.0
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Wed, 20 May 2009 21:49:01 +0200
parents 49a656155a92
children 537de0300510
files hgsubversion/util.py hgsubversion/wrappers.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/util.py
+++ b/hgsubversion/util.py
@@ -99,7 +99,7 @@ def build_extra(revnum, branch, uuid, su
 
 
 def is_svn_repo(repo):
-    return os.path.exists(os.path.join(repo.path, 'svn'))
+    return os.path.exists(os.path.join(repo.path, 'svn', 'uuid'))
 
 default_commit_msg = '*** empty log message ***'
 
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -39,7 +39,7 @@ def outgoing(orig, ui, repo, dest=None, 
     """show changesets not found in the Subversion repository
     """
     svnurl = repo.ui.expandpath(dest or 'default-push', dest or 'default')
-    if not (cmdutil.issvnurl(svnurl) or opts.get('svn', False)):
+    if not hg.repository(ui, svnurl).capable('subversion'):
         return orig(ui, repo, dest, *args, **opts)
 
     # split off #rev; TODO implement --revision/#rev support