* interaction between cvsimport and cvsexportcommit
@ 2007-06-08 13:42 picca
2007-06-08 15:11 ` Robin Rosenberg
0 siblings, 1 reply; 2+ messages in thread
From: picca @ 2007-06-08 13:42 UTC (permalink / raw)
To: git
Hello
In the institut where I am working www.synchrotron-soleil.fr, the
"computing department" use CVS for all their projects. As I am not from
this department (I am a scientist), I can use my own tools and git is
one of them.
Nevertheless I need to interact with them (I am writting a C++
library to control diffractometers) so I use cvsimport and
cvsexportcommit.
The point is that I find this over complicate compare to my git
day-to-day experience.
I do not understand why cvsimport and cvsexportcommit do not
interact nicelly to ease git <-> cvs.
For example as a neeby I expect this to work out of the box
after the first cvsimport
git cvsimport
do some work
git commit -a
git cvsexportcommit
and that's all
Instead of this we have this:
$ export GIT_DIR=~/project/.git
$ cd ~/project_cvs_checkout
$ git-cvsexportcommit -v <commit-sha1>
$ cvs commit -F .mgs <files>
or even worse
$ export GIT_DIR=~/project/.git
$ cd ~/project_cvs_checkout
$ git-cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1
git-cvsexportcommit -c -p -v
what is missing in cvsexportcommit and cvsimport to lower the git <->
cvs barrier.
Thank you.
Frederic
PS: Sorry for my poor english.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: interaction between cvsimport and cvsexportcommit
2007-06-08 13:42 interaction between cvsimport and cvsexportcommit picca
@ 2007-06-08 15:11 ` Robin Rosenberg
0 siblings, 0 replies; 2+ messages in thread
From: Robin Rosenberg @ 2007-06-08 15:11 UTC (permalink / raw)
To: picca; +Cc: git
fredag 08 juni 2007 skrev picca:
> Hello
>
> In the institut where I am working www.synchrotron-soleil.fr, the
> "computing department" use CVS for all their projects. As I am not from
> this department (I am a scientist), I can use my own tools and git is
> one of them.
> Nevertheless I need to interact with them (I am writting a C++
> library to control diffractometers) so I use cvsimport and
> cvsexportcommit.
>
> The point is that I find this over complicate compare to my git
> day-to-day experience.
>
> I do not understand why cvsimport and cvsexportcommit do not
> interact nicelly to ease git <-> cvs.
git-cvsexportcommit was written (I assume, since I did not actually write the
original version) to solve a problem and not to be a perfect solution.
Later I found it didn't do what I needed so I made improvements (to solve /my/
problems, mainly in reliability and completeness (binaries, add remove, all
or nothing). The rest was just inconvenience and I did not consider my
solution to that universally viable so I didn't include it in in
cvsexportcommit.
> For example as a neeby I expect this to work out of the box
> after the first cvsimport
>
> git cvsimport
> do some work
> git commit -a
> git cvsexportcommit
This assume you really want to export all. I don't, but I agree that it should
in principle be this simple. Patches anyone?
> and that's all
>
> Instead of this we have this:
>
> $ export GIT_DIR=~/project/.git
> $ cd ~/project_cvs_checkout
> $ git-cvsexportcommit -v <commit-sha1>
> $ cvs commit -F .mgs <files>
>
> or even worse
>
> $ export GIT_DIR=~/project/.git
> $ cd ~/project_cvs_checkout
> $ git-cherry cvshead myhead | sed -n 's/^+ //p' | xargs -l1
> git-cvsexportcommit -c -p -v
>
> what is missing in cvsexportcommit and cvsimport to lower the git <->
> cvs barrier.
Here is my script that I use to export. It takes as arguments a number of
commits or stgit patches. Note that hardcoded path to the CVS checkout...
Here's an exercise to the reader: Modify git-cvsexportcommit so it takes the
path to the CVS checkout from 1) a parameter (e.g. -w /checkout) or 2) a git
config variable. That will get get us a small step closer. It will be fairly
easy.
Cheers
-- robin
--------------------------8<-------------------------
#!/bin/bash -ex
if [ "$1" = "-p" ]
then
P="-p $2"
shift 2
fi
export GIT_DIR=$(git-rev-parse --git-dir)
GIT_DIR=$(cd $GIT_DIR;pwd)
cd ../Iris.CVSsynconly
for patch in "$@"
do
if commit=$(git-rev-parse $patch 2>/dev/null); then
git-cvsexportcommit-u $(echo $P) -c $commit
else
head=$(git-symbolic-ref HEAD)
br=${head#refs/heads/}
if commit=$(git-rev-parse refs/patches/$br/$patch); then
git-cvsexportcommit -u $(echo $P) -c $commit
fi
fi
done
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-08 15:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-08 13:42 interaction between cvsimport and cvsexportcommit picca
2007-06-08 15:11 ` Robin Rosenberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).