[PATCH topic-ext] topics: allow commits that only change topic (issue4725)

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Jun 16 12:56:52 CDT 2015



On 06/16/2015 10:41 AM, Matt Mackall wrote:
> On Tue, 2015-06-16 at 10:12 -0700, Pierre-Yves David wrote:
>>
>> On 06/15/2015 03:30 PM, Matt Mackall wrote:
>>> # HG changeset patch
>>> # User Matt Mackall <mpm at selenic.com>
>>> # Date 1434407347 18000
>>> #      Mon Jun 15 17:29:07 2015 -0500
>>> # Node ID d038b92c51d91c99b50fd17c829e22212de051bb
>>> # Parent  ca2b4e5329fe018fc1279694cc89f74a7d6f4ccd
>>> topics: allow commits that only change topic (issue4725)
>>>
>>> This allows amend to change topics. It also matches the behavior of branches.
>>
>> I do want the amend feature, but I'm not sure if allowing it for plain
>> commit make sense. Matching the behavior for named branches do not make
>> so much sense as this could result in plain empty commit when they
>> become public.
>
> Perhaps we can require that the commit already has a topic set (and is
> thus non-empty for other reasons).

I'm comfused by your answer. Here is what I'm offering


hg amend --topic foo → ok in all cases
hg topic foo; hg amend → ok il all cases
hg commit --amend --topic foo → ok in all cases
hg topic foo; hg commit --amend → ok il all cases

hg up -C .; hg commit --topic foo → fails commit is empty
hg up  -C . ; hg topic foo; hg commit → fails commit is empty

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list