##// END OF EJS Templates
histedit: have dropmissing abort on empty plan...
Mateusz Kwapich -
r28519:518a5030 default
parent child Browse files
Show More
@@ -1379,6 +1379,10 b' def verifyactions(actions, state, ctxs):'
1379 missing = sorted(expected - seen) # sort to stabilize output
1379 missing = sorted(expected - seen) # sort to stabilize output
1380
1380
1381 if state.repo.ui.configbool('histedit', 'dropmissing'):
1381 if state.repo.ui.configbool('histedit', 'dropmissing'):
1382 if len(actions) == 0:
1383 raise error.ParseError(_('no rules provided'),
1384 hint=_('use strip extension to remove commits'))
1385
1382 drops = [drop(state, node.bin(n)) for n in missing]
1386 drops = [drop(state, node.bin(n)) for n in missing]
1383 # put the in the beginning so they execute immediately and
1387 # put the in the beginning so they execute immediately and
1384 # don't show in the edit-plan in the future
1388 # don't show in the edit-plan in the future
@@ -153,6 +153,10 b' Drop the last changeset'
153 hg: parse error: missing rules for changeset a4f7421b80f7
153 hg: parse error: missing rules for changeset a4f7421b80f7
154 (use "drop a4f7421b80f7" to discard, see also: "hg help -e histedit.config")
154 (use "drop a4f7421b80f7" to discard, see also: "hg help -e histedit.config")
155 $ hg --config histedit.dropmissing=True histedit cb9a9f314b8b --commands - 2>&1 << EOF | fixbundle
155 $ hg --config histedit.dropmissing=True histedit cb9a9f314b8b --commands - 2>&1 << EOF | fixbundle
156 > EOF
157 hg: parse error: no rules provided
158 (use strip extension to remove commits)
159 $ hg --config histedit.dropmissing=True histedit cb9a9f314b8b --commands - 2>&1 << EOF | fixbundle
156 > pick cb9a9f314b8b a
160 > pick cb9a9f314b8b a
157 > pick ee283cb5f2d5 e
161 > pick ee283cb5f2d5 e
158 > EOF
162 > EOF
General Comments 0
You need to be logged in to leave comments. Login now