[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Perl equiv for 'svn info http://example.com/repos'?

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2005-10-30 06:31:57 CET

On 10/29/05, Christopher H. Laco <claco@chrislaco.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I have some code that uses SVN::Client to connect to a subversion server
> using http. I can do all of the usual things.. list files and folders
> with their last authoer, revisions, size, etc, and read the contents of
> files.
>
> What I can't seen to figure out is how to get the current revisions of
> that repository?
>
> I thought that SVN::Repos would connect to it, and then is the
> fs->revision_root...but it appears the SVNB::Repos::open doesn't like
> http paths at all.

SVN::Repos only works on local repositories. To get the latest
revision number for a remote repository you need to use SVN::Ra (the
repository access library). This is actually the example at the top
of SVN::Ra:

    require SVN::Core;
    require SVN::Ra;
    my $ra = SVN::Ra->new ('file:///tmp/svmtest');
    print $ra->get_latest_revnum ();

Just replace the 'file:///tmp/svmtest' part with the URL of your repository.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Sun Oct 30 06:34:12 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.