equal
deleted
inserted
replaced
220 |
220 |
221 $ cat > editor.sh << '__EOF__' |
221 $ cat > editor.sh << '__EOF__' |
222 > echo "custom tag message" > "$1" |
222 > echo "custom tag message" > "$1" |
223 > echo "second line" >> "$1" |
223 > echo "second line" >> "$1" |
224 > __EOF__ |
224 > __EOF__ |
|
225 |
|
226 at first, test saving last-message.txt |
|
227 |
|
228 $ cat > .hg/hgrc << '__EOF__' |
|
229 > [hooks] |
|
230 > pretag.test-saving-lastmessage = false |
|
231 > __EOF__ |
|
232 $ rm -f .hg/last-message.txt |
|
233 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e |
|
234 abort: pretag.test-saving-lastmessage hook exited with status 1 |
|
235 [255] |
|
236 $ cat .hg/last-message.txt |
|
237 custom tag message |
|
238 second line |
|
239 $ cat > .hg/hgrc << '__EOF__' |
|
240 > [hooks] |
|
241 > pretag.test-saving-lastmessage = |
|
242 > __EOF__ |
|
243 |
|
244 then, test custom commit message itself |
|
245 |
225 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e |
246 $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg tag custom-tag -e |
226 $ hg log -l1 --template "{desc}\n" |
247 $ hg log -l1 --template "{desc}\n" |
227 custom tag message |
248 custom tag message |
228 second line |
249 second line |
229 |
250 |