##// END OF EJS Templates
histedit: add warning message on editing tagged commits (issue4017)...
Navaneeth Suresh -
r41136:86f0ed7a default
parent child Browse files
Show More
@@ -194,6 +194,7 b' except ImportError:'
194 import functools
194 import functools
195 import os
195 import os
196 import struct
196 import struct
197 import time
197
198
198 from mercurial.i18n import _
199 from mercurial.i18n import _
199 from mercurial import (
200 from mercurial import (
@@ -1692,6 +1693,18 b' def _histedit(ui, repo, state, *freeargs'
1692
1693
1693 _validateargs(ui, repo, state, freeargs, opts, goal, rules, revs)
1694 _validateargs(ui, repo, state, freeargs, opts, goal, rules, revs)
1694
1695
1696 hastags = False
1697 if revs:
1698 revs = scmutil.revrange(repo, revs)
1699 ctxs = [repo[rev] for rev in revs]
1700 for ctx in ctxs:
1701 tags = [tag for tag in ctx.tags() if tag != 'tip']
1702 if not hastags:
1703 hastags = len(tags)
1704 if hastags:
1705 ui.warn(_('warning: tags associated with the given changeset '
1706 'will be lost after histedit \n'))
1707 time.sleep(1)
1695 # rebuild state
1708 # rebuild state
1696 if goal == goalcontinue:
1709 if goal == goalcontinue:
1697 state.read()
1710 state.read()
General Comments 0
You need to be logged in to leave comments. Login now