On Wed, Mar 26, 2008 at 2:07 AM, Rishabh Manocha <rmanocha_at_gmail.com> wrote:
> Any suggestions here - I'm still unable to wrap my head around this
> problem.
>
> R
>
> On Tue, Mar 25, 2008 at 11:19 AM, Rishabh Manocha <rmanocha_at_gmail.com>
> wrote:
> > Paul,
> >
> > I did take a look at pysvn and from what I gathered, it was more of a
> > client side library. I want to work directly with the server/local
> > repository (again, something like viewcv or trac) instead of having to
> > checkout a version of the repository before being able to work with
> > it. Am I getting pysvn wrong here??
> >
> > Thanks,
> >
> > R
> >
> >
> >
> > On Mon, Mar 24, 2008 at 9:56 PM, Paul Koning <Paul_Koning_at_dell.com>
> wrote:
> > > >>>>> "Rishabh" == Rishabh Manocha <rmanocha_at_gmail.com> writes:
> > >
> > > Rishabh> Hello All, I'm not sure if this question has been answered
> > > Rishabh> before (I could not find anything in the mailing list
> > > Rishabh> archives) so please excuse me if it has.
> > >
> > > Rishabh> I was starting some work on my local SVN repository -
> trying
> > > Rishabh> to access it via Python, similar to what ViewVC or Trac
> > > Rishabh> do. ...
>
Here's a very very basic code that you can start with:
from svn import fs, core, repos
mypool = core.svn_pool_create(None)
myrepo = repos.open("/opt/svn/repos")
myfs = repos.fs(myrepo)
myyoung = fs.youngest_rev(myfs, None)
myroot = fs.revision_root(myfs, myyoung, None)
def entries(path):
listing = fs.dir_entries(myroot, path, mypool).values()
return [ x.name for x in listing ]
print entries("")
print entries("trunk")
# etc..
Hope this helps.
regards,
-Hari
Received on 2008-03-26 20:10:37 CET