Skip to content

Instantly share code, notes, and snippets.

@sergev
Last active June 7, 2019 01:30
Show Gist options
  • Save sergev/2f79587bc151fce15f9fc90a5f1f27b9 to your computer and use it in GitHub Desktop.
Save sergev/2f79587bc151fce15f9fc90a5f1f27b9 to your computer and use it in GitHub Desktop.
How to import PCC sources from CVS to GIT
Download the latest version of PCC and PCC-libs sources, unpack.
$ wget http://pcc.ludd.ltu.se/ftp/pub/pcc/pcc-cvs-20190504.tgz
$ wget http://pcc.ludd.ltu.se/ftp/pub/pcc-libs/pcc-libs-cvs-20190504.tgz
$ tar xf pcc-libs-cvs-20190504.tgz
$ tar xf pcc-cvs-20190504.tgz
$ mv pcc-cvs-20190504 pcc
$ mv pcc-libs-cvs-20190504 pcc-libs
We need also the contets of CVSROOT directories. Extract them via CVS.
$ cvs -d :pserver:[email protected]:/cvsroot co -d pcc-tmp pcc/CVSROOT
$ (cd pcc-tmp && cvs co CVSROOT)
$ mv pcc-tmp/CVSROOT pcc
$ cvs -d :pserver:[email protected]:/cvsroot co -d pcc-libs-tmp pcc-libs/CVSROOT
$ (cd pcc-libs && cvs co CVSROOT)
$ mv pcc-libs-tmp/CVSROOT pcc-libs
Convert CVS data into binary packages.
$ cvs2git --blobfile=pcc.blob --dumpfile=pcc.dump --encoding=latin_1 pcc
$ cvs2git --blobfile=pcc-libs.blob --dumpfile=pcc-libs.dump --encoding=latin_1 pcc-libs
Unpack PCC as GIT repository.
$ mkdir pcc-git
$ cd pcc-git
$ git init
$ cat ../pcc.blob ../pcc.dump | git fast-import
$ git checkout
$ mkdir pcc
$ git mv arch cc common config.guess config.h.in config.sub configure configure.ac DATESTAMP f77 install-sh Makefile.in mip os pcc
$ git commit -m "Move pcc stuff to a subdirectory"
$ cd ..
Unpack PCC-libs as GIT repository.
$ mkdir pcc-libs-git
$ cd pcc-libs-git
$ git init
$ cat ../pcc-libs.blob ../pcc-libs.dump | git fast-import
$ git checkout
$ mkdir pcc-libs
$ git mv config.guess config.sub configure configure.ac csu install-sh libF77 libI77 libpcc libsoftfloat Makefile.in pcc-libs
$ git commit -m "Move pcc-libs stuff to a subdirectory"
$ cd ..
Merge projects PCC and PCC-libs together.
$ cd pcc-git
$ git remote add pcc-libs ../pcc-libs-git
$ git fetch pcc-libs
$ git merge -m "Merge pcc with pcc-libs" --allow-unrelated-histories pcc-libs/master
$ git remote rm pcc-libs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment