Tags and rollback

Martin Geisler mg at aragost.com
Mon Oct 18 12:02:54 UTC 2010


Dirkjan Ochtman <dirkjan at ochtman.nl> writes:

> On Mon, Oct 18, 2010 at 11:35,  <cwr at netcom.co.uk> wrote:
>> I've found that hg tag ... ; hg rollback removes the tag commit message
>> but not the tag.  I can't decide if this is a bug or a feature; certainly
>> I doubt it on the grounds of "unwarranted chummines with the implemtation",
>> but it does make the logs neater.  Is it likely to be changed any time soon?
>
> I've run into this, too... The behavior is certainly consistent with
> other uses of hg rollback.
>
> Consider that you'd have some kind of tags surgery by manually
> operating on .hgtags. You commit your changes. You decide that your
> commit message sucked, so you rollback. Now you probably want the
> .hgtags changes to remain in there, right?
>
> So: we'd have to have a way to distinguish the type of commit, which
> seems like too much of a pain considering the limited benefit...

Perhaps we could store this information in the undo file where we
already store the description of what will be rolled back: so store
'commit' when the user did 'hg commit' (with or without manually editing
.hgtags) and store 'tag+commit' when the user did 'hg tag'.

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/mercurial/



More information about the Mercurial mailing list