Hi,
Erik Huelsmann a écrit :
> On 9/13/07, Sylvain Viart <sylvain.viart@easyrencontre.com> wrote:
>
[...]
>> 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
>
mistyped command name, it should be
svnversion --help
usage: svnversion [OPTIONS] [WC_PATH [TRAIL_URL]]
Produce a compact 'version number' for the working copy path
WC_PATH. TRAIL_URL is the trailing portion of the URL used to
determine if WC_PATH itself is switched (detection of switches
within WC_PATH does not rely on TRAIL_URL). The version number
is written to standard output. For example:
[...]
http://svnbook.red-bean.com/en/1.1/re57.html
sounds good, thanks.
>> 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 :-)
>
Great!
Now I need to play with it, thanks.
Regards,
Sylvain.
Received on Thu Sep 13 12:20:25 2007