2 bugs in tag removal

Osku Salerma osku at iki.fi
Sat Dec 8 00:38:26 CST 2007


On Sat, 8 Dec 2007, Matt Mackall wrote:

> On Sat, Dec 08, 2007 at 02:28:51PM +0900, Osku Salerma wrote:

>> # mirror image of the above, this time the tag-deletion is written to
>> # .hg/localtags even though it has no tag "globaltag"
>> hg tag --remove -l globaltag
>
> That actually 'works'. We've locally 'hidden' the global tag. I'm
> tempted to say that that's useful behavior. Hiding a local tag by
> checking in a global one though: not so much.

Could you give a scenario where you think locally hiding a global tag is
useful? I'm having a hard time coming up with one.

>> The offending code in commands.py:
>>
>>      if opts['remove']:
>>          if not name in repo.tags():
>>              raise util.Abort(_('tag %s does not exist') % name)
>>
>> I took a look at fixing this, but it would require being able to
>> distinguish between local/global tags after they have been combined into
>> the tagscache, or alternatively keeping two separate caches and adding
>> getlocaltags and getglobaltags functions.
>>
>> If you let me know which of the above approaches you'd prefer to fixing
>> this, or some alternative way you come up with, I can implement it.
>
> How about a parallel dict that tracks the source of each tag?

I'll try implementing that.

--
Osku Salerma


More information about the Mercurial-devel mailing list