diff hgext/convert/subversion.py @ 5461:ab4d2e9f3b97

convert: svn -- fix 'exists' Previously 'exists' erroneously returned False for empty dirictories. This is wrong since we want to detect even empty 'branches/' or 'tags/'.
author Kirill Smelkov <kirr@landau.phys.spbu.ru>
date Sat, 13 Oct 2007 15:22:03 +0400
parents 6fa5258be3d4
children 91a522a69c13
line wrap: on
line diff
--- a/hgext/convert/subversion.py
+++ b/hgext/convert/subversion.py
@@ -158,10 +158,11 @@ class svn_source(converter_source):
 
     def exists(self, path, optrev):
         try:
-            return svn.client.ls(self.url.rstrip('/') + '/' + path,
+            svn.client.ls(self.url.rstrip('/') + '/' + path,
                                  optrev, False, self.ctx)
+            return True
         except SubversionException, err:
-            return []
+            return False
 
     def getheads(self):
         # detect standard /branches, /tags, /trunk layout