git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Haggerty <mhagger@alum.mit.edu>
To: Junio C Hamano <gitster@pobox.com>
Cc: Eugene Sajine <euguess@gmail.com>, git@vger.kernel.org
Subject: Re: Fwd: git cvsimport implications
Date: Wed, 15 May 2013 08:24:26 +0200	[thread overview]
Message-ID: <51932A1A.4050606@alum.mit.edu> (raw)
In-Reply-To: <7vfvxpfbli.fsf@alter.siamese.dyndns.org>

On 05/15/2013 12:19 AM, Junio C Hamano wrote:
> Eugene Sajine <euguess@gmail.com> writes:
> 
>> What if there are a lot of branches in the CVS repo? Is it guaranteed
>> to be broken after import?
> 
> Even though CVS repository can record branches in individual ,v
> files, reconstructing per branch history and where the branch
> happened in each "changeset" cannot be determined with any
> certainty.  The best you can get is a heuristic result.
> 
> I do not think anybody can give such a guarantee.  The best you can
> do is to convert it and validate if the result matches what you
> think has happened in the CVS history.

Junio, you are correct that there is no 100% reliable way of inferring
the changesets that were made in CVS.  CVS doesn't record which file
revisions were committed at the same time, unambiguous branch points,
etc.  The best a tool can do is use heuristics.

But it *is* possible for a conversion tool to make some more elementary
guarantees regarding aspects of the history that are recorded
unambiguously in CVS, for example:

* That if you check the tip of same branch out of CVS and out of Git,
you get the same contents.

* That CVS file revisions are committed to Git in the correct order
relative to each other; e.g., that the changes made in CVS revision
1.4.2.2 in a particular file precede those made in revision 1.4.2.3 of
the same file.

git-cvsimport fails to ensure even this minimal level of correctness.
Such errors are demonstrated in its own test suite.

cvs2git, on the other hand, gets the basics 100% correct (if you find a
discrepancy, please file a bug!), in addition to having great heuristics
for inferring the details of the history.

There is no reason ever to use git-cvsimport for one-time conversions
from CVS to Git.  The only reason ever to use it is if you absolutely
require an incremental bridge between CVS and Git, and even then please
use it with great caution.

Michael
the cvs2svn/cvs2git maintainer

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/

  reply	other threads:[~2013-05-15  6:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAPZPVFYFL6OS2HWbF0BKNKtNsZ6CfpWmKCypGxeTs7W8-76q8Q@mail.gmail.com>
2013-05-14 22:09 ` Fwd: git cvsimport implications Eugene Sajine
2013-05-14 22:19   ` Junio C Hamano
2013-05-15  6:24     ` Michael Haggerty [this message]
2013-05-15 18:03       ` Eugene Sajine
2013-05-17  9:10         ` Michael Haggerty
2013-05-17  9:21           ` John Keeping
2013-05-17 11:50           ` Martin Langhoff
2013-05-17 13:14             ` Michael Haggerty
2013-05-17 13:34               ` Andreas Krey
2013-05-17 13:50                 ` Martin Langhoff
2013-05-17 15:28                 ` Michael Haggerty
     [not found]           ` <CAPZPVFZ6HjFYaPOqcrwhCCdGhYUaVEjyDeaL8dcsqy1ghcfWpg@mail.gmail.com>
2013-05-17 16:10             ` Fwd: " Eugene Sajine
2013-05-18  5:52               ` Michael Haggerty

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=51932A1A.4050606@alum.mit.edu \
    --to=mhagger@alum.mit.edu \
    --cc=euguess@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).