comparison tests/test-histedit-arguments.t @ 41146:fbd168455b26 stable

histedit: crashing with a more useful error message on empty defaultrev Before this, `hg --config histedit.defaultrev= histedit` would crash with File "destutil.py", line 385, in desthistedit if revs: UnboundLocalError: local variable 'revs' referenced before assignment Differential Revision: https://phab.mercurial-scm.org/D5543
author rdamazio@google.com
date Wed, 09 Jan 2019 20:00:35 -0800
parents 5abc47d4ca6b
children b6673e9bdcf6
comparison
equal deleted inserted replaced
41128:f467c353298c 41146:fbd168455b26
109 109
110 $ HGEDITOR=cat hg histedit --config "histedit.defaultrev=only(.) - ::eb57da33312f" --commands - << EOF 110 $ HGEDITOR=cat hg histedit --config "histedit.defaultrev=only(.) - ::eb57da33312f" --commands - << EOF
111 > pick c8e68270e35a 3 four 111 > pick c8e68270e35a 3 four
112 > pick 08d98a8350f3 4 five 112 > pick 08d98a8350f3 4 five
113 > EOF 113 > EOF
114
115 Test invalid config default
116 ---------------------------
117
118 $ hg histedit --config "histedit.defaultrev="
119 abort: config option histedit.defaultrev can't be empty
120 [255]
114 121
115 Run on a revision not descendants of the initial parent 122 Run on a revision not descendants of the initial parent
116 -------------------------------------------------------------------- 123 --------------------------------------------------------------------
117 124
118 Test the message shown for inconsistent histedit state, which may be 125 Test the message shown for inconsistent histedit state, which may be