From: <baz...@us...> - 2009-01-07 12:24:49
|
Revision: 8769 http://armagetronad.svn.sourceforge.net/armagetronad/?rev=8769&view=rev Author: bazaarmagetron Date: 2009-01-07 12:24:44 +0000 (Wed, 07 Jan 2009) Log Message: ----------- da...@da...: Made sortresources also rewrite any references to resource.dtd to the current version Modified Paths: -------------- armagetronad/trunk/armagetronad/batch/make/sortresources armagetronad/trunk/armagetronad/batch/make/sortresources.py armagetronad/trunk/armagetronad/batch/make/version armagetronad/trunk/armagetronad/resource/proto/cockpit.dtd armagetronad/trunk/armagetronad/resource/proto/map.dtd Property Changed: ---------------- armagetronad/trunk/armagetronad/ Property changes on: armagetronad/trunk/armagetronad ___________________________________________________________________ Modified: bzr:revision-info - timestamp: 2009-01-06 20:11:07.232000113 -0600 committer: da...@da... properties: branch-nick: trunk-armagetronad-work + timestamp: 2009-01-06 23:14:47.095999956 -0600 committer: da...@da... properties: branch-nick: trunk-armagetronad-work Modified: bzr:revision-id:v3-list-QlpoOTFBWSZTWZvbKhsAAAdRgAAQABK6798QIABURMgAAaeoNT1TxT1DQbKaeobXKiyAmlWT7Y5MkdJOtXDtB7w7DOGFBHiOBxaUIu7HQyyQSvxdyRThQkJvbKhs - 613 z-...@us...-20080211141509-cwbrb6hmtz9313jr 626 z-...@us...-20080214170110-rhfpd874zuogr3cm 627 z-...@us...-20080214170244-1gstsfe9yzyvrx9b 657 z-...@us...-20080301093905-0jwh1zg9srukp8fn 678 wrt...@us...-20080320130546-cr72y7d9q5a8nk7a 679 z-...@us...-20080324202056-eybvkm0gjomywbcq 680 z-...@us...-20080326104303-kpkkrwiw1fioi0rd 681 epsy-20080327213346-setzm7umdzzuk2dm 683 wrt...@us...-20080402122117-54nak33inuca02o9 684 wrt...@us...-20080402122804-2xhc8bgyrjsa09cd 685 wrt...@us...-20080418093840-cxtpql4xw2vsbmyn 686 ep...@fr...-20080418200503-q16s8az3yewn4x7a 687 ep...@fr...-20080419004917-bq4vguy9vpbkmlo3 688 wrt...@us...-20080419185850-ksm1feadrrhqigjb 689 wrt...@us...-20080423170738-zb8v72r0asm7cp52 691 ep...@fr...-20080427145818-212ave5ohdhth4ph 692 epsy46-20080428164518-07b9wsj90rf82c3y 693 epsy46-20080429194430-hq3fd6i1mnz1vrnz 694 ep...@fr...-20080518131839-uik8hj18c55boh3m 696 z-...@us...-20080618212520-e6ov1rb9b9edwt30 697 wrt...@us...-20080708142300-tu6f7ag7ak0yhdrf 698 wrt...@us...-20080727173310-pv1vq0wj01yfwgfl 699 da...@da...-20080824021014-8aacq5gfp7ktxlxz 700 da...@da...-20080824055426-l5dwhb216uteu7ca 701 da...@da...-20080824172432-lvagd99j28hq8uc1 702 da...@da...-20080824225545-ply97boo9jkqtysn 704 ep...@fr...-20081027173216-nh6d92edtwe35j2g 705 ep...@fr...-20081027203505-42bpegw0fyywzyou 706 ep...@fr...-20081027204727-jcx89jukht9ay72r 707 ep...@fr...-20081028180734-62o6e90rf020xzv8 708 ep...@fr...-20081028224044-f3myemuy87v52ilp 709 ep...@fr...-20081110193848-iksu9rmzzi7jb0qq 710 ep...@fr...-20081114212232-i1q12n375bdpl0sp 712 z-...@us...-20081211141049-wbjceadupsfss5ib 713 da...@da...-20081216223143-1hso83uxyagaubg8 716 lee...@gm...-20081220084635-zv6bpm9rar9yufy7 717 lee...@gm...-20081220085046-6rwe6cqmdlffs4rl 718 lee...@gm...-20081220085502-gpad43pu99t1e6po 719 lee...@gm...-20081220092821-q7uj4w92j6a3a7eb 720 lee...@gm...-20081220094339-k3zb139qp87r4b2w 721 lee...@gm...-20081220100858-uap7k5s22tbipzkt 722 lee...@gm...-20081220111203-rhp5p15agx73xi1k 723 lee...@gm...-20081220112757-mjp2yffddjy5s74e 724 lee...@gm...-20081220114653-k2dqt4wiizipbwas 725 lee...@gm...-20081221181637-6d0tfx7sx7syxfb6 726 lee...@gm...-20081221182603-9bkelm9x7aclb0bw 734 lee...@gm...-20081230173103-fmzio9fanap2rybf 735 lee...@gm...-20081230174204-cppkz4sumguhysa9 736 lee...@gm...-20081230174738-mecjttlpyp1i859c 737 lee...@gm...-20081230174816-qmtp2a3q8m52jsn3 738 lee...@gm...-20081230194247-q6oyx6cqfz03b2lr 739 lee...@gm...-20081231202038-odzabc3wmlqzvskt 740 lee...@gm...-20081231203835-nn2kezh1el82dn1q 741 lee...@gm...-20090101022727-myjxnrvqe5e4l1wz 743 da...@da...-20090103170253-cdtppjz8nzwhngst 744 da...@da...-20090103183413-r1852m22og3lh2uc 745 lee...@gm...-20090103212852-mvsergjd4ao1la77 746 da...@da...-20090103231550-6zn9qzo6gpj9kwu8 748 da...@da...-20090105115751-x3y9oui4xvt43crj 749 da...@da...-20090105131244-nljbq3qp4hp7lg07 750 da...@da...-20090105192648-inoxhljmqqe3dgw7 751 da...@da...-20090105192806-vhrs9hj8nr4lrdp0 752 da...@da...-20090106194428-nwwwyljr8wn3pwq1 753 da...@da...-20090106194753-82zu5xfqfzbnk9k9 754 da...@da...-20090106202104-5z9836ych2di2jlo 755 da...@da...-20090106234335-aolp3kr0gasjmbri 756 da...@da...-20090106234811-p3el5s40j0upvyql 757 da...@da...-20090107021107-5kbemotp1sco4ncp + 613 z-...@us...-20080211141509-cwbrb6hmtz9313jr 626 z-...@us...-20080214170110-rhfpd874zuogr3cm 627 z-...@us...-20080214170244-1gstsfe9yzyvrx9b 657 z-...@us...-20080301093905-0jwh1zg9srukp8fn 678 wrt...@us...-20080320130546-cr72y7d9q5a8nk7a 679 z-...@us...-20080324202056-eybvkm0gjomywbcq 680 z-...@us...-20080326104303-kpkkrwiw1fioi0rd 681 epsy-20080327213346-setzm7umdzzuk2dm 683 wrt...@us...-20080402122117-54nak33inuca02o9 684 wrt...@us...-20080402122804-2xhc8bgyrjsa09cd 685 wrt...@us...-20080418093840-cxtpql4xw2vsbmyn 686 ep...@fr...-20080418200503-q16s8az3yewn4x7a 687 ep...@fr...-20080419004917-bq4vguy9vpbkmlo3 688 wrt...@us...-20080419185850-ksm1feadrrhqigjb 689 wrt...@us...-20080423170738-zb8v72r0asm7cp52 691 ep...@fr...-20080427145818-212ave5ohdhth4ph 692 epsy46-20080428164518-07b9wsj90rf82c3y 693 epsy46-20080429194430-hq3fd6i1mnz1vrnz 694 ep...@fr...-20080518131839-uik8hj18c55boh3m 696 z-...@us...-20080618212520-e6ov1rb9b9edwt30 697 wrt...@us...-20080708142300-tu6f7ag7ak0yhdrf 698 wrt...@us...-20080727173310-pv1vq0wj01yfwgfl 699 da...@da...-20080824021014-8aacq5gfp7ktxlxz 700 da...@da...-20080824055426-l5dwhb216uteu7ca 701 da...@da...-20080824172432-lvagd99j28hq8uc1 702 da...@da...-20080824225545-ply97boo9jkqtysn 704 ep...@fr...-20081027173216-nh6d92edtwe35j2g 705 ep...@fr...-20081027203505-42bpegw0fyywzyou 706 ep...@fr...-20081027204727-jcx89jukht9ay72r 707 ep...@fr...-20081028180734-62o6e90rf020xzv8 708 ep...@fr...-20081028224044-f3myemuy87v52ilp 709 ep...@fr...-20081110193848-iksu9rmzzi7jb0qq 710 ep...@fr...-20081114212232-i1q12n375bdpl0sp 712 z-...@us...-20081211141049-wbjceadupsfss5ib 713 da...@da...-20081216223143-1hso83uxyagaubg8 716 lee...@gm...-20081220084635-zv6bpm9rar9yufy7 717 lee...@gm...-20081220085046-6rwe6cqmdlffs4rl 718 lee...@gm...-20081220085502-gpad43pu99t1e6po 719 lee...@gm...-20081220092821-q7uj4w92j6a3a7eb 720 lee...@gm...-20081220094339-k3zb139qp87r4b2w 721 lee...@gm...-20081220100858-uap7k5s22tbipzkt 722 lee...@gm...-20081220111203-rhp5p15agx73xi1k 723 lee...@gm...-20081220112757-mjp2yffddjy5s74e 724 lee...@gm...-20081220114653-k2dqt4wiizipbwas 725 lee...@gm...-20081221181637-6d0tfx7sx7syxfb6 726 lee...@gm...-20081221182603-9bkelm9x7aclb0bw 734 lee...@gm...-20081230173103-fmzio9fanap2rybf 735 lee...@gm...-20081230174204-cppkz4sumguhysa9 736 lee...@gm...-20081230174738-mecjttlpyp1i859c 737 lee...@gm...-20081230174816-qmtp2a3q8m52jsn3 738 lee...@gm...-20081230194247-q6oyx6cqfz03b2lr 739 lee...@gm...-20081231202038-odzabc3wmlqzvskt 740 lee...@gm...-20081231203835-nn2kezh1el82dn1q 741 lee...@gm...-20090101022727-myjxnrvqe5e4l1wz 743 da...@da...-20090103170253-cdtppjz8nzwhngst 744 da...@da...-20090103183413-r1852m22og3lh2uc 745 lee...@gm...-20090103212852-mvsergjd4ao1la77 746 da...@da...-20090103231550-6zn9qzo6gpj9kwu8 748 da...@da...-20090105115751-x3y9oui4xvt43crj 749 da...@da...-20090105131244-nljbq3qp4hp7lg07 750 da...@da...-20090105192648-inoxhljmqqe3dgw7 751 da...@da...-20090105192806-vhrs9hj8nr4lrdp0 752 da...@da...-20090106194428-nwwwyljr8wn3pwq1 753 da...@da...-20090106194753-82zu5xfqfzbnk9k9 754 da...@da...-20090106202104-5z9836ych2di2jlo 755 da...@da...-20090106234335-aolp3kr0gasjmbri 756 da...@da...-20090106234811-p3el5s40j0upvyql 757 da...@da...-20090107021107-5kbemotp1sco4ncp 758 da...@da...-20090107051447-8ncvyikf3aadgz3a Modified: armagetronad/trunk/armagetronad/batch/make/sortresources =================================================================== --- armagetronad/trunk/armagetronad/batch/make/sortresources 2009-01-07 12:23:23 UTC (rev 8768) +++ armagetronad/trunk/armagetronad/batch/make/sortresources 2009-01-07 12:24:44 UTC (rev 8769) @@ -29,18 +29,23 @@ # rename them properly python ${sortresources} -v ${destination} || exit 1 -# silently remove empty directories -find ${destination} -type d -depth -exec rmdir \{\} \; > /dev/null 2>&1 - # copy dtds test -r ${destination}/AATeam || mkdir ${destination}/AATeam +# get resource.dtd's new version +RESOURCEVERSION=`grep "<!-- version=" < ${source}/resource.dtd | sed -e "s,.*=\",," -e "s,\".*,,"` + for type in `ls ${source} | grep '.dtd$' | grep -v -- - | sed -e 's,.dtd,,'`; do # copy dtd file to one with correct version VERSION=`grep "<!-- version=" < ${destination}/${type}.dtd | sed -e "s,.*=\",," -e "s,\".*,,"` - cp ${destination}/${type}.dtd ${destination}/AATeam/${type}-$VERSION.dtd + # If the file includes resource.dtd, make it include the properly + # versioned resource-version.dtd + sed "s,resource.dtd,resource-$RESOURCEVERSION.dtd,g" < ${destination}/${type}.dtd > ${destination}/AATeam/${type}-$VERSION.dtd echo $VERSION > ${destination}/.${type}version done +# silently remove empty directories +find ${destination} -type d -depth -exec rmdir \{\} \; > /dev/null 2>&1 + # tag completion touch ${destination} || exit 1 chmod 755 ${destination} || exit 1 Modified: armagetronad/trunk/armagetronad/batch/make/sortresources.py =================================================================== --- armagetronad/trunk/armagetronad/batch/make/sortresources.py 2009-01-07 12:23:23 UTC (rev 8768) +++ armagetronad/trunk/armagetronad/batch/make/sortresources.py 2009-01-07 12:24:44 UTC (rev 8769) @@ -78,6 +78,7 @@ # fallback: return empty stream, result: no dtd checking is done. # Not horribly bad in this context print "warning, could not find requested entity", sysid + return StringIO.StringIO("") # parse: create parser... Modified: armagetronad/trunk/armagetronad/batch/make/version =================================================================== --- armagetronad/trunk/armagetronad/batch/make/version 2009-01-07 12:23:23 UTC (rev 8768) +++ armagetronad/trunk/armagetronad/batch/make/version 2009-01-07 12:24:44 UTC (rev 8769) @@ -4,48 +4,12 @@ #set -x -show_usage() -{ - echo "USAGE: $1 [-v|--verbose] srcdir" -} - -if test $# -ne 1 && test $# -ne 2 -then - echo "ERROR: Invalid argument count" >&2 - show_usage $0 - exit 1 -fi - -verbose= srcdir="$1" -if ( test x"$1" = x"--verbose" || test x"$1" = x"-v" ) && test $# -eq 2 -then - verbose=# - srcdir=$2 -elif ( test x"$1" = x"--verbose" || test x"$1" = x"-v" ) -then - echo "ERROR: Invalid argument count" >&2 - show_usage $0 - exit 1 -fi - # set version parts to defaults for CVS snapshot major_version=`cat ${srcdir}/major_version` DATE=`date +%Y%m%d` -builddate=`date -R` -minor_version= -revid=0 -revno=0 -branchnick= -revcount=0 -tag= -srcchanged= -lca=0 -lcaz=0 -branchurl= - #echo $major_version #echo $minor_version @@ -122,72 +86,30 @@ # Check if bzr is installed, and if the path is versionned bzr >/dev/null 2>&1 # But for now, ignore it -if test $? -eq 0 && test -d ${srcdir}/.bzr -#if test 1 -eq 0 +#if test $? -eq 0 +if test 1 -eq 0 then - # Crappily, we can't rely on revision numbers to do anything - # ( ie. when one merges then pushes, the last revno might be lower than originally) - # So we count revisions, including merged ones, also including fools which have empty - # lines with only "revno: 15" in their commit messages - revno=$( bzr revno ${srcdir} 2>/dev/null) - revcount=$( bzr log ${srcdir} 2>/dev/null | sed -ne 's/^ *revno: [0-9\.]\+$/\0/p' | wc -l ) - lca=$revno - lcaz=$revcount - versioned=# - branchurl=$( bzr info ${srcdir} 2>/dev/null | sed -ne 's/^ parent branch: \(.*\)$/\1/p' ) - - - # We will check this branch diverged, and/or if tree changed - bzrmissingcout=$( cd ${srcdir} && bzr missing --this 2>/dev/null ) - missing=$? bzr diff ${srcdir} --quiet >/dev/null 2>&1 - changed=$? - - - if test ${missing} -eq 1 - # if it diverged: + # Test for the return code of bzr diff (see bzr diff --help) + if test $? -eq 0 then - # Count the revisions we added locally - localrevisions=$( echo "${bzrmissingcout}" | sed -ne '2,1s/^You have \([0-9]\+\) extra revision(s):$/\1/p' ) - # See how many steps it is, with the fool's number - stepsbackwards=$( bzr log ${srcdir} -l ${localrevisions} | sed -ne 's/^ *revno: [0-9\.]\+$/\0/p' | wc -l ) - # And start dancing. - minor_version=_alpha_z$(( ${revcount} - ${stepsbackwards} ))_${DATE} - # Set last common ancestors - lca=$(( ${revno} - ${localrevisions})) - lcaz=$(( ${revcount} - ${stepsbackwards} )) - srcchanged=# - elif test ${missing} -eq 0 && ( test ${changed} -eq 1 || test ${changed} -eq 2 ) - then - # If a change was made and no more revision was added, just use revision fool's number plus build date - minor_version=_alpha_z${revcount}_${DATE} - # And this is versionned too - srcchanged=# - elif test ${missing} -eq 0 - then - # If really no change was made, use the fool's number, with tag if any - # So check if we have tags + # If no change was made, use revision number + # but first check if it's tagged revno=$(bzr revno ${srcdir}) - tag=$(bzr tags -d ${srcdir} | sed -ne 's/^\(.*\) +${revno}$/\1/p' ) - if test ${tag} + tag=$(bzr tags | grep -P "^(.*?) +${revno}$" | awk '{ print $1 }') + if test $tag then # If it is tagged, use the tag - minor_version=_alpha_z${revcount}_${tag} + DATE=_$tag else - # If not, use fool's number only - minor_version=_alpha_z${revcount} + # If not, use revision number + DATE=_r$(bzr revno ${srcdir}) fi - # That's versioned as well - else - # Otherwise, this is just not versionned - versioned= - fi - - if test $versioned + elif test $? -lt 3 then - major_version=$( cd ${srcdir}; bzr nick ) - branchnick=$major_version - revid=$( bzr testament | sed -ne 's/^revision-id: \(.*\)/\1/p' ) + # If a change was made, use revision number plus build date + DATE=_r$(bzr revno ${srcdir})_$DATE + # It returns 3 if it's not versionned, so forget it fi fi @@ -196,27 +118,4 @@ test -z "$DATE" || minor_version=`cat ${srcdir}/minor_version | sed -e "s,DATE,$DATE," -e "s,YYYYMMDD,$DATE,"` fi -if test $verbose -then - echo VERSION \"$major_version$minor_version\" - echo REVID \"$revid\" - echo REVNO $revno - echo BRANCHNICK \"$branchnick\" - echo ZNR $revcount - echo REVTAG \"$tag\" - - if test $srcchanged - then - echo CHANGED true - else - echo CHANGED false - fi - - echo BUILDDATE \"$builddate\" - echo BRANCHLCA $lca - echo BRANCHLCAZ $lcaz - echo BRANCHURL \"$branchurl\" -else - echo $major_version$minor_version -fi - +echo $major_version$minor_version Modified: armagetronad/trunk/armagetronad/resource/proto/cockpit.dtd =================================================================== --- armagetronad/trunk/armagetronad/resource/proto/cockpit.dtd 2009-01-07 12:23:23 UTC (rev 8768) +++ armagetronad/trunk/armagetronad/resource/proto/cockpit.dtd 2009-01-07 12:24:44 UTC (rev 8769) @@ -1,4 +1,4 @@ -<!-- version="" --> +<!-- version="0.3.1-c" --> <!ENTITY % ResourceContents "Cockpit" > <!ENTITY % ResourceType "aacockpit" > Modified: armagetronad/trunk/armagetronad/resource/proto/map.dtd =================================================================== --- armagetronad/trunk/armagetronad/resource/proto/map.dtd 2009-01-07 12:23:23 UTC (rev 8768) +++ armagetronad/trunk/armagetronad/resource/proto/map.dtd 2009-01-07 12:24:44 UTC (rev 8769) @@ -6,7 +6,7 @@ <!ENTITY % resource.module "INCLUDE"> <![%resource.module;[ <!ENTITY % resource.mod - SYSTEM "resource-0.3.1-a.dtd"> + SYSTEM "resource.dtd"> %resource.mod;]]> <!ELEMENT Map (Settings?, World)> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |