[darcs-users] tag/untag how to

Tommy Pettersson ptp at lysator.liu.se
Mon Dec 5 11:46:10 UTC 2005


On Mon, Dec 05, 2005 at 09:03:56AM +0100, Andrei A. Voropaev wrote:
>                                                                 Was the
> "untag" command ever considered?

Propagated unpulls has been debated vividly long ago.  There is
a problem with propagating patch/tag removals.  If I have
applied your tag and made changes and tagged again, I have
patches/tags that depends on that tag.  If you send me an
"untag" I can't apply it (without removing all my depending
tags/patches), and I also can't apply any of your future
patches that depends on the "untag".

This is different from rollback patches that invert previous
patches.  They only operate on the _changes_, which are
subject to conflict handling and merging but keeps all
dependencies intact.

> Even simpler, change functionality of tag, so that it automatically
> keeps only one tag with given name.

Well, two different tags with the same name really are two
different tags.  Pretending they are the same defeats the
purpose of tags since one can no longer use them to identify
a unique version.

>                                                   In this case there'll
> be no need to "unrecord --tags", which is very confusing operation. For a
> long time I was afraid that this will remove all patches associated with
> given tag :)

You can use unpull or obliterate as well.  They all remove
patches from the repo.  Unpull and obliterate also removes
the changes from the working dir, but since there are no
changes in tags it doesn't make any difference.

> BTW, speaking about "unrecord --tags", how can I select which of 2 tags
> with the same name shall be unrecorded?

One way is to do 'darcs unpull' and hit 'n' until the right
tag with the right date appears.  If you have optimized the
repo with 'darcs optimize' unrecord/unpull/&c does not ask
about patches/tags before the last tag, so you must use a
--from-patch or --from-tag option with a patch or tag that
comes before the first tag you want to remove.

There is also an awkward way: 'darcs changes --xml-output'
shows the unique hash names of patches, which can be used
with the --matches option to unpull/unrecord.

It is planned to enumerate patches locally in repos, which
will make it much easier in many more cases to refer to exact
patches in a repo regardless of their names.


-- 
Tommy Pettersson <ptp at lysator.liu.se>




More information about the darcs-users mailing list