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 $PROJECTDIRand later incremental option would allow the user to say:
cd my-project-converted-to-git
git-sccsimport $some_incremental_options $PROJECTDIRShow 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.