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

Re: svn-changes-dump

From: Vyacheslav Iutin <iutin_at_whirix.com>
Date: 2007-02-09 06:57:10 CET


about peg revision.

I think command like

#svn export somefile.txt@5

will get HEAD revision of somefile.txt. Or not? But I actually want
revision 5 of file which is in working directory now. I didn't suppose
to run into the problems with previously renamed/removed files. Because
the script is for incremental updates first of all. However I've set
both peg revision and operative revision to be more careful.

Export is much better indeed. Thank you.

Peter Samuelson wrote:
> Slava, this version looks much better.
>> # get max number of revision from range
>> REV1=`echo "$1" | sed 's/^\([0-9]\+\):\([0-9]\+\)$/\1/g'`
>> REV2=`echo "$1" | sed 's/^\([0-9]\+\):\([0-9]\+\)$/\2/g'`
>> if [ $REV1 -gt $REV2 ] ; then
>> else
>> fi
> This will fail if you use a range with non-numeric revisions - say,
> HEAD or BASE or {2007-01-25}.
> I suggest just splitting on ":" and using REV2 unconditionally. Don't
> worry about the case of "520:514" - if people want the newer rev, they
> can specify it in the right order.
>> mkdir -p "$DIR"/`dirname "$listItem"`
>> $SVN cat -r$MAXREV "$listItem" > "$DIR/$listItem"
> I suggest 'svn export' instead of 'svn cat'. You don't need the shell
> redirection, and more importantly, 'svn export' preserves the execute
> permission bits (from the svn:executable property).
> Finally, I think you want to use peg-rev syntax - ${listItem}@$MAXREV -
> rather than -r syntax. That way you get the same files that the log
> messages refer to.


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

Received on Fri Feb 9 06:53:54 2007

This is an archived mail posted to the Subversion Dev mailing list.