views:

24

answers:

0
#! /usr/bin/env/python
# This is a sample project to test subversion with python.
import pysvn
webrepo = pysvn.Client()
prop_name = "svn:externals"
prop_value = 'externalfolder http://subversion/repositories/externals/tags/1.0/'
url_or_path = 'http://subversion.corp.espn.pvt/repositories/project1/trunk/'
revhead = pysvn.Revision( pysvn.opt_revision_kind.number, 47908 )

commit_info = \
webrepo.propset( prop_name,
         prop_value,
         url_or_path,
         revision=revhead
         )

All I am trying to do is adding an svn:external (http://subversion/repositories/externals/tags/1.0/) to repository project(http://subversion.corp.espn.pvt/repositories/project1/trunk/).

I get this error when I try to execute it:

revision=revhead,
pysvn._pysvn_2_7.ClientError: Path 'http://subversion.corp.espn.pvt/repositories/project1/trunk' does not exist in revision 0

why is it pointing to revision "0" when i am giving revision as "47908". i even tried

pysvn.Revision( opt_revision_kind.head )

Please let me know if iam doing some thing wired.

Thanks in advance.

related questions