git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Aaron Crane <git@aaroncrane.co.uk>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] cvsimport: new -R option: generate revision-to-commit mapping
Date: Sun, 31 Jan 2010 08:24:49 -0500	[thread overview]
Message-ID: <20100131132449.GA29470@coredump.intra.peff.net> (raw)
In-Reply-To: <bc341e101001310443x18e02281i2e4d18334ead700b@mail.gmail.com>

On Sun, Jan 31, 2010 at 12:43:44PM +0000, Aaron Crane wrote:

> Signed-off-by: Aaron Crane <git@aaroncrane.co.uk>
> ---

Please put a bit of the rationale into the commit message. Even a
sentence or two can help later on when somebody is reading the output of
"git log".

>  Documentation/git-cvsimport.txt |   15 ++++++++++++++-
>  git-cvsimport.perl              |   20 ++++++++++++++++----
>  2 files changed, 30 insertions(+), 5 deletions(-)

A basic test would be nice. You should be able to just use your new "-R"
during the import in t9600, and then check that it generated the correct
mapping.

> +-R <revision-to-commit-file>::
> +	Generate a file containing a mapping from CVS revision numbers to
> +	newly-created Git commit IDs.  The generated file will contain one
> +	line for each (filename, revision) pair found by 'cvsps'; each line
> +	will look like

Is mentioning 'cvsps' right here?  cvsps doesn't know about git commit
id's.

> +open my $revision_map, '>', $opt_R
> +    or die "Can't open -R file $opt_R: $!\n"
> +	if defined $opt_R;

You need to use munge_user_filename here to handle relative paths. See
commit f6fdbb6.

Also, should you perhaps be appending to the file instead of truncating
it? Remember that cvsimport can be used incrementally. I wonder if it
would be better to simply have "-R" without an argument to append the
revision map to a file .git/cvs-revisions or something. And then the
user can easily pull it from there after the import.

-Peff

      reply	other threads:[~2010-01-31 13:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-31 12:43 [PATCH] cvsimport: new -R option: generate revision-to-commit mapping Aaron Crane
2010-01-31 13:24 ` Jeff King [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100131132449.GA29470@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@aaroncrane.co.uk \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).