[darcs-users] How to 'move a tag'.

Tommy Pettersson ptp at lysator.liu.se
Thu Jan 13 16:28:33 UTC 2005


On Wed, Jan 12, 2005 at 09:52:35PM +0100, Thomas Zander wrote:
> darcs?  I tried duplicating this but failed.  A new patch can not be placed
> _before_ an existing tag and removing an existing tag to recreate later is
> also not possible in darcs (unpulling not being an option here).

I may have misunderstood the problem, but replacing a tag
can be done with darcs.

A tag is simply a listing of patches that belong to that
tag, so you can tag any set of patches you like, at any time
you like.

In this case you can make a branch with 'darcs get --tag foo'
to get the patches of the unfixed foo release.  Than pull
in the fix patches and make a new tag.  Finally push back
the new tag to the main branch.  The new tag will depend on
exactly the patches tagged by foo plus the extra fix patches.

It can even be given the same name as the old patch, but
I'm not sure it's a good idea to have two patches with the
same name.  I have tried this, and it's sometimes confusing.

If you want to replace the old tag, you must unpull it from
the tmp repo _before_ you create the new tag there, so the new
tag won't depend on the old one.  Than it is possible to unpull
the old tag from all repos and replace it with the new one.

A different approach may be to use names with patterns for
tags to implement "branch tags".  If the tag is named foo,
than new tags can be named foo-fix1, foo-fix2 and so on.
Than the "branch" can be retrieved using darcs patch name
pattern matching with 'darcs get --tag '^foo(-fix[0-9]*)?$'
that will get the latest tag matching the pattern.  This is why
I tried to have several tags with the same name, a lazy way to
"move" a tag since I only would get the latest, but in some
situations (for example when cherrypicking bits of a repo)
it's been very confusing.


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




More information about the darcs-users mailing list