Re: Issue 54 choice of parent for a tag / branch

Michael Haggerty <[email protected]> Mon, 04 Apr 2011 14:14:41 +0200
Newsgroups gmane.comp.version-control.subversion.cvs2svn.devel
Message-ID <[email protected]>
On 03/31/2011 02:01 PM, James Blackburn wrote:
> There's a patch on:
> http://cvs2svn.tigris.org/issues/show_bug.cgi?id=54
> http://cvs2svn.tigris.org/nonav/issues/showattachment.cgi/67/cvs2svn.patch
> 
> for the issue with parent selection when much of a repository has
> appeared as the result of an import into CVS.
> 
> I know the patch doesn't resolve all the issues with selection parents
> of a commit.  However it does make a big difference to the quality of
> the import when a source repository has a large imported component.  The
> bug has an example test repository, and gitk shows the issue before:
> http://cvs2svn.tigris.org/nonav/issues/showattachment.cgi/68/before-patch.png
> and after:
> http://cvs2svn.tigris.org/nonav/issues/showattachment.cgi/69/after-patch.png
> 
> In a large repo, with many tags, cvs2git generates a sphagetti graph.
> Are there any downsides to committing the simple patch on the bug as an
> interim fix?

Sorry, I kindof put the issue on hold in the hope that Jon Foster would
take another look at it, then I forgot to get back to it.  Certainly a
partial fix (even with its disadvantages) is better than nothing and
thank you for the reminder about the neglected patches.

The main differences between Jon's patch [1] and yours [2] are that:

1. Your patch causes the same changes to be applied to both branches and
tags (Jon's only applies them to branches).  This seems like a good thing.

2. Your patch has little blurbs like this:

-      register(parent_symbol)
+      # Ensure we don't add Trunk more than once for ntdbr revs
+      if not ntdbr or not isinstance(parent_symbol, Trunk):
+        register(parent_symbol)

It doesn't look to me like parent_symbol can be an instance of Trunk.
Am I mistaken, or was this just a bit of precautionary programming on
your part?

I have tidied up Jon's patch, added a similar handling for tags, and
fixed the test suite for the changes resulting from changed tag
handling.  I've committed the results as trunk r5335-5337.

Please let me know if you see any problems.

Thanks,
Michael

[1]
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2523581
[2]
http://cvs2svn.tigris.org/nonav/issues/showattachment.cgi/67/cvs2svn.patch

-- 
Michael Haggerty
[email protected]
http://softwareswirl.blogspot.com/

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

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