convert: svn -- fix 'exists'
authorKirill Smelkov <kirr@landau.phys.spbu.ru>
Sat, 13 Oct 2007 15:22:03 +0400
changeset 5461 ab4d2e9f3b97
parent 5460 fe9b0bb3eb1c
child 5462 91a522a69c13
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/'.
hgext/convert/subversion.py
--- a/hgext/convert/subversion.py	Fri Oct 12 11:23:03 2007 +0200
+++ b/hgext/convert/subversion.py	Sat Oct 13 15:22:03 2007 +0400
@@ -158,10 +158,11 @@
 
     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