equal
deleted
inserted
replaced
3 $ hg init |
3 $ hg init |
4 |
4 |
5 Create an editor that writes its arguments to stdout and set it to $HGEDITOR. |
5 Create an editor that writes its arguments to stdout and set it to $HGEDITOR. |
6 |
6 |
7 $ cat > editor.sh << EOF |
7 $ cat > editor.sh << EOF |
8 > #!/bin/bash |
|
9 > echo "\$@" |
8 > echo "\$@" |
10 > exit 1 |
9 > exit 1 |
11 > EOF |
10 > EOF |
12 $ chmod +x editor.sh |
|
13 $ hg add editor.sh |
11 $ hg add editor.sh |
14 $ HGEDITOR=$TESTTMP/editor.sh |
12 $ HGEDITOR="sh $TESTTMP/editor.sh" |
15 $ export HGEDITOR |
13 $ export HGEDITOR |
16 |
14 |
17 Verify that the path for a commit editor has the expected suffix. |
15 Verify that the path for a commit editor has the expected suffix. |
18 |
16 |
19 $ hg commit |
17 $ hg commit |
20 *.commit.hg.txt (glob) |
18 *.commit.hg.txt (glob) |
21 abort: edit failed: editor.sh exited with status 1 |
19 abort: edit failed: sh exited with status 1 |
22 [255] |
20 [255] |
23 |
21 |
24 Verify that the path for a histedit editor has the expected suffix. |
22 Verify that the path for a histedit editor has the expected suffix. |
25 |
23 |
26 $ cat >> $HGRCPATH <<EOF |
24 $ cat >> $HGRCPATH <<EOF |
29 > histedit= |
27 > histedit= |
30 > EOF |
28 > EOF |
31 $ hg commit --message 'At least one commit for histedit.' |
29 $ hg commit --message 'At least one commit for histedit.' |
32 $ hg histedit |
30 $ hg histedit |
33 *.histedit.hg.txt (glob) |
31 *.histedit.hg.txt (glob) |
34 abort: edit failed: editor.sh exited with status 1 |
32 abort: edit failed: sh exited with status 1 |
35 [255] |
33 [255] |
36 |
34 |
37 Verify that when performing an action that has the side-effect of creating an |
35 Verify that when performing an action that has the side-effect of creating an |
38 editor for a diff, the file ends in .diff. |
36 editor for a diff, the file ends in .diff. |
39 |
37 |