Re: git: uh-oh

Поиск
Список
Период
Сортировка
От Khee Chin
Тема Re: git: uh-oh
Дата
Msg-id AANLkTinUcoohC1hpoUNF=xULb3nktjhkZwrzenT-L_KZ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: git: uh-oh  (Alvaro Herrera <alvherre@commandprompt.com>)
Ответы Re: git: uh-oh  (Magnus Hagander <magnus@hagander.net>)
Список 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@anoncvs.postgresql.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@commandprompt.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@commandprompt.com>
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: git: uh-oh
Следующее
От: Tom Lane
Дата:
Сообщение: Re: proposal: tuplestore, tuplesort aggregate functions