You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mark Voelker <mh...@rocketmail.com> on 2008/03/05 13:19:58 UTC

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

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@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org