cvs2git: some missing features ('Header' expansion, incremental modifications)
Mojca Miklavec <[email protected]>
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.user |
|---|---|
| Message-ID | <CALBOmsa60Qz6ouktfhVvE1PvWJQxwSVN7=pdYxx=y9d7znVr7w@mail.gmail.com> |
Dear developers & other users,
I would like to convert some CVS repositories into GIT, but since
those CVS repositories are still upstream, I need to keep the GIT
mirrors up-to-date. I'm currently using "git cvsimport", but it is not
really clear to me how to address some of my requirements either with
that or with cvs2svn. Here is the list of issues:
1.) Wrong headers
The files in repository start with something like the following:
\ProvidesFileRCS $Header: /cvsroot/some/path/file.tex,v 1.8 2010/02/22
22:49:21 user Exp $
When using "git cvsimport" the path is expanded, so I end up with
/home/myusername/weird/path/some/path/file.tex
When I disable header expansion the path is not expanded, but I get
wrong timestamp (the pre-latest one).
These were problems with "git cvsimport". It might be the wrong place
to discuss those bugs here, but I wanted to say that with cvs2svn I'm
not even able to figure out how to get those headers. Sadly I end up
with
\ProvidesFileRCS $Header: $
2.) Modifying history
I need to reshuffle some paths (move files around) and do tiny edits
on files. It is no problem to do that once. Git is very powerful, so
git filter-branch --index-filter ...
and some extra commands do a wonderful job. The problem is that I
would like to keep the GIT mirror up-to-date with original CVS. So I
either need to:
- run a bunch of repository modifications (git filter-branch
--index-filter ... & friends) each time when CVS repository is updated
(this is very inefficient & time expensive)
- write my own script that explores contents of GIT repository which
results from "cvs2svn" or "git cvsimport" and creates a new GIT
repository based on that (very error prone; I will very likely screw
something up)
- looking for proposals for a better approach(?)
The ideal way to solve the problem would be if I was able to apply
some filter between reading CVS and creating GIT. It would be great if
cvs2svn would parse CVS repository first, then call my script,
providing me access to:
- path to some file
- contents of that file
as well as:
- author of commit
- commit timestamp
and I would be able to change path (filename) & contents with my
script. Then, the script would push the resulting file into GIT.
Does anyone have a better idea? My explanation was probably not 100%
clear, but I can try to reparaphrase parts if needed.
3.) I would like to rename .cvsignore into .gitignore (and replace
.cvsignore with .gitignore in that file if present).
I'm willing to try to implement some of these features if they are
indeed missing and if they would be useful for more people than just
me, but I would need some pointers where to start.
Thank you very much,
Mojca
------------------------------------------------------
http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1670&dsMessageId=2870564
To unsubscribe from this discussion, e-mail: [[email protected]].