0

The following commit message showing while migrating from CVS to Gitlab using cvs2git (Python 2.7.5). While migrating I noticed that cvs2svn was creating some extra commits with same following message that seem to be unnecessary.

Why its creating unwanted commits during migration?

  This commit was manufactured by cvs2svn to create branch 'BRANCH_DEV_2014'.
Mort
  • 3,379
  • 1
  • 25
  • 40
SST
  • 2,054
  • 5
  • 35
  • 65

1 Answers1

2

CVS allows you to tag/branch some subset of all files. Or tag/branch different versions of files that existed at different times. (You could in theory create a tag that only tagged half of your files and of those, 1/3 could have been the versions from 2003 and the other 2/3 the versions from 2019.)

This can be intentional, or unintentional just because CVS is a bit messy that way.

Git, on the other hand, enforces that all tags/branches are created on a specific consistent state of the repository from a single point in time.

In the cvs2git process, when creating a tag/branch, if the tool cannot find any specific point in time and state of the whole repo that represents this new tag/branch, cvs2git will create a dummy commit to allow it to then tag/branch.


Example:

If you have two files in CVS, a.class and a_test.class and you have three commits to both of the

  1. a.class a_test.class --- Initial version
  2. a.class a_test.class --- Commit 2
  3. a.class a_test.class --- Commit 3

And then you created a tag v.1.0.0 based on Commit 2, except you only tagged a.class, you did not tag a_test.class.

When you convert this to git, git has no way to handle this, so it has to create a dummy commit.

o - Initial commit
|
o - Commit 2
|\ 
|  o - Dummy commit, removes a_test.class so there's just a.class. Tagged v.1.0.0
|
o - Commit 3
Mort
  • 3,379
  • 1
  • 25
  • 40