* lib/vclib/svn_ra/__init__.py

(created_rev): Because the way ra.svn_ra_get_dir() seems to work
    differently across versions of the Subversion Python bindings,
    build in some fault tolerance.  
    Tested by Eric Hanchrow <offby1@blarg.net>.


git-svn-id: http://viewvc.tigris.org/svn/viewvc/trunk@1525 8cb11bc2-c004-0410-86c3-e597b4017df7
remotes/options-overhaul
cmpilato 2007-01-31 21:08:45 +00:00
parent 310db99e62
commit 77446e313a
1 changed files with 7 additions and 2 deletions

View File

@ -88,8 +88,13 @@ def last_rev(svnrepos, path, peg_revision, limit_revision=None):
def created_rev(svnrepos, full_name, rev):
kind = ra.svn_ra_check_path(svnrepos.ra_session, full_name, rev)
if kind == core.svn_node_dir:
dirents, fetched_rev, props = ra.svn_ra_get_dir(svnrepos.ra_session,
full_name, rev)
try:
dirents, fetched_rev, props = ra.svn_ra_get_dir(svnrepos.ra_session,
full_name, rev)
except ValueError:
# older versions of the bindings didn't handle ra.svn_ra_get_dir()
# correctly.
props = ra.svn_ra_get_dir(svnrepos.ra_session, full_name, rev)
return int(props[core.SVN_PROP_ENTRY_COMMITTED_REV])
return core.SVN_INVALID_REVNUM