I know many here are using CVS, and many are also using git, so I wonder
if anybody can help me.  On BSD.lv, I push my CVS repositories (kcgi,
sblg, etc.) to GitHub from time to time using a cvs2git script.  It goes
as follows, shortened and pseudonymised:

 REPO=$1  # e.g., kcgi
 cd /tmp/cvs2git
 cvs2git --blobfile=git-blob.dat \
   --dumpfile=git-dump.dat \
   --username=kristaps@me \
   /path/to/cvsroot/$REPO
 mkdir $REPO.git
 cd $REPO.git
 git init
 cd .git
 git fast-import \
   --export-marks=../../git-marks.dat < ../../git-blob.dat
 git fast-import \
   --import-marks=../../git-marks.dat < ../../git-dump.dat
 git remote add origin https://github.com/account/$REPO.git
 cd ..
 git checkout
 git push --tags -u origin master

Our repositories are all pretty basic (just tags, no branches), and it's
only me pushing to GitHub, so this works although it's not incremental
and can take a minute or so.  Or I should say it "worked", because since
updating OpenBSD from an embarrassingly old version, it doesn't any
more.  The error given is on the push:

 Compressing objects: 100% (633/633), done.
 Writing objects: 100% (2257/2257), 492.44 KiB | 16.98 MiB/s, done.
 Total 2257 (delta 1624), reused 2257 (delta 1624)
 remote: Resolving deltas: 100% (1624/1624), done.
 To https://github.com/account/REPO.git
  * [new tag]         VERSION_0_4_3 -> VERSION_0_4_3
  ! [rejected]        master -> master (fetch first)
  ! [rejected]        VERSION_0 -> VERSION_0 (already exists)
  ... lots of"rejected" lines...
 error: failed to push some refs to 'https://github.com/account/REPO.git'
 hint: Updates were rejected because the tag already exists in the remote.

Any ideas?  Or does anybody have a process already in place for syncing
CVS to git/GitHub?  I've tried stopping before the "push" and doing all
manner of fetches and such, but nothing works.  I rarely use git, so I'm
really just reaching out in the dark.  The GitHub presence is just to
pick up on a issues and pull requests from folks who are more
comfortable with that interface than e-mail, for which it has worked well.

Thank you,

Kristaps

Reply via email to