git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Hand-rolling migration to Git

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 25, 2008, 10:39 UTC
Message-ID
<alpine.LSU.1.00.0803251137580.10660@wbgn129.biozentrum.uni-wuerzburg.de>
In-Reply-To
<200803251114.55673.johan@herland.net>
Hi,
On Tue, 25 Mar 2008, Johan Herland wrote:
Show 31 quoted lines
> 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

Previous: Johan HerlandNext: Peter Karlsson
Message 3 of 4 in “Hand-rolling migration to Git”
  1. Peter KarlssonMar 25, 2008
  2. Johan HerlandMar 25, 2008
  3. Johannes SchindelinMar 25, 2008
  4. Peter KarlssonMar 31, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.