Re: cvs2git and CVS keywords
Michael Haggerty <[email protected]>
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.user |
|---|---|
| Message-ID | <[email protected]> |
Reto Glauser wrote: > I do have the following question: is it possible to ignore the CVS > keywords in each file during import or is it necessary to create the > branching history? IIRC git just looks at the content of a file and > creates the SHA1 from it - so, if the content changes (which does of > course in CVS in each different branch due to the keywords), we miss > that a commit is the same as another. This results in only 1 return from: > > $ git branch --contains <SHA1> > > even though the same commit/file exists in 5 branches. Maybe it's > possible with some grep/sed-magic to rewrite each file before commiting > it to git? Yes, it would be possible, with some minor changes to cvs2svn. There is already code in cvs2svn that knows how to collapse or expand CVS keywords (see cvs2svn_lib/checkout_internal.py, InternalRevisionReader.get_content_stream()). The handling of CVS keywords by cvs2git is not really thought out; see cvs2svn_lib/git_output_option.py, GitRevisionInlineWriter._modify_file(), so some work here would indeed be welcome. Alternatively, one could use git-filter-branch with some random shell commands *after* the conversion. Michael ------------------------------------------------------ http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1670&dsMessageId=2401060 To unsubscribe from this discussion, e-mail: [[email protected]].