##// END OF EJS Templates
histedit: more precise user message when changeset is missing...
Pierre-Yves David -
r19048:1163ff06 default
parent child Browse files
Show More
@@ -718,8 +718,6 b' def verifyrules(rules, repo, ctxs):'
718 parsed = []
718 parsed = []
719 expected = set(str(c) for c in ctxs)
719 expected = set(str(c) for c in ctxs)
720 seen = set()
720 seen = set()
721 if len(rules) != len(expected):
722 raise util.Abort(_('must specify a rule for each changeset once'))
723 for r in rules:
721 for r in rules:
724 if ' ' not in r:
722 if ' ' not in r:
725 raise util.Abort(_('malformed line "%s"') % r)
723 raise util.Abort(_('malformed line "%s"') % r)
@@ -738,6 +736,10 b' def verifyrules(rules, repo, ctxs):'
738 if action not in actiontable:
736 if action not in actiontable:
739 raise util.Abort(_('unknown action "%s"') % action)
737 raise util.Abort(_('unknown action "%s"') % action)
740 parsed.append([action, ha])
738 parsed.append([action, ha])
739 missing = sorted(expected - seen) # sort to stabilize output
740 if missing:
741 raise util.Abort(_('missing rules for changeset %s') % missing[0],
742 hint=_('do you want to use the drop action?'))
741 return parsed
743 return parsed
742
744
743 def processreplacement(repo, replacements):
745 def processreplacement(repo, replacements):
@@ -77,7 +77,8 b' Test that missing revisions are detected'
77 > pick eb57da33312f 2 three
77 > pick eb57da33312f 2 three
78 > pick 08d98a8350f3 4 five
78 > pick 08d98a8350f3 4 five
79 > EOF
79 > EOF
80 abort: must specify a rule for each changeset once
80 abort: missing rules for changeset c8e68270e35a
81 (do you want to use the drop action?)
81 [255]
82 [255]
82
83
83 Test that extra revisions are detected
84 Test that extra revisions are detected
General Comments 0
You need to be logged in to leave comments. Login now