git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "John J. Franey" <jjfraney@gmail.com>
To: Mirko Stocker <m1stocke@hsr.ch>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: Working with Git and CVS in a team.
Date: Mon, 16 Jun 2008 12:04:44 -0400	[thread overview]
Message-ID: <1213632284.11517.78.camel@isidore.myhome.westell.com> (raw)
In-Reply-To: <200806132243.36695.m1stocke@hsr.ch>

On Fri, 2008-06-13 at 14:33 +0200, Mirko Stocker wrote:


> Our team works on an existing project that's in CVS, but we don't have
> the permissions to commit directly to it. We still need to make
> changes and want to stay as up to date as possible, so we are trying
> to use git to track the CVS repository and to collaborate inside the
> team.
> 

I'm in a team that is all CVS.  I'm the only one using git.

I can commit to CVS, unlike your situation.

> 
> Now, I'm quite new to git, so I'm not sure if the solution I created
> is "correct", not way too complicated, or if there are problems waiting
> for us.
> 

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.




> 
> 
> What I don't like is how we have to make the upstream patch(es). Is
> there an easy way we can get multiple patches, lets say for each
> commit we made? Or is it easier to make a lots of branches and to
> then create a patch from the diff between the branch and origin/origin?
> 
> 

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

  parent reply	other threads:[~2008-06-16 16:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-13 14:33 Working with Git and CVS in a team Mirko Stocker
2008-06-13 14:50 ` Miklos Vajna
2008-06-13 20:43   ` Mirko Stocker
2008-06-13 20:47     ` Miklos Vajna
2008-06-15 20:20       ` Mirko Stocker
2008-06-15 20:34         ` Miklos Vajna
2008-06-16 16:04     ` John J. Franey [this message]
2008-06-16 16:44       ` Jakub Narebski
2008-06-13 16:09 ` Jeff King
2008-06-13 20:47   ` Mirko Stocker
2008-06-13 20:55     ` Jeff King
2008-06-15 20:22       ` Mirko Stocker
2008-06-15 20:48         ` Jeff King
2008-06-16 13:39           ` Mirko Stocker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1213632284.11517.78.camel@isidore.myhome.westell.com \
    --to=jjfraney@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=m1stocke@hsr.ch \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).