tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: git copies of cvs modules available



On Wed 14 Oct 2009 at 15:06:29 +0200, Holger Weiß wrote:
> * Adam Hoka <adam.hoka%gmail.com@localhost> [2009-10-14 13:47]:
> > On 10/14/09 04:44, Eric Gillespie wrote:
> > >Rhialto<rhialto%falu.nl@localhost>  writes:
> > >>(There has been a very heated discussion among GIT people why keyword
> > >>expansion is supposed to be evil. They are not going to be convinced to
> > >>implement it. I am very annoyed by that.)
> > >
> > >They are evil.  Evil evil evil evil.  EVIL!  No modern system
> > >supports them, nor are they likely, and we're all the better
> > >for it.
> >
> > hg supports it
> 
> These days, Git actually supports the expansion of $Id$ on checkout and
> allows for implementing other stuff yourself, too; see gitattributes(5).

Yes, but the $Id$ that it supports is a hash value which is absolutely
meaningless to a human reader.

Why I want (cvs-like) $Id$ is that I can see at a glance which version a
file is, compare its version with that of another file, that sort of
things, without help from the VCS.  Files seem to have a habit of
"escaping from" the VCS so saying "but you can just look up the hash
value in the VCS" are not very helpful.

(There is some extra functionality with $Format$ if you "export" a tree,
but that requires making another full copy and is therefore even more
expensive.)

The only real reason I have found behind the statement "keyword
expansion is evil" is "it is inefficient". The reasoning behind that is
that if you switch from one branch to another, it may need to change
keywords in files which it doesn't otherwise change. There may be after
all files which are identical in two branches but with a different
history for each. (Not that that sounds too likely, anyway). The
argument then is that it would have to touch every file to get these
cases right.

But the way around that seems to me that it is easy enough to find the
path through the revision graph from the revision on the first branch to
that on the second one.  If a VCS is patch-based you have to do that
anyway but even if not it shouldn't be too expensive. You only have to
re-expand in those files that have edits anywhere on the path.

> Holger
-Olaf.
-- 
___ Olaf 'Rhialto' Seibert    -- You author it, and I'll reader it.
\X/ rhialto/at/xs4all.nl      -- Cetero censeo "authored" delendum esse.


Home | Main Index | Thread Index | Old Index