changeset 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 fe9b0bb3eb1c
children 91a522a69c13
files hgext/convert/subversion.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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