[darcs-users] tag name listing
droundy at abridgegame.org
Wed Jan 28 12:00:12 UTC 2004
On Sun, Jan 04, 2004 at 01:44:26PM +0100, Matias Hermanrud Fjeld wrote:
> On Tue, Dec 23, 2003 at 10:38:43AM -0500, David Roundy wrote:
> > On Mon, Dec 22, 2003 at 06:26:19PM +0100, Matias Hermanrud Fjeld wrote:
> > > How do i print the current tag name of a repository?
> > I suspect you may have a misunderstanding of what a tag is in darcs... I'm
> > not sure what you mean by the "current" tag name of the repository. In
> > darcs, a tag is just a name given to a particular version of the tree, so
> > there's no reason that the current version should correspond to a tag.
> I'm sorry. I misunderstood tag and patch. What I mean is; how do i print the
> current patch name. By "current", i mean the last recorded/applied. My
> understanding of "patch name" is that it is similar to RCS's revision
> number, except that it can be any string.
Well, the best I can think of would be to use darcs changes and parse the
machine readable output. The following will work as long as your patch
name is less than 10,000 characters:
$ darcs changes --machine-readable | head -1 | cut -b 2-10000
treat non-directories as files in recursive rm.
> Or am I totally misunderstanding Darcs? Can one apply first a patch,
> then another patch from earlier on.
Yes, patches can be taken out of order, so the "current" patch name doesn't
really describe the current version in a global manner. Within a given
repository there is, however, a one-to-one correspondence between patch
names and versions... but that correspondence can change. If you want to
really identify a version, you need a tag, but of course there's no reason
to believe that the current version corresponds to any tag.
> I have never really used any revision control system, and my only
> experience is from playing with RCS. RCS implements automatic string
> substitution in files (for example, $Revision$ explands to $Revision:
> x.x.x$). Is there any way to achieve something similar in Darcs? For
> example, when I do 'darcs dist', can I have Darcs automatically replace
> "VERSION" (or any other token) with the current patch name in all files
> of the repository?
> I guess the way to do this would be to apply a set of scripts to a copy
> of the recorded edition of the tree, before it is made into a tarball.
I think I explained this in a different email... you can use the "predist"
prefs option to do this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 232 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20040128/2237fd85/attachment.pgp
More information about the darcs-users