You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Chris Wein <cw...@mobilygen.com> on 2005/03/09 18:08:30 UTC

efficient way to determine diff between wc and a tag?

In migrating from CVS, we have some users who use a useful command to
determine what files are different from the current wc and a tag.  It is
done with

alias cvsr 'cvs -n update -r \!* |& grep
"^[UAMCR]|abort|update.*nothing|pertinent|ignored"'

used as:

% cvsr TAGNAME

Now we are creating tags in /tags whereas the working copy is presumably
based on /trunk.  Can anyone think of an efficient way to get the list
of files or an output suitable for a Perl script?


-- 
Chris Wein
Software Manager
Mobilygen Corp.
E-Mail : cwein@mobilygen.com
Phone  : 408-869-4035


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: efficient way to determine diff between wc and a tag?

Posted by Eric S <ej...@americanlowlife.com>.
Chris Wein wrote:

>Now we are creating tags in /tags whereas the working copy is presumably
>based on /trunk.  Can anyone think of an efficient way to get the list
>of files or an output suitable for a Perl script?
>

If the other solutions offered are lacking and you're willing to do some 
coding, the API is available for perl.  I've had a few problems with 
doing checkouts and switches through perl and the API, but the rest of 
the API has been quite solid, and getting the results back as lists of 
objects beats parsing external commands any day of the week, in my book.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: efficient way to determine diff between wc and a tag?

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
Chris Wein wrote:
> In migrating from CVS, we have some users who use a useful command to
> determine what files are different from the current wc and a tag.  It is
> done with
> 
> alias cvsr 'cvs -n update -r \!* |& grep
> "^[UAMCR]|abort|update.*nothing|pertinent|ignored"'
> 
> used as:
> 
> % cvsr TAGNAME
> 
> Now we are creating tags in /tags whereas the working copy is presumably
> based on /trunk.  Can anyone think of an efficient way to get the list
> of files or an output suitable for a Perl script?

Try something like

$ svn diff --old $TAGURL --new . --diff-cmd /usr/bin/true | awk 
'/^Index:/ { print $2 }'

Note that the awk command won't work with files that have spaces in 
their name.  Fixing that is left as an exercise for the reader ;-)

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org