* git-cvsexportcommit keyword mismatch issue
@ 2008-07-16 9:09 Barak A. Pearlmutter
2008-07-16 10:31 ` Johannes Schindelin
2008-07-16 23:16 ` Lars Noschinski
0 siblings, 2 replies; 3+ messages in thread
From: Barak A. Pearlmutter @ 2008-07-16 9:09 UTC (permalink / raw)
To: git
I used git-cvsimport -k to create my own git repo to deal with a
project that uses CVS. I push my mods upstream using
git-cvsexportcommit. This works fine *unless* there is a keyword
mismatch, i.e., some file in git has $Id: foo$ while in CVS keyword
expansion somehow changed it to $Id: bar$. In that case
git-cvsexportcommit barfs with a patch failure.
When that happens I use git-format-patch to generate a patch file and
integrate it manually. BLECH! This also confuses git-cvsimport when
I try to pull upstream changes, so I end up manually resolving the
keyword conflict again at that point, i.e., twice.
Simply avoiding expanded keywords should solve the problem. I thought
git-cvsimport -k would keep them out of my git repo, but no such luck.
Even when I use "cvs checkout -kk" for the CVS sandbox and then
"git-cvsimport -k", keywords were *still* expanded in my git repo.
(This is with both git 1.4.4.4 and git 1.5.6.) Either the -k switch
to git-cvsimport is busted, or I'm doing something wrong. In any case
even if this approached worked it would introduce a host of new
issues, since others on the project *are* using keyword expansion, and
the build process relies upon them.
One solution that occurs to me would be for git-cvsexportcommit to do
the dirty work of ignoring keyword mismatches for files that do not
have keywords disabled in CVS. It seems like it is in the best
position to solve the problem---everything else is hacking around to
avoid it instead of actually solving it, which gets brittle. So what
I'm hoping is that this lengthy discourse of mine will convince
someone to add code to git-cvsexportcommit that causes the patch
creation and application stuff inside it to ignore keyword expansion
mismatches (on files which do not have -kb on in CVS), perhaps by
simply contracting keywords on all files/patches from both CVS/git at
an early stage.
The same hack could be used in git-cvsimport to avoid the same problem
in the other direction, albeit with a little more work since keywords
that were not unexpanded in the git files would need to be re-expanded
in git to avoid gratuitous keyword-value-change patches.
Or perhaps I'm missing some other solution...?
--
Barak A. Pearlmutter
Hamilton Institute & Dept Comp Sci, NUI Maynooth, Co. Kildare, Ireland
http://www.bcl.hamilton.ie/~barak/
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-cvsexportcommit keyword mismatch issue
2008-07-16 9:09 git-cvsexportcommit keyword mismatch issue Barak A. Pearlmutter
@ 2008-07-16 10:31 ` Johannes Schindelin
2008-07-16 23:16 ` Lars Noschinski
1 sibling, 0 replies; 3+ messages in thread
From: Johannes Schindelin @ 2008-07-16 10:31 UTC (permalink / raw)
To: Barak A. Pearlmutter; +Cc: git
Hi,
On Wed, 16 Jul 2008, Barak A. Pearlmutter wrote:
> So what I'm hoping is that this lengthy discourse of mine will convince
> someone to add code to git-cvsexportcommit that causes the patch
> creation and application stuff inside it to ignore keyword expansion
> mismatches (on files which do not have -kb on in CVS), perhaps by simply
> contracting keywords on all files/patches from both CVS/git at an early
> stage.
I doubt that this is going to happen. Obviously, it has been nonbody's
itch _enough_ to scratch it.
I see your problem, but unless you start hacking, I do not see it being
solved anytime soon.
Ciao,
Dscho
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: git-cvsexportcommit keyword mismatch issue
2008-07-16 9:09 git-cvsexportcommit keyword mismatch issue Barak A. Pearlmutter
2008-07-16 10:31 ` Johannes Schindelin
@ 2008-07-16 23:16 ` Lars Noschinski
1 sibling, 0 replies; 3+ messages in thread
From: Lars Noschinski @ 2008-07-16 23:16 UTC (permalink / raw)
To: git
* Barak A. Pearlmutter <barak@cs.nuim.ie> [08-07-16 11:09]:
>Simply avoiding expanded keywords should solve the problem. I thought
>git-cvsimport -k would keep them out of my git repo, but no such luck.
>Even when I use "cvs checkout -kk" for the CVS sandbox and then
>"git-cvsimport -k", keywords were *still* expanded in my git repo.
>(This is with both git 1.4.4.4 and git 1.5.6.) Either the -k switch
>to git-cvsimport is busted, or I'm doing something wrong.
git-cvsimport -k works for me as of version 1.5.5.2 and 1.5.6.2.
In my opinion, git-cvsexportcommit misses an option -k to do cvs update
with -kk (as -kk is sticky for already checked out files, but not for
the whole repository, so new files will not get -kk set). If I cannot
get rid of this cvs repository soon, I'll probably cook up a patch for
it.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-17 0:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-16 9:09 git-cvsexportcommit keyword mismatch issue Barak A. Pearlmutter
2008-07-16 10:31 ` Johannes Schindelin
2008-07-16 23:16 ` Lars Noschinski
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).