[gnutls-dev] HAEDS UP: Moving away from CVS

Simon Josefsson simon at josefsson.org
Tue Feb 27 11:08:53 CET 2007


For future reference, below are the complete steps I made to move from
CVS to GIT for libtasn1.

Quite easy once I found all the commands (which took some time, there
is not much good high-level documentation).  Further, the steps are
idempotent, so I can run this more than once.  I have no idea what
happens if I make any changes on the CVS server though, although
git-cvsimport claims to support that.  Possibly I should then call
git-cvsimport on an existing work tree for things to work best.

Now, let's see if I can make a release based on this git repository...

/Simon

# Start in a fresh directory.
jas at mocca:~$ mkdir git
jas at mocca:~$ cd git
jas at mocca:~/git$

# Get a local copy of the CVS repository
jas at mocca:~/git$ rsync --delete -e ssh -av cvs.gnupg.org:/cvs/gnutls/ gnutls/
...

# Fix usernames (optional, but remove -A below if you skip this)
cat<<EOF > /tmp/foo
wkoch:Werner Koch <wk at gnupg.org>
nmav:Nikos Mavrogiannopoulos <nmav at gnutls.org>
fiorinaf:Fabio Fiorina <fiorinaf at gnutls.org>
twoaday:Timo Schulz <twoaday at gnutls.org>
admcd:Andrew McDonald <admcd at gnutls.org>
jas:Simon Josefsson <simon at josefsson.org>
EOF

# Convert into a new git repository.
jas at mocca:~/git$ git-cvsimport -A /tmp/foo -k -d $PWD/gnutls -C repo libtasn1
Committing initial tree 397dce26cda49d25909964c68cb65b302a26c8e9
Generating pack...
Done counting 2314 objects.
Deltifying 2314 objects.
 100% (2314/2314) done
Writing 2314 objects.
 100% (2314/2314) done
Total 2314, written 2314 (delta 1574), reused 0 (delta 0)
Pack pack-9e406f174c6b3e8a7351986b22d8de9a4dd75562 created.
jas at mocca:~/git$

# Check out a working copy.
jas at mocca:~/git$ git-clone repo work
remote: Generating pack...
remote: Done counting 2314 objects.
remote: Deltifying 2314 objects.
remote:  100% (2314/2314) done
Indexing 2314 objects.
remote: Total 2314, written 2314 (delta 1574), reused 2314 (delta 1574)
 100% (2314/2314) done
Resolving 1574 deltas.
 100% (1574/1574) done
jas at mocca:~/git$

# Add a push branch to make stuff accessible publicly.
jas at mocca:~/git$ cd work/
jas at mocca:~/git/work$ cg-branch-add pub git+ssh://repo.or.cz/srv/git/libtasn1.git

# Push everything to the public site.
jas at mocca:~/git/work$ git-push --tags pub
Everything up-to-date
jas at mocca:~/git/work$




More information about the Gnutls-devel mailing list