[PATCH 1 of 2 V4] tag: test tagging an empty repo

Adrian Buehlmann adrian at cadifra.com
Wed Dec 15 01:57:14 CST 2010


On 2010-12-15 08:14, Kevin Bullock wrote:
> On 14 Dec 2010, at 4:39 PM, Matt Mackall wrote:
> 
>> On Tue, 2010-12-14 at 11:49 -0600, Kevin Bullock wrote:
>>> # HG changeset patch
>>> # User Kevin Bullock <kbullock at ringworld.org>
>>> # Date 1292309690 21600
>>> # Node ID 59950753e03c594e3781842bd20b29a4ba13385a
>>> # Parent  d089bbb33cb93fcef524d3ed545901961b1bd008
>>> tag: test tagging an empty repo
>>
>> This test is too small to be on its own:
>>
>>> diff --git a/tests/test-tag-empty.t b/tests/test-tag-empty.t
>>> new file mode 100644
>>> --- /dev/null
>>> +++ b/tests/test-tag-empty.t
>>> @@ -0,0 +1,6 @@
>>> +tagging empty repo
>>> +
>>> +  $ hg init repo-tag-empty
>>> +  $ cd repo-tag-empty
>>> +  $ hg tag nullrev
>>> +  $ cd ..
>>
>> Instead I folded the following into your next patch:
>>
>> diff -r 8fb791b7d239 tests/test-tag.t
>> --- a/tests/test-tag.t	Mon Dec 06 22:04:10 2010 -0600
>> +++ b/tests/test-tag.t	Tue Dec 14 16:39:04 2010 -0600
>> @@ -240,6 +240,9 @@
>>   abort: not at a branch head (use -f to force)
>>   [255]
>>
>> +  $ hg init empty
>> +  $ hg tag -R empty nullrev
>> +
>>   $ cd ..
>>
>> tagging on an uncommitted merge (issue2542)
> 
> 
> Perfectly sensible to me, thanks. I split it out on Adrian's advice, but it would appear you and he have quite different opinions on writing test cases.

Kevin, your patch

   tag: abort if not at a branch head (issue2552)

is now in main *stable*, which is a new aspect (which is not what has
been proposed).

(BTW, that means it is now required to use -f in those cases and this
behavior change is introduced on the stable branch.)

New aspect here: Matt wants to keep churn low on stable.

Your patch "tag: test tagging an empty repo" is clearly an independent
change:
http://mercurial.selenic.com/wiki/ContributingChanges#Organizing_patches


More information about the Mercurial-devel mailing list