#!/bin/bash # NOTE: This conversion has been made and merge. # This "one-shot" script is not required anymore, # it is only kept here for historical interest. # This script imports 3301 revisions of CSS 2, # dated from 1997-07-21 to 2014-01-17, # from a zip archive of W3C's CVS repository into a Mercurial bundle file. # # This bundle can be imported into a clone of CSSWG's repository # (https://hg.csswg.org/drafts/) to add a 'css2' subdirectory # with all its change history: # # hg unbundle path/to/css2.hg-bundle # hg merge # hg commit -m 'Import CSS 2 from CVS, with change history' # This script requires cvs2svn and hg convert # http://cvs2svn.tigris.org/ # http://mercurial.selenic.com/wiki/ConvertExtension # # It expects to be in the same directory as a 'css2.zip' file # containing the 'css2-src' directory of W3C's internal CVS repository, # which itself consists of a bunch of '*,v' files. # # It will go through a multiple-step conversion, creating temporary files # in the 'tmp' subdirectory, to finally produce a ~10 MB 'css2.hg-bundle' file. set -e cd $(dirname $0) rm -rf tmp mkdir -p tmp/cvs/CVSROOT # Exclude: # css2-src/css2.tgz,v # css2-src/css2.ps,v # css2-src/css2.ps.gz,v # css2-src/css2.pdf,v # css2-src/css2.zip,v # css2-src/css2.txt,v # But not: # css2-src/css2.html,v unzip -q css2.zip 'css2-src/*' -x 'css2-src/css2.[^h]*' -d tmp/cvs # We want the final result at http://dev.w3.org/csswg/css2/ mv tmp/cvs/css2-src tmp/cvs/css2 # Try some surgery on a broken RCS file. # We may end up with incorrect earlier versions of bin/mkidx # but at least cvs2svn doesn't abort in the middle of the conversion patch -p 1 <<-'EOF' --- a/tmp/cvs/css2/bin/mkidx,v +++ b/tmp/cvs/css2/bin/mkidx,v @@ -509,20 +509,19 @@ # class="tocline*" directs out patched html2ps to omit the bullet d85 2 a86 3 print OUTPUT "\n$indent[$j]