On Fri, Aug 11, 2017 at 12:46 AM, Thorsten Glaser <t...@mirbsd.de> wrote:
> Package: cvs2svn
> Version: 2.4.0-4
> Severity: important
> I regularily convert some CVS repositories of mine to push-only
> git mirrors. Today I noticed a problem for the second time: a
> push was rejected because it needs a force.
> [...]
> The remote mirror then rejected it. I did commit the jupprc file
> in several branches simultaneously, but, of course, the “second”
> part of the timestamp differs (this happens when your CVS server
> is a Pentium 233 MMX ☺).

Tl;dr: The reporter's use of cvs2git for "incremental conversions" is
not supported, though it probably works most of the time. cvs2git is
meant for one-time conversions and does not promise that the
overlapping parts of the history resulting from two conversions are
consistent. In this case the results are inconsistent, so Git rejects
a non-force push of the second set of results.

Longer explanation: CVS does not keep an unambiguous record of what
file changes were committed at the same time, nor of when a tag or
branch was created (also note that CVS allows different files to be
added to a branch or tag at different times). Moreover, CVS timestamps
are not entirely trustworthy and not necessarily consistent when
multiple files are modified in a single CVS commit. So cvs2git uses a
bunch of heuristics to decide which file-wise CVS revisions to group
together into a Git commit. The decisions made for one "commit" can be
influenced by "later" CVS activity. (I put the terms "commit" and
"later" in quotation marks because those are not CVS concepts; they
have to be inferred by cvs2git based on the snapshot of the CVS
history that it has available.)

While cvs2git attempts to provide deterministic output given the same
inputs, and tries to avoid gratuitous differences across runs for
similar inputs, it does *not* guarantee that the overlapping part of
history for two conversions are the same if there has been CVS
activity between the conversions. Adding the latter guarantee would be
a lot of work and would require one run of cvs2git to have access to
the results of the previous run.


Reply via email to