[PATCH 1 of 2] convert: svn -- fix 'exists'
Kirill Smelkov
kirr at landau.phys.spbu.ru
Sat Oct 13 11:31:16 UTC 2007
# HG changeset patch
# User Kirill Smelkov <kirr at landau.phys.spbu.ru>
# Date 1192274523 -14400
# Node ID ab4d2e9f3b97a0a1cd4898c5fba0d409b0077a96
# Parent fe9b0bb3eb1c7c37f8e3efa27d48b48cc777ea48
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/'.
diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py
--- 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
More information about the Mercurial-devel
mailing list