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

Re: WC parsing entries file with perl, where is entries fileformat?

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2007-09-13 11:53:51 CEST

On 9/13/07, Sylvain Viart <sylvain.viart@easyrencontre.com> wrote:
> Hi,
>
> I've developed some script which was looking in the .svn/entries file.
>
> But the format as changed from XML to native file format.
>
> I would like to find the max revision in the wc structure.
>
> before I was using, the following bash script function
>
> find_last_modified_rev() {
> perl -n -e 'BEGIN { $max = 0; } if(/revision="(\d+)"/) { if($max <
> $1) { $max = $1; } } END { print "$max\n"; }' \
> $(find . -name entries)
> }
>
> how should I do now?

You can use svnsversion. It prints

<revision> for clean single-revision working copies
<revision>M for single-revision working copies with modifications
<oldest>:<newest> for clean mixed-revision working copies
<oldest>:<newest>M for mixed-revision working copies with modifications

and it prints an S somewhere for working copies which have switched items.

> I'm trying to port my script in perl, but what should I use to parse the
> entries file?

No need to. It's been done by the Subversion team already :-)

HTH,

Erik.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Sep 13 11:50:36 2007

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.