# HG changeset patch # User Navaneeth Suresh # Date 2019-01-10 13:01:46 # Node ID 172296c6db914e08a38442946b4bc2daa50d3589 # Parent 4f675c12d083a23049d75930bb765ed8bd27cd2c tests: add test for warning on histedit with tagged commits This is a follow-up patch to 7b7e081f8954 (D5494). Differential Revision: https://phab.mercurial-scm.org/D5552 diff --git a/tests/test-histedit-edit.t b/tests/test-histedit-edit.t --- a/tests/test-histedit-edit.t +++ b/tests/test-histedit-edit.t @@ -481,3 +481,24 @@ Attempting to fold a change into a publi # f, fold = use commit, but combine it with the one above # r, roll = like fold, but discard this commit's description and date # + + $ cd .. + +warn the user on editing tagged commits + + $ hg init issue4017 + $ cd issue4017 + $ echo > a + $ hg ci -Am 'add a' + adding a + $ hg tag a + $ hg tags + tip 1:bd7ee4f3939b + a 0:a8a82d372bb3 + $ hg histedit + warning: tags associated with the given changeset will be lost after histedit. + do you want to continue (yN)? n + abort: histedit cancelled + + [255] + $ cd ..