Re: cvs2git wrongly deletes files when creating branches

Markus Schöpflin <[email protected]>
Newsgroups gmane.comp.version-control.subversion.cvs2svn.user
Message-ID <[email protected]>
Am 18.06.2010 20:57, schrieb Max Bowsher:
> On 17/06/10 11:54, Markus Schöpflin wrote:

[...]

>> - As you can see, the symbol00000 branch is now created between log1 and
>> log2, but it should have been created between log5 and log8.
>
> The conversion is correct, the only problem is that cvs2git's commit
> messages are misleading when a branch is created in multiple stages.
>
> symbol00000 sprouts correctly from log 5 (and there is no visible commit
> for this because it optimized out to a simple reference update), but
> there is later a commit which performs the second stage of creating it
> by adding file002 after log 1.

You are right, I was mislead by the commit message.

>
>> - Also file002 is missing from symbol00001.
>
> That is correct. That's what the source CVS repository says.

Correct again.

>
>> - Next, a number of manufactured commits for branch creation are no longer
>> present with the SVN version.
>
> In git, the act of creating a branch is just a reference update, and
> does not involve a commit. The trunk version of cvs2git mirrors this and
> does not manufacture a branch creation commit unless it actually needs
> to enact a change to the tree as part of branch creation.

But what I'm now seeing in my real repository is, that many commit (only 
branch creations, AFAICT) don't have parents at all.

For example (conversion with current trunk, note that there is no parent, 
but a large number of files are cherry picked):

---%<---
Author: cvs2svn <none>  2003-07-24 12:26:44
Committer: cvs2svn <none>  2003-07-24 12:26:44
Child:  cd74b51b72960f8e246b6ed0cedb7affa29fffcb
Branch: XYZ
Follows:
Precedes: abc

     This commit was manufactured by cvs2svn to create branch 'XYZ'.

     Cherrypick from ... 2002-08-16 13:50:11 UTC
       <here comes a large list of files>
--->%---

Versus (conversion with 2.3.0, 4 parents, no cherry picking:

---%<---
Author: cvs2svn <none>  2003-07-24 12:26:44
Committer: cvs2svn <none>  2003-07-24 12:26:44
Parent: b090f22d97b0fc315a4f52e90ceaea5e36cee51e
Parent: ef2076d0a14465d30c7ba05aae01fbbe5d36f0ba
Parent: bd558c2f1b645c348e0753fdc2cfe3121132f3ef
Parent: 7502d887eee8bd3b1f3bfa53d9b8495f794a400c
Child:  7b5743f5c54578e06afda0cea1f420fc9ac9765a
Branch: XYZ
Follows: LIB_1_03, PROGS_0_1_9
Precedes: abc

     This commit was manufactured by cvs2svn to create branch 'XYZ'.
--->%---

Looking at the whole repository with 'gitk --all' creates an all linear 
structure with no parallel branches at all, whilst looking at the 
repository converted with 2.3.0 shows many parallel branches.

I realize that this may not be very helpful in figuring out what actually 
is wrong, but maybe the keywords 'cherry picking' and 'no parents for 
branches' do ring a bell.

> So, in summary, what I think we ought to do is provide different
> generated commit messages for branch creation depending on whether they
> are for initial branch creation, or to splice additional files into a
> partially created branch.

Yes please, this would indeed help in understanding what actually has been 
done.

Markus

------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1670&dsMessageId=2624153

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.