[darcs-users] Re: More on version management...

Graham Klyne gk at ninebynine.org
Mon Mar 22 16:25:10 UTC 2004

At 10:26 22/03/04 -0500, David Roundy wrote:
> > On Mon, Mar 22, 2004 at 01:21:23PM +0000, Keith Wansbrough wrote:
> > > Shae writes:
> > >
> > > > From what I've seen on the mailing list, $Id and friends aren't
> > > > likely, because of the design of darcs.[3].
> > > >
> > > [..]
> > > > 
> [3]http://www.abridgegame.org/pipermail/darcs-users/2004-February/001089.html
> > >
> > > This is fatal - I use $Id$ all the time.  We have some very large
> > > specification documents that we control using CVS, and it is critical
> > > when we read them that we know what version they are.  We do the LaTeX
> > > equivalent of "set header to $Id$", and then all our documents are
> > > versioned.
> > >
> > > Having the version anywhere else but in the document itself would be
> > > wrong, because they could get out of sync.
>Well, it could be that darcs isn't for you.
>By default, darcs doesn't have a name to give any particular version of a
>repository, since the names of changes are associated with the change
>itself rather than the version that results from that change.  Only if you
>run the tag command is a name associated with a version.  It's possible to
>tag after each record (there's not yet any way to automate this, but you
>could create an alias to do so), but then your history will be cluttered
>with an awful lot of tags.  I guess maybe that's not the end of the world.

I find myself agreeing with Keith, but still looking for common 
ground.  Let me see if I can articulate why this may be important.

When working with documents in a collaborative environment (such as 
standards authoring), it is often the case that reviewer comments are made 
against some particular version of a document, and it is really helpful if 
the document revision can be clearly identified in an environment where 
changes may be occurring quite frequently.  CVS $Id: $ does this very well.

This situation involves being able to identify a particular file version 
that has been separated from its repository.

Having briefly read about the Darcs approach, it seems to me that:
- it would be feasible to include an "extra" change in the source file each 
time a change is recorded.
- but such changes would undermine one of darcs goals, by creating 
otherwise unnecessary dependencies between patches.

> > To get around the modification of source files problem in Shae's URL
> > perhaps "darcs flatten foo" or somesuch could be used to explicitly say
> > "I'm taking foo away to print now so please expand $Id$ in it". It could
> > complain if the current repo state isn't tagged (or prompt you for a name
> > to tag it with) or if foo has unrecorded changes.

I don't think that really does it, because I want every working version to 
carry it's current $Id: $ value.  E.g. if the repository is served by HTTP, 
any file grabbed at any time using HTTP should be status-identifiable.

>Then what happens when the user edits the flattened file? We would have to
>parse it.  Yuck.  Then the next thing is that we have to support escaping
>for people who want to include the literal string "$Id" in their files, and
>then escaping of the escape...

Well, CVS must do this (parse the file), but the tagging format is such 
that the parsing isn't exactly heavy lifting.  What CVS doesn't do is 
provide any kind of escape for including $Id: ... $ verbatim in the 
file;  that's never been a problem for me.


Graham Klyne
For email:

More information about the darcs-users mailing list