git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yann Dirson <ydirson@altern.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Jim Meyering <jim@meyering.net>,
	Git Mailing List <git@vger.kernel.org>,
	Matthias Urlichs <smurf@smurf.noris.de>,
	Pavel Roskin <proski@gnu.org>
Subject: Re: git-cvsimport doesn't quite work, wrt branches
Date: Tue, 13 Jun 2006 23:13:44 +0200	[thread overview]
Message-ID: <20060613211344.GC7766@nowhere.earth> (raw)
In-Reply-To: <Pine.LNX.4.64.0606131008470.5498@g5.osdl.org>

On Tue, Jun 13, 2006 at 10:20:10AM -0700, Linus Torvalds wrote:
> Sadly, it also seems to be one that isn't fixed by the patches _I_ have, 
> and looking at Yann's set of patches, I don't think they fix it either.

I don't think so either.


> So CVSps basically tells git-cvsimport that commit 2 (on branch B) is 
> based on commit 1, and doesn't say that "on-trunk" has gone away, so the 
> resulting git repository has branch B containing "on-trunk" version 1.1, 
> and "on-br" version 1.1.2.1.
> 
> CVS branches obviously sometimes confuse CVSps. Sadly, they also confuse 
> _me_, so I don't see how to fix this particular CVSps bug, because I'm as 
> confused as CVSps is ;)
>
> We'd need to have CVSps tell git that the "on-trunk" file was never added 
> to branch B: the simplest way to do that would be to say that it has 
> become (DEAD) in PatchSet 2 (which is not technically true in CVS terms, 
> but _is_ technically true on git terms - on branch B, that file is 
> obviously dead).
> 
> Yann? Pavel? Anybody? Ideas?

This is exactly the problem I encountered one week ago with one my old
cvs repos, where I had created a branch only for a part of a source
hierarchy :)

One thing that amused me, is that in that case cvsps was DWIM enough
that the result was indeed what I expected from the conversion (I had
forgotten about the particular way that branch was created 3 years
ago).  I only discovered the problem when tailor's cvs backend
generated deletions when starting my branch.

So basically, because of how awkward cvs branches are, cvsps may
indeed do what many users expect here, because branches in cvs repos
are sometimes created in strange ways, (in my case, to avoid having to
merge changes in unrelevant areas of the tree - nowadays, I'd just use
stgit to isolate changes).

I don't know what was the particular thing in coreutils developement
that led to branching only some files.  In my case, it can be seen as
the cvs idiom for "branching a part of the tree" - something I don't
think there is a need to have a special idiom in GIT for.


If we want cvsps to output the exact history derived from cvs
(ie. what Jim expected, and I think it is reasonable), I fear it would
require substential modification to cvsps.  I should check, but I
don't think it currently keeps track of which files are part of the
tree resulting from a changeset, but only of the files actually touhed
by the changeset.  So the change would probably have a big ram
usage impact, if we store the file refs in each changeset.


That reminds me of another funny cs behaviour I noticed a couple of
months ago (not sure if it was in 1.11.x or 1.12.x): "cvs import" was
not marking files as dead on the vendor branch when it disappeared
from one upstream version to another, it was just not tagged in the
new version.  I guess cvsps would have a hard time figuring out what
happenned, and would just mark the taks as invalid.


For this type of cvsps issues and cvs tags in general, my latest idea
would be to add "fake" patchsets on which to apply tags and
branchpoints.  The ideal way would seem to make those similar to git's
merge commits, having as parents all patchsets the tag takes revision
from (obviously it's so biased towards the git model it would be a
pleasure to add support for this in git-cvsimport :) - but that would
produce patchsets not fitting well into the current cvsps model, so
that may require more thinking.

Anyway, it should provide a way to make sense out of what cvsps
currently considers to be "invalid" tags.

Best regards,
-- 
Yann Dirson    <ydirson@altern.org> |
Debian-related: <dirson@debian.org> |   Support Debian GNU/Linux:
                                    |  Freedom, Power, Stability, Gratis
     http://ydirson.free.fr/        | Check <http://www.debian.org/>

      parent reply	other threads:[~2006-06-13 21:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-13 16:41 git-cvsimport doesn't quite work, wrt branches Jim Meyering
2006-06-13 17:06 ` Jakub Narebski
2006-06-13 17:20 ` Linus Torvalds
2006-06-13 18:46   ` Keith Packard
2006-06-13 22:55     ` Martin Langhoff
2006-06-13 23:30       ` Keith Packard
2006-06-14  1:56         ` Martin Langhoff
2006-06-14  9:37       ` sf
2006-06-15  7:18     ` Yann Dirson
2006-06-13 21:13   ` Yann Dirson [this message]

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

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

  git send-email \
    --in-reply-to=20060613211344.GC7766@nowhere.earth \
    --to=ydirson@altern.org \
    --cc=git@vger.kernel.org \
    --cc=jim@meyering.net \
    --cc=proski@gnu.org \
    --cc=smurf@smurf.noris.de \
    --cc=torvalds@osdl.org \
    /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.
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).