[darcs-users] tag/untag how to

Juliusz Chroboczek Juliusz.Chroboczek at pps.jussieu.fr
Mon Dec 5 19:08:52 UTC 2005


> Well. This is true if tagging is considered a "patch". Does it really
> has to be so?

No, it doesn't.  Some distributed version control systems distinguish
between a ``public tag'', which works just like a Darcs tag, and a
``private'' or ``lightweight tag'', which works like you'd want tags
to work.

Darcs has ``contexts'', which can be used to implement private tags.
Right now, there's no user interface for private tags, but there's no
reason one shouldn't be designed and implemented (hint, hint).

A context is a data structure that contains the full state of a
repository.  You can create a context with ``darcs changes --context'',
and recreate the repository described by a context using
``darcs get --context''.

A private tag is just a named context.  Create a directory _darcs/tags
in your repo, and do

  darcs changes --context > _darcs/tags/almost-works-20051205

in order to privately tag a version, and

  darcs get /some/where --context some/where/_darcs/tags/almost-works-20051205

in order to recreate a privately tagged version.  Diffing is not
implemented, but there's no reason why it shouldn't.

So how do you propagate a private tag?  Simple enough -- just record
the context in your repo.

Before people start thinking about implementing a user interface for
the above idea, I'd encourage them to think whether or not they are a
specific case of some more general configuration control feature.

                                        Juliusz




More information about the darcs-users mailing list