Giter Club home page Giter Club logo

cvs2git's Introduction

Summary

The purpose of cvs2git is to convert a CVS repository to a Git repository. All mechanism of conversion is based on reposurgeon tool. The conversion uses the version 3.1.2 of mercurial provided on jessie.

Launch conversion

docker run -it lroche/cvs2git modulecvs cvs_remote_url

Examples

docker run -it lroche/cvs2git a2ps cvs.savannah.gnu.org

How to retrieve hg conversion ?

At the end of process, the script launchs a bash session to allow to check the result, here from the example you can get the a2ps-git directory by using docker cp command :

docker cp <containerId>:/work/a2ps/a2ps-git .

Better way can be to use a bind mount volume during your run:

docker run [-it] -v ~/gitconversion/a2ps:/work/a2ps lroche/cvs2git a2ps cvs.savannah.gnu.org

So here the result git repository will be in ~/gitconversion/a2ps/a2ps-git directory on host machine.

Troubleshooting

  • Reposurgeon uses rsync to connect on remote server so sometimes you could get some issues with it: there is a workaround, only if you have access on cvs server files (,v files), you can copy them on host machine in a directory named ${project-name}-mirror. If your project is a2ps and your workdir is ~/gitconversion/a2ps:

    • create a directory named : ~/gitconversion/a2ps/a2ps-mirror
    • place all your files ,v in a directory named ~/gitconversion/a2ps/a2ps-mirror/a2ps
    • create a empty directory named CVSROOT here: ~/gitconversion/a2ps/a2ps-mirror/CVSROOT

You should have in ~/gitconversion/a2ps/ this following structure now:

├── a2ps-mirror
│   ├── CVSROOT
│   └── a2ps
└── a2ps.map

Author map

  • The author map allows to specify a full name and email address for each local user ID in the repo you are converting. The expected name file is ${moduleCVSName}.map

So to set a author map file, create a map file in your host machine and use a bind mount volume to get it in container:

docker run [-it] -v ~/gitconversion/a2ps:/work/a2ps lroche/cvs2git a2ps cvs.savannah.gnu.org

cvs2git's People

Contributors

lroche avatar

Watchers

 avatar

cvs2git's Issues

Could not convert classeditor.cvs.sourceforge.net to git.

Hi, I tried to execute docker run -it lroche/cvs2git classeditor classeditor.cvs.sourceforge.net, and expected to get a working git repo for classeditor, but it seemed not working. Any ideas?

@liudonghua123 ➜ /workspaces/classeditor (main) $ docker run -it lroche/cvs2git classeditor classeditor.cvs.sourceforge.net
repotool: what VCS do you want to convert from? repotool: what VCS do you want to convert to? repotool: generating Makefile, some variables in it need to be set.
repotool mirror cvs://classeditor.cvs.sourceforge.net/classeditor#classeditor classeditor-mirror
rsync: connection unexpectedly closed (5655 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [receiver=3.1.1]
rsync: connection unexpectedly closed (10976 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(226) [generator=3.1.1]
cvssync: child returned 12.
(cd classeditor-mirror/ >/dev/null; repotool export) >classeditor.cvs
make: *** No rule to make target 'classeditor.map', needed by 'classeditor.fi'.  Stop.
Authors map file classeditor.map is not found. Generated one.
reposurgeon "read  <classeditor.cvs" "authors write >classeditor.map"
reposurgeon: ignoring empty repository
Makefile:84: recipe for target 'stubmap' failed
make: *** [stubmap] Error 1
make: *** No rule to make target 'classeditor.map', needed by 'classeditor.fi'.  Stop.
root@8433a88ed39c:/work/classeditor#

I tried to execute rsync -av rsync://classeditor.cvs.sourceforge.net/cvsroot/classeditor/\* cvs according to doc here locally, but it did not work neither, is the cvs server of sourceforge dead?

liudonghua@DESKTOP-DELL:/mnt/d/code$ rsync -av rsync://classeditor.cvs.sourceforge.net/cvsroot/classeditor/\* cvs
receiving incremental file list
created directory cvs
rsync: connection unexpectedly closed (6948 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(231) [receiver=3.2.7]
rsync: connection unexpectedly closed (13762 bytes received so far) [generator]
rsync error: error in rsync protocol data stream (code 12) at io.c(231) [generator=3.2.7]
liudonghua@DESKTOP-DELL:/mnt/d/code$

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.