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

Perl API: Using SVN::Client to Generate Diff vs. Working Copy?

From: Mark Voelker <mhsvoice_at_rocketmail.com>
Date: Wed, 5 Mar 2008 05:19:58 -0800 (PST)

I'm attempting to use the Perl API provided by SVN::Client to write a Perl script to collect some diffs. This seems pretty straightforward if you want to get diffs between two committed revisions of a file, but I'm having trouble figuring out how to generate a diff between a working copy of a file and a given committed revision of that file in the repo. Documentation on SVN::Client here:

http://search.cpan.org/~mschwern/Alien-SVN-1.4.6.0/src/subversion/subversion/bindings/swig/perl/native/Client.pm#METHODS

Notice that in the description of the $ctx->diff method it says "Produces diff output which describes the delta between $target1 at$revision1 and $target2 at $revision2. They both must represent thesame node type (i.e. they most both be directories or files). Therevisions must not be undef.". In my case though, I want $target2 to be a working copy, so I'm not sure what to set for $revision2.

Anyone know if it's possible to do a diff using an uncommitted working copy with SVN::Client, or do I need to resort to other means? If it matters: I'm working on RHEL4.x with Subversion 1.1.4-x using Red Hat's "subversion" and "subversion-perl" packages.
 
--Mark

      ____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-05 16:59:48 CET

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.