On Fri, 2008-06-13 at 14:33 +0200, Mirko Stocker wrote:
I'm in a team that is all CVS. I'm the only one using git.
I can commit to CVS, unlike your situation.
I don't think there is a 'wrong' way. 'Whatever works' is the motto.
The configuration should match the workflow. So, I don't have any
comment on yours. I thought I'd share mine, in case there is value. I
think I will learn something
My setup is:
+----------+
| cvs repo |
+----------+
|
| (1)
|
+----------+
| /cvs_git |
+----------+
|
| (2)
\|/
+---------------------+ (5) +--------------------+
| john's private repo |-------->| john's public repo |
+---------------------+ +--------------------+
|
| (3)
\|/
+--------------------+
| john's cvs sandbox |
+--------------------+
|
\|/ (4)
+----------+
| cvs repo |
+----------+
(1) git-cvsimport -i ...
Runs in cron every 30 minutes.
The output git repo is on a shared server. git users (me) can clone/fetch/pull.
The git repo for cvs is purely one way: no commits are to be pushed to
this repo. All content comes from the cvs repo.
This is importing ALL branches from CVS because it git users (me)
require access to all cvs branches.
(2) git clone -o cvs
Using -o, my private repo uses 'cvs' as the name of the git remote that
tracks cvs. This lets me do 'git fetch cvs', which feels right.
And, to create a branch from the cvs head branch:
'git checkout -b br cvs/origin'
(3) git cvsexportcommit
(4) cvs commit
These close the loop: my changes are committed to cvs repo.
Alternatively, the loop can be closed by emailing patch files to a cvs
committer.
(5) git push public
'public' is the name of my public repo. The commits I push to public
are for developers that are using git (currently zero) who want to see
my work before it gets to cvs' head (which is under high contention).
I expect my team members to push to their one public repo. Then I can
do: 'git fetch alice' to get Alice's work.
At the end of all this, when I do a 'git branch -r' I will see something like:
cvs/br1
cvs/br2
alice/br4
alice/br5
bob/br6
bob/br7
Thus making obvious which branch originates from which developer or from cvs.
In this configuration, the 'merge-dude' is simply another user with a
private and public repo.
Issue with being the git user in a team of cvs users:
git makes merges easier and more robust. I don't want to use cvs anymore.
My main problem is sharing my changes to cvs users. cvs head is under
contention and protection, so I can't simply commit all my changes to
cvs head. Our cvs strategy is to create a branch for each developer or
topic. If I create a branch in cvs repo for my git commits, I'd also
want to keep that cvs branch upto date wrt cvs head. I haven't sorted
out how to do that easily with the git tools.
I don't know enough. I'd try it both ways to see which works for you.
Doesn't git easily create a patch file in either case? (This is the
part I'm not sure of.)
Regards,
John
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html