>[!DANGER] Deprecated software. Last updated in 2008.
Concurrent Versions System is a [[GPL]] licensed version control system written in [[3. Reference/Software/Programming Languages/C|C]].
- [Website](https://cvs.nongnu.org/)
- [Source](https://ftp.gnu.org/non-gnu/cvs/source/)
> Concurrent Versions System (CVS, or Concurrent Versioning System) is a version control system originally developed by Dick Grune in July 1986.
# Notability
Was very popular from the 1980s until the early 2ks when it was replaced by [[SVN]]. Many old and often abandoned open source projects online are only available via CVS.
[[SourceForce]] is probably the single largest host of CVS projects still online. Although CVS support is [deprecated](https://sourceforge.net/blog/decommissioning-cvs-for-commits/) and only read-only.
# Philosophy
# Platform Support
# Features
# Tips
## Exporting to Git using CRAP
>[!DANGER] May `SEGFAULT` on some modules!
- Install [[Homebrew]]
- Install CVS with Homebrew
- Compiling CVS by hand on a modern system is not ideal, but Homebrew includes all of the needed patches and even provides binaries
- Install [CRAP](https://github.com/rcls/crap)
- Use `crap-clone` to extract each module into its own repo
- Merge [[git|git]] repos
```sh
set -e
# 1. install CVS
brew install cvs
# 2. build CRAP
cd $TEMP_LOCATION
git clone https://github.com/rcls/crap.git
cd crap
./configure
make
# 3. init Git repo
cd $TEMP_LOCATION
mkdir $FIRST_CSV_MODULE_NAME
cd $FIRST_CSV_MODULE_NAME
git init .
# 4. export CVS module
$TEMP_LOCATION/crap/crap-clone $CVS_REPO_LOCATION $FIRST_CSV_MODULE_NAME
git gc --aggressive
# repeat steps 3 and 4 as needed for each module
# 5. create monorepo
cd $TEMP_LOCATION
mkdir $REPO_NAME
cd $REPO_NAME
# 6. add module git repos
git remote add $FIRST_CSV_MODULE_NAME $TEMP_LOCATION/$FIRST_CSV_MODULE_NAME
git fetch $FIRST_CSV_MODULE_NAME --tags
# repeat step 6 as needed for each module repo
# 7. merge branches
git merge --allow-unrelated-histories $FIRST_CSV_MODULE_NAME/$BRANCH_NAME
# repeat step 7 for each branch, as desired
# 8. clean up remotes (optional)
git remote remove $FIRST_CSV_MODULE_NAME
# repeat step 8 as needed for each module repo
```
# Resources
## Utils
- https://www.red-bean.com/cvsutils/
> VS Utilities is a small (at the time of writing) collection of scripts, mostly in the [Perl](http://www.perl.org/) language, that allow you to manage the files in the CVS working directory. You can tell which files are under version control and which are not without even being online. You can erase or move away all derived files in seconds.
- https://web.archive.org/web/20231123004545/https://www.cvsync.org/
- https://github.com/cvsync/cvsync
> CVSync is a portable CVS repository synchronization utility and freely available under the [BSD license](https://web.archive.org/web/20231123004545/https://www.cvsync.org/copyright.html).
## Export
- `cvs2svn` (requires `cvs` installed, local only)
- https://github.com/mhagger/cvs2svn
- Despite the name, it converts also to [[git|git]] and [[Mercurial]] and [[Bazzar - Version Control]]
- CRAP (requires `cvs` installed, local or remote)
- https://github.com/rcls/crap
- `cvs-fast-export`
- http://www.catb.org/~esr/cvs-fast-export/
- https://gitlab.com/esr/cvs-fast-export
- `reposurgeon`
- http://www.catb.org/%7Eesr/reposurgeon/
- https://gitlab.com/esr/reposurgeon
# References
## Migrating to Git
- https://docs.gitlab.com/ee/user/project/import/cvs.html
- https://stackoverflow.com/questions/20869710/migrate-from-cvs-to-git-without-losing-history (`cvs2svn`)
- https://jnidzwetzki.github.io/2022/01/26/cvs-to-git.html (`cvs2svn`)
- https://superuser.com/questions/1451521/how-to-convert-a-cvs-repo-to-git-using-cvs-fast-export (`cvs-fast-export`)
- https://medium.com/moret1979/manually-migrate-from-cvs-to-git-515436e8fbf0 (`git cvsimport`)
- https://sourceforge.net/p/forge/documentation/CVS/ (`cvs2svn`)