use hooks in git to import and export to cvs
Asked Answered
C

1

4

i would like to know if this is possible:

  • create a shared git repository that connects to cvs
  • post two hooks to it:
    1. everytime anyone pulls from it, it imports from the cvs repository
    2. everytime anyone pushes to it, it exports to the cvs repository

basically create a 'lazy mirror' of a cvs repository that is completely transparent to the git users

if this is not possible what are the best method to create a cvs mirror?

ps. is git-cvsserver usable? besides the commits, checkouts and updates, can it merge two branches?

Conformity answered 12/5, 2010 at 10:27 Comment(1)
how did this work for you? i want to do exactly this, this weekend.Wilfredwilfreda
C
1

git-cvsserver has limitations:

  • Currently cvsserver works over SSH connections for read/write clients, and over pserver for anonymous CVS access.
  • CVS clients cannot tag, branch or perform GIT merges.
  • git-cvsserver maps GIT branches to CVS modules. This is very different from what most CVS users would expect since in CVS modules usually represent one or more directories.

You can find best practices for using Git with CVS here, with a full git-cvs setup.
You can try and add to this setup a post-receive hook and see if a git cvsexportcommit can work from there.

Casia answered 12/5, 2010 at 11:25 Comment(1)
if it cannot tag, then it is seriously flawed for what i am looking for.. (eclipse cvs tag and merge are the two actions needed besides the basic ones) // that link is the bible for git-cvs interaction, this question comes up as a follow up to see if anyone implemented it as an automated method to keep a git repo synchronize (thanks for the hooks link.. starting point found) // .. or for that mather any other method to have synchronized git and cvs reposConformity

© 2022 - 2024 — McMap. All rights reserved.