Re: cvs2git: One possible bug, and two other issues

Anders Pilegaard <[email protected]> Fri, 28 Jan 2011 12:30:44 +0100
Newsgroups gmane.comp.version-control.subversion.cvs2svn.devel
Message-ID <[email protected]>
On Sun, Jan 9, 2011 at 8:21 AM, Michael Haggerty <[email protected]> wrote:
> On 01/03/2011 03:48 PM, Anders Pilegaard wrote:
>> Issue 1 - Branches getting the wrong parent(s)
>> [...]
> AFAICT your fix will work.  But there might be a simpler way to fix the
> problem.
>
> The following code in CVSFileItems._adjust_branch_parents() is there to
> prevent "circular grafts", where branch1 is grafted onto branch2 and
> branch2 is grafted onto branch1:
>
>      elif possible_parent.symbol == cvs_branch.symbol:
>        # Only branches that precede the branch to be adjusted are
>        # considered possible parents.  Leave parentage unchanged:
>        return
>
> Because of that code, there is never an attempt to graft a branch that
> is earlier in the list onto one that is later in the list.  Therefore,
> grafting a branch that is later in the list cannot affect how branches
> that are earlier in the list are grafted.  Therefore, if we process
> branches in *reverse* order, there should be no need for special code.
> See move-parents.patch for an example patch.  Does this work for you?

I have converted the full repository with your patch, and AFAICT it
works just as expected.  Branch history is a lot cleaner, and I
haven't found any instance where things got worse or which should have
been caught by this.

I would definitely vote 'yes' to include this patch in the code.

Best regards,
  Anders Pilegaard

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

To unsubscribe from this discussion, e-mail: [[email protected]].