Re: [PATCH] fast importer for SCCS files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"James Youngman" <jay@xxxxxxx> writes:

> 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.

> From 64c49a2ee864d50280df06b0f04d17d718f187c2 Mon Sep 17 00:00:00 2001
> From: James Youngman <jay@xxxxxxx>
> 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@xxxxxxx>
> +# Copyright: 2008 James Youngman <jay@xxxxxxx>
> +# 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.

> +"""
> +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

> +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.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux