Re: PATCH: add git to verify-cvs2svn.py ; fix too many warnings issue
James Blackburn <[email protected]> Wed, 25 Aug 2010 09:22:02 +0100
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks for the comments Michael, I'll have a look! I'm still playing with this as I've only got part way through a conversion here and was tripping over keyword expansion mismatches hence ignoring the lingering .git directories. Cheers, James On 25 August 2010 09:13, Michael Haggerty <[email protected]> wrote: > James Blackburn wrote: >> Attached is a patch to add --git support to verify-cvs2svn.py -- in a >> similar manner to HgRepos. > > This is great! This has been languishing on my todo list forever, so > I'm glad that somebody else got to it. > > I must be doing something wrong, but a simple verification of a > conversion of the "test-data/main-cvsrepo" doesn't quite work for me: > > $ ./cvs2git --username=cvs2git \ > --dumpfile=cvs2svn-tmp/dump.out \ > --blobfile=cvs2svn-tmp/blob.out \ > test-data/main-cvsrepos > $ mkdir cvs2svn-tmp/gitrepo > $ (cd cvs2svn-tmp/gitrepo && > git init && > cat ../blob.out ../dump.out | git fast-import) > $ git reset --hard HEAD > $ contrib/verify-cvs2svn.py --tmpdir=cvs2svn-tmp --git \ > test-data/main-cvsrepos cvs2svn-tmp/gitrepo > Verifying trunk > FAIL: Directory / has extra entries: .git > Verifying tag T_ALL_INITIAL_FILES > FAIL: Directory / has extra entries: .git > Verifying tag T_ALL_INITIAL_FILES_BUT_ONE > FAIL: Directory / has extra entries: .git > Verifying tag T_MIXED > FAIL: Directory / has extra entries: .git > Verifying tag after > FAIL: Directory / has extra entries: .git > Verifying tag vendortag > FAIL: Directory / has extra entries: .git > Verifying branch B_FROM_INITIALS > CMD FAILED: git > --git-dir=cvs2svn-tmp/git-export-branch-B_FROM_INITIALS/.git > --work-tree=cvs2svn-tmp/git-export-branch-B_FROM_INITIALS checkout -q > B_FROM_INITIALS > Output: > Branch B_FROM_INITIALS set up to track remote branch B_FROM_INITIALS > from origin. > Error: git command failed! > > I think that at least some of these errors could be avoided if you would > use "git archive" rather than "git clone; git co" to export tags and > branches; i.e., use the equivalent of this command: > > GIT_DIR=$PATH/.git git archive --format tar $BRANCH | > tar -C $dest_dir -x > > It should also be faster than cloning the repository for each branch. > > The disadvantage is that it relies on the presence of "tar" in the > command path. To get around that limitation, one could use Python's > "tarfile" module, using something like the last recipe on this page: > > http://docs.python.org/release/2.4/lib/tar-examples.html > >> It also fixes an issue whereby file mismatches are reproted file_size >> / 8K times. > > Cool. I just committed this part of your patch. > > Michael > > ------------------------------------------------------ http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2650959 To unsubscribe from this discussion, e-mail: [[email protected]].