[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [or-cvs] r8279: Move based-on-revision numbers to svn (in website/trunk: . de docs/de docs/es docs/fr docs/it docs/ru es fr it pl pt ru se)



On Mon, 28 Aug 2006, weasel@xxxxxxxx wrote:

> ===================================================================
> --- website/trunk/de/contact.wml	2006-08-28 20:50:47 UTC (rev 8278)
> +++ website/trunk/de/contact.wml	2006-08-28 23:18:47 UTC (rev 8279)
> @@ -1,5 +1,5 @@
>  ## translation metadata
> -# Based-On-Revision: 1.4
> +# Based-On-Revision: 7882

Just so I find that the next time I'll need something like this:

weasel@asteria:~/projects/tor/website-trunk/docs/en$ mkdir per-revision
weasel@asteria:~/projects/tor/website-trunk/docs/en$ for f in *; do for r in $(svn log $f | egrep '^r[0-9]+' | cut -f1 -d' ' | cut -b 2-); do echo $f $r; svn cat --revision $r $f > per-revision/$f-$r; done; done

weasel@asteria:~/projects/tor/website-trunk/docs/en/per-revision$ for i in *; do ln -sv $i `grep -v '^# Revision: ' $i | md5sum | cut -f1 -d ' '`.md5; done

weasel@asteria:~/projects/tor/website/docs/en$ mkdir per-revision
weasel@asteria:~/projects/tor/website/docs/en$ for f in [a-z]*; do for r in $(cvs log $f | egrep '^revision ' | cut -f2 -d' '); do echo $f $r; cvs up -r $r $f ; cp $f per-revision/$f-$r; done; done


weasel@asteria:~/projects/tor/website/docs/en/per-revision$ mkdir links
weasel@asteria:~/projects/tor/website/docs/en/per-revision$ for i in *; do ln -sv $(chase ../../../../website-trunk/docs/en/per-revision/`grep -v '^# Revision: ' $i | md5sum | cut -f1 -d ' '`.md5) links/$i; done



weasel@asteria:~/projects/tor/website-trunk/docs$ for i in ??/*; do egrep -q -i '^# based-on-revision' $i || continue; b=`basename $i`; r=`egrep -i '^# based-on-revision' $i | cut -d' ' -f3` ; echo $b $r;  [ -e ../../website/docs/en/per-revision/links/$b-$r ] || continue; R=`chase ../../website/docs/en/per-revision/links/$b-$r | sed -e s'/.*-\([0-9]*\)$/\1/'`; echo $b $r "->" $R; sed -i -e "s/# Based-On-Revision: $r/# Based-On-Revision: $R/" $i; done