On Sat, Nov 21, 2009 at 2:18 AM, Robert Bradshaw <[email protected]> wrote: > True, though the target audience is much more likely to have a good > internet connection, and when downloading it's compressed to about > half that. (I pity the developer trying to use Cython on a machine > where half a dozen MB is a consequential burden on their hard drive.)
Just to make this explicit, the .hg directory only adds about 3.4 MB to the download, not 6.4MB (or 7.6MB). Here are some test results: 464K cython-devel.tar.bz2 564K cython-devel.tar.gz 3.1M cython-devel_withgit.tar.bz2 3.2M cython-devel_withgit.tar.gz 3.8M cython-devel_withhg.tar.bz2 3.9M cython-devel_withhg.tar.gz 3.0M cython-devel/.git 7.6M cython-devel/.hg Explanation: * cython-devel is working tree only * cython-devel_withhg is working tree + .hg directory (same as we currently do) * cython-devel_withgit is working tree + .git directory (after running hg-fast-export and doing git gc --aggressive) * cython-devel/.hg is size of extracted .hg directory * cython-devel/.git is size of extracted .git directory > Anyway, that's my long-winded defense of those 6.4 MB. A script to > turn a simple source directory into a full-blown repository would > nearly meet the above goals, and is probably not that hard. Anyone > want to submit a patch? :-) Here's a proof of concept. I haven't tested it, and I don't know Hg well, so this may not be good. It might be better to turn this into a Makefile target rather than a script. #!/bin/bash -x -e tag=0.11.3 repo=http://hg.cython.org/cython-devel tmpdir=`mktemp --tmpdir=. -d` hg clone $repo $tmpdir cd $tmpdir hg update $tag cd .. mv $tmpdir/{.hg,.hgtags} . rm -rf $tmpdir The rest of my email contains a bunch of git commands, for the curious (and for me in the future, in case I forget them). -- Mark ------------ Git Stuff ------------ Here are the steps to reproduce my size numbers: git clone git://repo.or.cz/fast-export.git hg clone http://hg.cython.org/cython-devel cd cython-devel git init ../fast-export/hg-fast-export.sh -r . rm -f .git/hg2git* git reset git gc --aggressive cd .. tar cvzf cython-devel.tar.gz cython-devel --exclude=.git --exclude=.hg tar cvzf cython-devel_withhg.tar.gz cython-devel --exclude=.git tar cvzf cython-devel_withgit.tar.gz cython-devel --exclude=.hg tar cvjf cython-devel.tar.bz2 cython-devel --exclude=.git --exclude=.hg tar cvjf cython-devel_withhg.tar.bz2 cython-devel --exclude=.git tar cvjf cython-devel_withgit.tar.bz2 cython-devel --exclude=.hg du -hs cython-devel*.* cython-devel/.{git,hg} Here's a git version of the update script (not well tested): #!/bin/bash -x -e tag=0.11.3 branch=working-$TAG repo=git://git.cython.org git init git remote add origin $repo git fetch git branch master origin/master git update-ref --no-deref HEAD $tag git reset git checkout -b $branch _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
