Re: cvs2git: One possible bug, and two other issues
Michael Haggerty <[email protected]> Sun, 09 Jan 2011 08:37:19 +0100
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.devel |
|---|---|
| Message-ID | <[email protected]> |
On 01/03/2011 03:48 PM, Anders Pilegaard wrote: > Issue 2 - 'Why'-information in manufactured commits > --------------------------------------------------- > > Sample repository: ex2.tar > Creation script : create_ex2.sh > Patch : patch2.txt > > When I test-converted our big CVS repository I saw a huge amount of > commits 'Manufactured by cvs2svn'. For some files the manufactured > commits outnumbered the real ones 10 to 1, making the history almost > impossible to use. I wanted to know why they showed up, so I had a > chance to get rid of them. > > To that purpose I modified git_output_option.py. I renamed > _is_simple_copy to _why_not_simple_copy, and modified it to return > None for "Ok, this is a simple copy" and a string if not. The string > describes why a simple copy wouldn't work. The callers of > _is_simple_copy are modified to pass the returned string into the > commit message of the resulting manufactured commit. > > The text itself could be more readable, but the current state should > be enough as proof-of-concept. If this idea is accepted the > readability can always be improved. > > I think this would be a good general extension of cvs2git. This is a good idea in principle. How verbose are the resulting commit messages in practice? Could you send a few "typical" snippets to the mailing list? I wonder whether this is the sort of information that people will want in their permanent repository history. Do you think that it is the sort of information that will be referred back to after the conversion, or is it mostly useful for optimizing/debugging/understanding the conversion itself and uninteresting thereafter? If the latter, perhaps it would be more appropriate to store the information into a separate log file, somehow indexed to the corresponding commits. Or perhaps to make its inclusion in the log messages optional. On a technical level, there are a few things that would have to get cleaned up in this patch before it is committed: - The docstring for _why_not_simple_copy() needs to be updated. - The message "LOD already exists" should probably be changed, as LOD is not a common term. For example, the message could be something like "Branch "foo" already exists" or "Tag "foo" already exists" depending on whether the symbol in question is a branch or tag. - Please split the following code into two lines: if why is not None: log_msg = log_msg+'\n'+why - The patch would have to be rewritten to apply to trunk. BTW, feel free to use the git mirror on "repo" (ssh://repo.or.cz/srv/git/cvs2svn.git) as the basis for your work if it is more convenient. (I use git-svn exclusively when working on cvs2svn.) Yours, Michael -- Michael Haggerty [email protected] http://softwareswirl.blogspot.com/ ------------------------------------------------------ http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2696754 To unsubscribe from this discussion, e-mail: [[email protected]].