Bug 4017 - Warn when deleting a tagged commit
Summary: Warn when deleting a tagged commit
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: 4.2.1
Hardware: All All
: wish feature
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-12 08:28 UTC by gidyn
Modified: 2019-01-15 00:01 UTC (History)
5 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gidyn 2013-08-12 08:28 UTC
I sometimes lose the target of a tag when editing changesets, but only discover this after pushing. Destructive commands (such as strip and histedit) should warn if the target of tag will be lost, and push should probably sanity check .hgtags as well.
Comment 1 Matt Mackall 2013-08-12 13:16 UTC
Is there an ill effect visible when this happens?
Comment 2 Bugzilla 2015-02-23 01:01 UTC
Bug was inactive for 472 days, archiving
Comment 3 gidyn 2015-02-23 03:10 UTC
Re-opening as still an issue with 3.3. Most commonly encountered with histedit and rebase - .hgtags is not updated to point to the rewritten changesets.

I don't know whether .hgtags should be automatically updated, but history-rewriting commands should at least warn that tags are being lost and offer to update them if not.
Comment 4 Matt Mackall 2015-03-03 15:24 UTC
Bulk change: standard priority for features is 'wish'.
Comment 5 Matt Mackall 2015-04-17 13:28 UTC
Bulk move open feature requests to wish priority.
Comment 6 Bugzilla 2015-10-18 16:24 UTC
Bug was inactive for 184 days, archiving
Comment 7 gidyn 2015-11-12 07:07 UTC
Still an issue with 3.6.

hg init test
cd test
echo >a
hg add a
hg ci -m"a"
hg tag a

hg tags
tip                                1:680ccf7f26aa
a                                  0:f1a268e389f6

hg histedit a
<change something in a>
hg histedit --continue

hg tags
tip                                1:7cb9647fb610

type .hgtags
f1a268e389f6d9de43b29f639ffcd61d1fcd7643 a
Comment 8 Matt Mackall 2015-11-12 14:09 UTC
Ok, adjusting $SUBJECT. Arguably tagged commits should automatically be marked public so they're not subject to editing, but a warning seems reasonable as well.
Comment 9 gidyn 2015-11-17 03:18 UTC
Ideally history rewriting commands would have an option to move tags to the rewritten changeset.
Comment 10 Bugzilla 2016-04-16 00:00 UTC
Bug was inactive for 150 days, archiving
Comment 11 Bugzilla 2017-01-31 00:00 UTC
Bug was inactive for 288 days, archiving
Comment 12 Bugzilla 2017-07-10 00:00 UTC
Bug was inactive for 150 days, archiving
Comment 13 Bugzilla 2017-12-09 00:00 UTC
Bug was inactive for 151 days, archiving
Comment 14 Bugzilla 2018-05-10 00:00 UTC
Bug was inactive for 150 days, archiving
Comment 15 Bugzilla 2018-10-07 00:00 UTC
Bug was inactive for 150 days, archiving
Comment 16 HG Bot 2019-01-07 18:41 UTC
Fixed by https://mercurial-scm.org/repo/hg/rev/86f0ed7ac688
Navaneeth Suresh <navaneeths1998@gmail.com>
histedit: add warning message on editing tagged commits (issue4017)

Differential Revision: https://phab.mercurial-scm.org/D5489

(please test the fix)
Comment 17 Bugzilla 2019-01-15 00:01 UTC
Bug was set to TESTING for 7 days, resolving