* Hand-rolling migration to Git
@ 2008-03-25 10:03 Peter Karlsson
2008-03-25 10:14 ` Johan Herland
0 siblings, 1 reply; 4+ messages in thread
From: Peter Karlsson @ 2008-03-25 10:03 UTC (permalink / raw)
To: git
Hi!
I am looking for documentation on how to hand-roll a conversion to Git,
but I keep getting lost in the maze of similar-looking man pages. Is
there a tutorial, howto, or perhaps even just a list of recommended man
pages to read on importing project changes to Git?
I have projects of two different kinds that I need to import:
1. The "make a copy of the source code directory and edit the new copy"
source management system. I need to be able to import one directory at
a time, each describing a version controlled state. The date stamp on
the commits should probably be the most recent file in each directory.
2. A piece of software using PVCS (a RCS-like version control system
with added support for parallel development (using a locking model)). I
have a complete "trail file" which lists all commits done to the
repository in chronological order since the repository was created, and
can use that as a base. Since it has no concept of an atomic commit, I
need to semi-manually join commits by walking the trail file and
comparing lock sets, time stamps, commit messages and authors.
I can probably make the output from (2) look like from (1), so I
basically just need to find a pointer to information on how to
(re-)create the history with Git.
--
\\// Peter - http://www.softwolves.pp.se/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Hand-rolling migration to Git
2008-03-25 10:03 Hand-rolling migration to Git Peter Karlsson
@ 2008-03-25 10:14 ` Johan Herland
2008-03-25 10:39 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Johan Herland @ 2008-03-25 10:14 UTC (permalink / raw)
To: Peter Karlsson; +Cc: git
On Tuesday 25 March 2008, Peter Karlsson wrote:
> Hi!
>
> I am looking for documentation on how to hand-roll a conversion to Git,
> but I keep getting lost in the maze of similar-looking man pages. Is
> there a tutorial, howto, or perhaps even just a list of recommended man
> pages to read on importing project changes to Git?
>
> I have projects of two different kinds that I need to import:
>
> 1. The "make a copy of the source code directory and edit the new copy"
> source management system. I need to be able to import one directory at
> a time, each describing a version controlled state. The date stamp on
> the commits should probably be the most recent file in each directory.
>
> 2. A piece of software using PVCS (a RCS-like version control system
> with added support for parallel development (using a locking model)). I
> have a complete "trail file" which lists all commits done to the
> repository in chronological order since the repository was created, and
> can use that as a base. Since it has no concept of an atomic commit, I
> need to semi-manually join commits by walking the trail file and
> comparing lock sets, time stamps, commit messages and authors.
>
> I can probably make the output from (2) look like from (1), so I
> basically just need to find a pointer to information on how to
> (re-)create the history with Git.
Take a look at git-fast-import. It should be relatively easy to write a small script that converts from either (1) or (2) to a stream of git-fast-import commands.
Have fun! :)
...Johan
--
Johan Herland, <johan@herland.net>
www.herland.net
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Hand-rolling migration to Git
2008-03-25 10:14 ` Johan Herland
@ 2008-03-25 10:39 ` Johannes Schindelin
2008-03-31 6:23 ` Peter Karlsson
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2008-03-25 10:39 UTC (permalink / raw)
To: Johan Herland; +Cc: Peter Karlsson, git
Hi,
On Tue, 25 Mar 2008, Johan Herland wrote:
> On Tuesday 25 March 2008, Peter Karlsson wrote:
>
> > I am looking for documentation on how to hand-roll a conversion to
> > Git, but I keep getting lost in the maze of similar-looking man pages.
> > Is there a tutorial, howto, or perhaps even just a list of recommended
> > man pages to read on importing project changes to Git?
> >
> > I have projects of two different kinds that I need to import:
> >
> > 1. The "make a copy of the source code directory and edit the new
> > copy" source management system. I need to be able to import one
> > directory at a time, each describing a version controlled state.
> > The date stamp on the commits should probably be the most recent
> > file in each directory.
> >
> > 2. A piece of software using PVCS (a RCS-like version control system
> > with added support for parallel development (using a locking
> > model)). I have a complete "trail file" which lists all commits
> > done to the repository in chronological order since the repository
> > was created, and can use that as a base. Since it has no concept of
> > an atomic commit, I need to semi-manually join commits by walking
> > the trail file and comparing lock sets, time stamps, commit
> > messages and authors.
> >
> > I can probably make the output from (2) look like from (1), so I
> > basically just need to find a pointer to information on how to
> > (re-)create the history with Git.
>
> Take a look at git-fast-import. It should be relatively easy to write a
> small script that converts from either (1) or (2) to a stream of
> git-fast-import commands.
Yeah. To get inspiration how the scripts should look like, read
contrib/fast-import/import-tars.perl, or look at
http://repo.or.cz/w/fast-export.git
Hth,
Dscho
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Hand-rolling migration to Git
2008-03-25 10:39 ` Johannes Schindelin
@ 2008-03-31 6:23 ` Peter Karlsson
0 siblings, 0 replies; 4+ messages in thread
From: Peter Karlsson @ 2008-03-31 6:23 UTC (permalink / raw)
To: Johannes Schindelin; +Cc: Johan Herland, git
Johannes Schindelin:
>> Take a look at git-fast-import. It should be relatively easy to write a
>> small script that converts from either (1) or (2) to a stream of
>> git-fast-import commands.
> Yeah. To get inspiration how the scripts should look like, read
> contrib/fast-import/import-tars.perl, or look at
> http://repo.or.cz/w/fast-export.git
I've played a bit with git-fast-import, but I sort of failed to get
something working for PVCS export (see other thread).
The import-tars.perl script, however, was a very good idea. The
simplest solutions for the multiple-directories source I had was just
to tar it up and feed through import-tars.perl. After importing it into
Git and repacking it with a suitably large --window argument, I had a
Git repository of 64 megabytes, down from the four or so gigabytes of
uncompressed directories. That did include removing some object files,
though (but keeping some .exe's).
--
\\// Peter - http://www.softwolves.pp.se/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-31 6:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-25 10:03 Hand-rolling migration to Git Peter Karlsson
2008-03-25 10:14 ` Johan Herland
2008-03-25 10:39 ` Johannes Schindelin
2008-03-31 6:23 ` Peter Karlsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).