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

Re: [PATCH] fast importer for SCCS files

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 21, 2008, 00:50 UTC
Message-ID
<7vsl0s57e8.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<c5df85930801200312o7cd5d307v1a39fb35179249a9@mail.gmail.com>
"James Youngman" <jay@gnu.org> writes:
Show 6 quoted lines
> The attached patch implements an importer for SCCS files using
> git-fastimport.  It's unidirectional SCCS->git.  This is my first git
> patch, so apologies if I have done something the wrong way with regard
> to how one shoudl submit a patch.    I've attached the patch because
> my mail client would probably screw the formatting up if I just pasted
> it :(
Welcome.
Show 6 quoted lines
> From 64c49a2ee864d50280df06b0f04d17d718f187c2 Mon Sep 17 00:00:00 2001
> From: James Youngman <jay@gnu.org>
> Date: Sun, 20 Jan 2008 11:02:10 +0000
> Subject: [PATCH] Add a fast importer for SCCS.
>
> ---
Lacks sign-off (please see Documentation/SubmittingPatches).

A description? For example, "It's unidirectional" should be in the commit message. If it allows incremental or just one shot should also be said. There perhaps are other things, including future directions.

As to future directions, I think unidirectional importers should allow incremental updates, and try to be usable as a drop-in replacement of "git fetch". Among the existing ones, cvsimport is almost there (instead of doing "git fetch $url && git rebase FETCH_HEAD", you can do "git cvsimport $args $cvs_repository && git rebase $cvs_tracking_branch"), and I think it is a good model.

> +# Author: James Youngman <jay@gnu.org>
> +# Copyright: 2008 James Youngman <jay@gnu.org>
> +# License: GNU GPL version 2 or later <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>
> +#

This is quite a long line isn't it? Besides, we ship the copy of GPLv2 in git.git already.

Show 13 quoted lines
> +"""
> +A fast git importer for SCCS files.
> +
> +How to use this program:
> +
> +Let's assume you have some SCCS files in $PROJECTDIR and want to
> +convert them to a git repository in the directory $NEWGIT.
> +
> +First, make sure the SCCS (or CSSC) binaries are on your $PATH.  Then
> +do this:
> +
> +  cd "$PROJECTDIR"
> +  python git-sccsimport.py --init --git-dir="$NEWGIT" --dirs .

So, from the point of view to imitate git-fetch, this is a suboptimal interface. Rather:

	mkdir my-project-converted-to-git
        cd my-project-converted-to-git
        git init
        git-sccsimport $PROJECTDIR
and later incremental option would allow the user to say:
        cd my-project-converted-to-git
        git-sccsimport $some_incremental_options $PROJECTDIR
Show 5 quoted lines
> +TIMEZONE = None
> +MAIL_DOMAIN = None
> +UNIX_EPOCH = time.mktime(datetime.datetime(1970, 1, 1,
> +											0, 0, 0, 0,
> +											None).timetuple())

You seem to be using a tab-width that is not 8, and it shows everywhere. Please don't.

Previous: James YoungmanNext: Miles Bader
Message 2 of 6 in “fast importer for SCCS files”
  1. fast importer for SCCS filesJames Youngman, Jan 20, 2008
  2. Junio C HamanoJan 21, 2008
  3. Miles BaderJan 21, 2008
  4. Junio C HamanoJan 21, 2008
  5. Miles BaderJan 21, 2008
  6. Sam VilainJan 22, 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.