[PATCH 1 of 1 RFC] tag: abort if not at a branch head
adrian at cadifra.com
Mon Dec 6 18:31:30 CST 2010
On 2010-12-07 01:14, Matt Mackall wrote:
> On Mon, 2010-12-06 at 13:56 -0600, Kevin Bullock wrote:
>> # HG changeset patch
>> # User Kevin Bullock <kbullock at ringworld.org>
>> # Date 1291665075 21600
>> # Node ID f52e752c6d5f90352bb29ba6c2543656f6e4531e
>> # Parent 8c6b7a5f38c4585b1b2c2ceaffa8023f36a18479
>> tag: abort if not at a branch head
>> Since it's usually only desirable to make tag commits on top of branch
>> heads, abort if the working dir parent is not a branch head. -f/--force
>> may be passed to commit at a non-head anyway.
> I'm hard-pressed to think of any realistic use cases for committing a
> tag at somewhere other than a branch head. Can anyone think of one?
Someone might be used to doing weird things.
Assume you want to start a new feature based on an old revision
(slightly weird, but not completely mad).
$ hg up <old rev>
Then assume that user wants to mark with a tag from where he started to
fork off ("I always forget from where I started my fork work, so I began
to tag it with a name"):
$ hg tag feature-X-base
hack, ci, hack, ci, etc
Certainly not a very elegant usage of Mercurial but Mercurial allowed
that in the past.
More information about the Mercurial-devel