git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: synchronizing incremental git changes to cvs

From
Jim Meyering <jim@meyering.net>
Date
May 21, 2006, 21:31 UTC
Message-ID
<87irnzhxo2.fsf@rho.meyering.net>
In-Reply-To
<7v3bf3jl15.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote:
Show 13 quoted lines
> Jim Meyering <jim@meyering.net> writes:
>> I'd like to develop using git, and have a commit hook mirror the
>> day-to-day changes (tags/commits) made in the git repo to a
>> cvs repository.  The idea is that the only way changes get into
>> the cvs repo is via the git commit hook.
>
> I do not use the automated tools myself, but I sync the day-job
> work in my git repository to CVS at work.  I do not develop with
> CVS but use it merely as a publishing medium.  Although other
> people can make commits into CVS in which case I have to slurp
> the change back into my git repository.
>
>  (0) Bootstrap.  I did use git-cvsimport myself (this repository
...
>  (1) Beginning of the day.  In case other people did work on
...

Thank you for describing the process you use. However, since I don't have to allow independent cvs commits, I hope to bend git-cvsexportcommit to my needs. It already does almost everything I want.

Show 5 quoted lines
> using git-cvsimport), as I do not offhand know how exportcommit
> works.  The commits on the git side you would want to push back
> are the ones on "master" but not on "origin", which you can get
> from "git rev-list origin..master", so I presume if you feed
> that to exportcommit things all magically work?

I haven't yet tried to restrict the mirroring to commits on a specific git branch. So far, in the toy example I'm using to test things, I have this in .git/hooks/post-commit:

#!/bin/sh
sha1_id=$(git-rev-parse --verify HEAD)
cvsdir=/var/tmp/work-c
cd $cvsdir && GIT_DIR=/var/tmp/git-experiment/work-g/.git \
    git-cvsexportcommit -v -c -p $sha1_id

I'll clean up and post the changes I've made to git-cvsexportcommit this week.

> By the way, I met Paul a few days ago and he mentioned that you
> have some quick audit results on our code from your evaluation.
> Can we expect fixes or at least pointing-out-problems from you
> sometime soon please?
I'll send one report separately.
Previous: Junio C HamanoNext: Jim Meyering
Message 9 of 20 in “synchronizing incremental git changes to cvs”
  1. Jim MeyeringMay 20, 2006
  2. Johannes SchindelinMay 20, 2006
  3. Jim MeyeringMay 21, 2006
  4. Pavel RoskinMay 22, 2006
  5. Jakub NarebskiMay 22, 2006
  6. Martin LanghoffMay 21, 2006
  7. Jim MeyeringMay 21, 2006
  8. Junio C HamanoMay 21, 2006
  9. Jim MeyeringMay 21, 2006
  10. don't accept bogus N in `HEAD~N'Jim Meyering, May 21, 2006
  11. Jakub NarebskiMay 21, 2006
  12. Jim MeyeringMay 22, 2006
  13. Junio C HamanoMay 22, 2006
  14. Junio C HamanoMay 22, 2006
  15. avoid atoi, when possible; int overflow -> heap corruptionJim Meyering, May 22, 2006
  16. Morten WelinderMay 22, 2006
  17. Jim MeyeringMay 22, 2006
  18. Jeff KingMay 22, 2006
  19. Morten WelinderMay 22, 2006
  20. detect write failure, even for stdoutJim Meyering, May 22, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.