Skip to content
This repository has been archived by the owner on May 17, 2023. It is now read-only.

osamuaoki/git-cvs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

git-cvs

Access CVS using git (like git-svn)

git-cvs - bidirectional operations between a single CVS tree and git

usage: git cvs <command> [<optarg1> [<optarg2> [<optarg3>]]]

Available commands:

init    Initialize the local git repository only with the latest snapshot
        source checked out from the remote CVS repository to start the
        approach 1 workflow.  This does not use the cvsps command to be fast
        and does not require the SSH access to the remote CVS repository.
        Here:
          * <optarg1> : $CVSROOT (required)
          * <optarg2> : $MODULE  (required)
          * <optarg3> : alternative name for the rabase branch (opt.)
        Remote CVS parameters $CVSROOT and $MODULE are the ones used as:
          $ cvs -d $CVSROOT checkout $MODULE
        This command creates the $MODULE/ directory to store the source.
        The "master" branch tracks the HEAD of the remote CVS repository.
        The $MODULE/.git/.gitcvsrc records the git-cvs parameter.

sync    Initialize the local git repository with the complete history of the
        remote CVS repository to start the approach 2 workflow as follows.

        Remote CVS -> rsync -> Local CVS -> git-cvsimport (cvsps) ->+
                ^     (ssh)           |                             :
                |                     +-> cvs checkout ->+         hack
                |                                        |          :
                +<------------ git-cvsexportcommit <-----+<---------+
        Here:
          * <optarg1> : $CVSROOT (required)
          * <optarg2> : $MODULE  (required)
          * <optarg3> : use "<optarg3>/master" instead of "cvs/master" (opt.)
        Remote CVS parameters $CVSROOT and $MODULE are the ones used as:
          $ cvs -d :ext:$CVSROOT checkout $MODULE
        This command creates 3 directories: rsyncdir/ cvsdir/ gitdir/ and 1
        file: .gitcvsrc
          * rsyncdir/ : the local mirror of the CVS repository
          * cvsdir/   : the CVS checkout
          * gitdir/   : the local git repository (no CVS/* files)
            * "cvs/master" branch : track the remote CVS repository
            * "master" branch     : track the local changes
          * .gitcvsrc : records the git-cvs parameter.
        Try gitk in the gitdir/ directory to see the full project history.

update  Update the local git repository by the latest remote CVS repository.
          * approach 1: execute this in the $MODULE directory.
          * approach 2: execute this in the gitdir/ directory or its parent
                        directory where you initially started "git cvs sync"
                        and find .gitcvsrc.
        This is the default action without <command>.

rebase  Update the local git repository by the latest remote CVS repository
        as in "git cvs update" and rebase the local changes to the remote CVS
        HEAD.

dcommit Commit from the local git repository to the remote CVS repository.
        The CVS commit happens on each git commit.  So make sure to organize
        pending git commits using "git rebase -i ..." in advance.
          * approach 1: execute this in the $MODULE directory.
          * approach 2: execute this in the gitdir/ directory.

Note:   * approach 1: the git and cvs packages are required.
        * approach 2: the rsync, ssh, git, cvs, and cvsps packages are
                      required.

        You can prefix <command> with "Debug " to enable the shell trace.
        Commands may be shorted to the first character. (case sensitive)

        If the value of the CVS keyword expansion (e.g. $) needs to
        be identified, please seek it in the CVS/Entries file.

If you need to use host specific username, please export the USER environment variable to it or seek to set it via ~/.ssh/config . See ssh_config(5).

If you don't have read access to some files in ${CVSROOT}/CVSROOT or ${CVSROOT}/$MODULE, you can't use approach 2. Please pay attention to file permissions of the CVS repository for your account.

If your remote account for CVS is "foo" at "cvs.example.org" and the data is stored in the "/srv/cvs" directory, set $CVSROOT in the above as

foo@cvs.example.org:/srv/cvs

The $MODULE should not have tailing / .

For example, if you have a CVS write access account foo via ssh for the Debian web page hosted at cvs.debian.org (https://www.debian.org/devel/website/)

$ CVSROOT="foo@cvs.debian.org:/cvs/webwml"
$ git cvs sync "$CVSROOT" webwml

This gives a nice git repository with the full history.

$ tree --dirsfirst -aL 1
.
├── cvsdir
├── gitdir
├── rsyncdir
└── .gitcvsrc

3 directories, 1 file

Required packages

  • git
  • git-cvs (debian package for git-cvsimport)
  • cvs
  • rsync

References for CVS <--> GIT

Here are some interesting things I found on the net.

About

Access CVS using git (like git-svn)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages