From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19438 invoked by alias); 6 Aug 2007 15:34:09 -0000 Received: (qmail 19253 invoked by uid 22791); 6 Aug 2007 15:34:07 -0000 X-Spam-Status: No, hits=-0.8 required=5.0 tests=AWL,BAYES_50,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO X-Spam-Check-By: sourceware.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (83.160.170.119) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 06 Aug 2007 15:34:02 +0000 Received: from dijkstra.wildebeest.org ([192.168.1.29]) by gnu.wildebeest.org with esmtp (Exim 4.43) id 1II4dP-0005ub-Fk for frysk@sourceware.org; Mon, 06 Aug 2007 17:36:44 +0200 Subject: test mercurial repository (Was: frysk meeting 2007-08-01) From: Mark Wielaard To: frysk@sourceware.org In-Reply-To: <46B04E06.7060102@redhat.com> References: <46AF3DBE.1020802@redhat.com> <46AF7C3A.90509@redhat.com> <46B04E06.7060102@redhat.com> Content-Type: multipart/mixed; boundary="=-JhUFulVmSaX8ZcXTV+1h" Date: Mon, 06 Aug 2007 15:34:00 -0000 Message-Id: <1186414438.3766.72.camel@dijkstra.wildebeest.org> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) X-Spam-Score: -4.4 (----) X-Virus-Checked: Checked by ClamAV on sourceware.org X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q3/txt/msg00271.txt.bz2 --=-JhUFulVmSaX8ZcXTV+1h Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 2448 On Wed, 2007-08-01 at 11:10 +0200, Tim Moore wrote: > Andrew Cagney wrote: > > + discuss switching to git and/or mercurial > > > As further grist for the mill, and hopefully not gasoline on the fire, here is our > colleague Jim Meyering's view on git vs. hg: http://meyering.net/dVCS/ . He's > even more adamant about it in person :) This discussion and my own struggles this weekend to get a mirror of the repository into mercurial show how fragile all these distributed version control systems still are :( Anyway, Tim gave a great hint about how he got the git mirror working. He reconstructed the original repository by checking in symbolic links to restore to original repo/modules splitup as in CVS. Then I thought you could also try to do this beforehand on the raw CVS repository. And yes, that works pretty well to make tailor grok it all. Tailor is nice since it can translate between all kinds of different version control systems: http://wiki.darcs.net/DarcsWiki/Tailor Attached is the script I use to get at the raw CVS repository, patch it up a little to appease tailor and the tailor config file. This only gives the main branch, no branches, but it does include all 6100+ changesets since 2005 (6103 changesets with 37342 changes to 9481 files). It also makes frysk look like just one big module. But I don't know if anybody ever actually uses the separate frysk-* and frysk*-build modules in the first place. The first conversion is super slow (multiple hours!) this seems to come from CVS having a "limiter" that only allows one transaction each second. And with 6000+ changesets and different files in a changeset not being part of the same transaction according to CVS, you quickly get to 5 hours just waiting for CVS... Unfortunately there is still one small issue with the getopt files. Somehow the initial checkin of the getopt library seems to completely confuse tailor and 4 files don't seem to be tracked. So you will have to touch them up by hand afterwards. See comments in the script. If you want to play with the mercurial repository start with: hg clone http://gnu.wildebeest.org/hg/frysk That is a read-only repository. But be gentle (it is 115MB), that is my personal machine, it should auto update a few times a day, but no guarantees that I keep it going. You can however recreate a similar repository with the attached script and then just put it in some cron job to periodically update. Cheers, Mark --=-JhUFulVmSaX8ZcXTV+1h Content-Disposition: attachment; filename=convert-frysk-repo.sh Content-Type: application/x-shellscript; name=convert-frysk-repo.sh Content-Transfer-Encoding: 7bit Content-length: 1619 #/bin/sh # BASEDIR (will) contain the cvs repository (frysk-cvs), # tailor config file (frysk-cvs-hg.tailor), tailor state file # (tailor.state) for incremental updates and the mercurial repo (frysk-hg) BASEDIR=/home/mark/frysk-repo # Update cvs repository (incremental) rsync --archive --delete --checksum --compress --stats \ rsync://sourceware.org/frysk-cvs \ $BASEDIR/frysk-cvs cd $BASEDIR/frysk-cvs # Create module "tree" under frysk using symlinks. rmdir frysk ln -s frysk-top frysk for i in frysk-core frysk-gtk frysk-gui frysk-imports frysk-sys; do \ ln -s ../frysk-common $i/common; ln -s ../$i frysk/$i; done ln -s ../frysk-common frysk/common ln -s ../htdocs frysk/htdocs # Fixup modules (the above makes everything available under frysk/) # And the LockDir (or you need to have a /sourceware/cvs-lockdir/ dir) mv CVSROOT/modules CVSROOT/modules.orig head -30 CVSROOT/modules.orig > CVSROOT/modules mv CVSROOT/config CVSROOT/config.orig sed -e "s/^LockDir/\#LockDir/" CVSROOT/config.orig > CVSROOT/config # Convert the repo with tailor (will do incremental updates). cd $BASEDIR tailor -v -c frysk-cvs-hg.tailor # Note that the first time you will have to fix the following 4 files: # frysk-imports/getopt/src/getopt/gnu/classpath/tools/getopt/OptionGroup.java # frysk-imports/getopt/src/getopt/gnu/classpath/tools/getopt/Parser.java # frysk-imports/getopt/src/getopt/gnu/classpath/tools/getopt/Option.java # frysk-imports/getopt/src/getopt/gnu/classpath/tools/getopt/Messages.java # With the versions of a real cvs checkout # For some reason these 4 files don't seem to get properly updated. --=-JhUFulVmSaX8ZcXTV+1h Content-Disposition: attachment; filename=frysk-cvs-hg.tailor Content-Type: text/plain; name=frysk-cvs-hg.tailor; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 270 [DEFAULT] verbose = True [project] target = hg:target start-revision = INITIAL root-directory = /home/mark/frysk-repo state-file = tailor.state source = cvs:source subdir = frysk-hg [hg:target] [cvs:source] module = frysk repository = /home/mark/frysk-repo/frysk-cvs --=-JhUFulVmSaX8ZcXTV+1h--