Re: git: uh-oh

From: Khee Chin <kheechin(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Michael Haggerty <mhagger(at)alum(dot)mit(dot)edu>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: git: uh-oh
Date: 2010-08-18 15:33:33
Message-ID: AANLkTinUcoohC1hpoUNF=xULb3nktjhkZwrzenT-L_KZ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I previously proposed off-list an alternate solution to generate the git
repository which was turned down due to it not being able to handle
incremental updates. However, since we are now looking at a one-time
conversion, this method might come in handy.

---
Caveat: cvs2git apparently requires CVSROOT somewhere in the path for
it to work. I did a symbolic link of the current directory $PWD with
CVSROOT to bypass the quirk cvs2git requires.

mkdir work
cd work
wget http://ftp.netbsd.se/pkgsrc/distfiles/cvsclone-0.00/cvsclone.l
flex cvsclone.l && gcc -Wall -O2 lex.yy.c -o cvsclone
cvsclone -d :pserver:anoncvs(at)anoncvs(dot)postgresql(dot)org:/projects/cvsroot pgsql
ln -s $PWD CVSROOT
cvs2git --blobfile=blobfile --dumpfile=dumpfile --username pgdude
--encoding=UTF8 --fallback-encoding=UTF8 CVSROOT/pgsql > cvs2git.log
mkdir git && cd git && git init .
cat ../blobfile ../dumpfile | git fast-import
git reset --hard
cd ..
---

Regards,
Khee Chin.

On Wed, Aug 18, 2010 at 11:14 PM, Alvaro Herrera <alvherre(at)commandprompt(dot)com
> wrote:

> Excerpts from Michael Haggerty's message of mié ago 18 05:01:29 -0400 2010:
>
> > cvs2git doesn't currently have this option. I'm not sure how much work
> > it would be to implement; probably a few days'. Alternatively, you
> > could write a tool that would rewrite the ancestry information in the
> > repository *after* the cvs2git conversion using .git/info/grafts (see
> > git-filter-branch(1)). Such rewriting would have to occur before the
> > repository is published, because the rewriting will change the hashes of
> > most commits.
>
> AFAICT, graft points are not checked in[1], thus they don't propagate; are
> you saying that we should run the migration, then manually inject the
> graft points, then run some conversion tool that writes a different
> repository with those graft points welded into the history? This sounds
> like it needs some manual work (namely find out the appropriate graft
> points for each branch), that can be prepared beforehand. Otherwise it
> seems easier than reworking the cvs2git code for the "mostly-exclusive"
> option.
>
> I am sort of assuming that this "conversion tool" already exists, but
> maybe this is not the case?
>
> [1]
> http://stackoverflow.com/questions/1488753/how-to-merge-two-branches-without-a-common-ancestor
>
> --
> Álvaro Herrera <alvherre(at)commandprompt(dot)com>
> The PostgreSQL Company - Command Prompt, Inc.
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>
> --
> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-hackers
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-08-18 15:35:19 Re: proposal: tuplestore, tuplesort aggregate functions
Previous Message Alvaro Herrera 2010-08-18 15:14:31 Re: git: uh-oh