Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 0B42FB5DBF9 for ; Sat, 8 Oct 2011 06:46:57 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 55125-02 for ; Sat, 8 Oct 2011 09:46:50 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from mail-bw0-f46.google.com (mail-bw0-f46.google.com [209.85.214.46]) by mail.postgresql.org (Postfix) with ESMTP id D2802B5DBDB for ; Sat, 8 Oct 2011 06:46:49 -0300 (ADT) Received: by bkbzt4 with SMTP id zt4so5917291bkb.19 for ; Sat, 08 Oct 2011 02:46:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer; bh=PiNqcvD8wqg00jOSaM4dZ0eNuckSijQXyC0j9WbYpis=; b=c5HN2YKR41LcuwXLzUwsg70xNtdnFolX2RrvCUzDxc4EVkolCYgwW19sNaf1Il/5Xw y6L40TT5+zORJJXoGYfMVTYYD5oNZZBESsqOuHaTz809kh47BSwN3QjjC9v2vvqL1fSq mnId2CZ4Org9fFhE+M1vAtdrlHdUaIr4/OR1M= Received: by 10.204.7.195 with SMTP id e3mr780118bke.95.1318067209075; Sat, 08 Oct 2011 02:46:49 -0700 (PDT) Received: from [172.16.0.2] (6.85-200-22.bkkb.no. [85.200.22.6]) by mx.google.com with ESMTPS id d17sm11504366bkq.11.2011.10.08.02.46.46 (version=SSLv3 cipher=OTHER); Sat, 08 Oct 2011 02:46:48 -0700 (PDT) Subject: Re: Moving to git From: Kjetil =?ISO-8859-1?Q?Nyg=E5rd?= To: Kris Jurka Cc: Maciek Sakrejda , Dave Cramer , Marko Kreen , Craig Ringer , pgsql-jdbc@postgresql.org In-Reply-To: <4E8C883D.3000606@ejurka.com> References: <5cd1ffed-061d-4e7a-ad26-93f387535710@u13g2000vbx.googlegroups.com> <4E88EFA5.8020009@ringerc.id.au> <1317742424.1761.11.camel@kjetil.kny.im> <1317745533.1761.17.camel@kjetil.kny.im> <1317832492.2580.2.camel@kjetil.kny.im> <4E8C883D.3000606@ejurka.com> Content-Type: multipart/mixed; boundary="=-MwGQX041wAqTOr0UOpag" Date: Sat, 08 Oct 2011 11:46:45 +0200 Message-ID: <1318067205.20983.0.camel@kjetil.kny.im> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.799 tagged_above=-10 required=5 tests=BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=0.1, FREEMAIL_FROM=0.001 X-Spam-Level: X-Archive-Number: 201110/46 X-Sequence-Number: 22299 --=-MwGQX041wAqTOr0UOpag Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit On Wed, 2011-10-05 at 09:39 -0700, Kris Jurka wrote: > On 10/5/2011 9:34 AM, Kjetil Nygård wrote: > > > Is it possible to put a snapshot copy of the cvs-directory somewhere, so > > people who is interested can download the cvs-repo and set it up locally > > for test-mirgrations? > > > > > http://ejurka.com/pgsql/tmp/pgjdbc-cvs.tar.gz Hi, My original e-mail did not come through, because of an email with an image. I have now made two scripts. One that takes the dump above and convert it to git with svn2git. The second script verify that the content of the tags are the same. It is also a good idea to browse the git-non-bare with qgit to see if there is something wrong with the commit-tree. (See screenshot) To run the scripts: # Convert $ mkdir $ cd $ path/to/convert_cvs_git.sh ../pgjdbc-cvs.tar.gz # Verify $ export CVSROOT= $ path/to/verify-tags-equal.sh Regards, Kny --=-MwGQX041wAqTOr0UOpag Content-Type: application/x-shellscript; name="convert_cvs_git.sh" Content-Disposition: attachment; filename="convert_cvs_git.sh" Content-Transfer-Encoding: 7bit #!/bin/bash tar_file=$1 if [ ! -f "${tar_file}" ] ; then echo "No tar file argument" exit 1 fi tar -zxf ${tar_file} mv pgjdbc CVSROOT cvs2git --dumpfile=dumpfile.dat --blobfile=blobfile.dat --username=repoadmin CVSROOT --encoding=iso-8859-15 mkdir pgjdbc.git cd pgjdbc.git git init --bare cat ../blobfile.dat ../dumpfile.dat | git fast-import cd .. git clone pgjdbc.git pgjdbc-non-bare --=-MwGQX041wAqTOr0UOpag Content-Type: application/x-shellscript; name="verify-tags-equal.sh" Content-Disposition: attachment; filename="verify-tags-equal.sh" Content-Transfer-Encoding: 7bit #!/bin/bash # Check out the tags. # I find the tags from git for simplicity. rm -f *log rm -rf cvs-co mkdir cvs-co cd cvs-co (cd ../pgjdbc-non-bare && git tag -l ) | while read foo ; do cvs co -r "$foo" -d "${foo}" pgjdbc >>../cvs_co.log 2>&1; done # Verify that the tags are correct. cd ../pgjdbc-non-bare git tag -l |while read foo ; do (git checkout $foo >>../git-co.log 2>&1) diff -r --exclude=CVS --exclude=.git . ../cvs-co/${foo} \ |grep "\$Header:" -v \ |egrep -v "^\-\-\-$" \ |egrep -v "^[0-9]+c[0-9]+" \ |grep -v "^diff \-r '\-\-exclude" >>../diff.log done if [ -s "../diff.log" ] ; then echo "There is differences." exit 1 fi if [ ! -s "../git-co.log" ] ; then echo "Problems with git checkout" exit 1 fi --=-MwGQX041wAqTOr0UOpag--