Commit 7ead2e51 authored by Jean-Paul Smets's avatar Jean-Paul Smets

I added some error messages here so that errors are more clear. Also, I follow...

I added some error messages here so that errors are more clear. Also, I follow symlinks because it seems that pysvn does not support them very well. I hope it helps.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@27072 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 527a42ce
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2005 Nexedi SARL and Contributors. All Rights Reserved.
......@@ -333,6 +334,11 @@ try:
return self.client.resolved(path=path)
def info(self, path):
if not os.path.exists(path):
raise ValueError, "Repository %s does not exist" % path
# symlinks are not well supported by pysvn
if os.path.islink(path):
path = os.path.realpath(path)
try:
entry = self.client.info(path=path)
except pysvn.ClientError, error:
......@@ -341,6 +347,8 @@ try:
raise excep
else:
raise error
if entry is None:
raise ValueError, "Could not open SVN repository %s" % path
# transform entry to dict to make it more usable in zope
members_tuple = ('url', 'uuid', 'revision', 'kind', \
'commit_author', 'commit_revision', 'commit_time',)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment