annotate tests/test-mq-qrefresh-replace-log-message.t @ 21764:cd3c79392056

merge with stable
author Matt Mackall <mpm@selenic.com>
date Wed, 18 Jun 2014 20:59:36 -0500
parents 7a51bced398b
children 5375ba75df40
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17478
113d0a3d050b spelling: Environment
timeless@mozdev.org
parents: 12468
diff changeset
1 Environment setup for MQ
2694
0fb28dbf0dc7 MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff changeset
2
12468
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
3 $ echo "[extensions]" >> $HGRCPATH
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
4 $ echo "mq=" >> $HGRCPATH
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
5 $ hg init
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
6 $ hg qinit
2694
0fb28dbf0dc7 MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff changeset
7
12468
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
8 Should fail if no patches applied
21423
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
9 (this tests also that editor is not invoked if '--edit' is not
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
10 specified)
2694
0fb28dbf0dc7 MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff changeset
11
12468
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
12 $ hg qrefresh
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
13 no patches applied
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
14 [1]
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
15 $ hg qrefresh -e
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
16 no patches applied
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
17 [1]
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
18 $ hg qnew -m "First commit message" first-patch
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
19 $ echo aaaa > file
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
20 $ hg add file
21423
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
21 $ HGEDITOR=cat hg qrefresh
5334
448eb46d4d84 mq: fix qrefresh -e with no patches applied
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4659
diff changeset
22
12468
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
23 Should display 'First commit message'
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
24
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
25 $ hg log -l1 --template "{desc}\n"
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
26 First commit message
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
27
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
28 Testing changing message with -m
21713
7a51bced398b qrefresh: allow to specify '--message/'--logfile' and '--edit' at the same time
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21423
diff changeset
29 (this tests also that '--edit' can be used with '--message')
12468
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
30
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
31 $ echo bbbb > file
21713
7a51bced398b qrefresh: allow to specify '--message/'--logfile' and '--edit' at the same time
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21423
diff changeset
32 $ HGEDITOR=cat hg qrefresh -m "Second commit message" -e
7a51bced398b qrefresh: allow to specify '--message/'--logfile' and '--edit' at the same time
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21423
diff changeset
33 Second commit message
7a51bced398b qrefresh: allow to specify '--message/'--logfile' and '--edit' at the same time
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21423
diff changeset
34
7a51bced398b qrefresh: allow to specify '--message/'--logfile' and '--edit' at the same time
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21423
diff changeset
35
7a51bced398b qrefresh: allow to specify '--message/'--logfile' and '--edit' at the same time
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21423
diff changeset
36 HG: Enter commit message. Lines beginning with 'HG:' are removed.
7a51bced398b qrefresh: allow to specify '--message/'--logfile' and '--edit' at the same time
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21423
diff changeset
37 HG: Leave message empty to use default message.
7a51bced398b qrefresh: allow to specify '--message/'--logfile' and '--edit' at the same time
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21423
diff changeset
38 HG: --
7a51bced398b qrefresh: allow to specify '--message/'--logfile' and '--edit' at the same time
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21423
diff changeset
39 HG: user: test
7a51bced398b qrefresh: allow to specify '--message/'--logfile' and '--edit' at the same time
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21423
diff changeset
40 HG: branch 'default'
7a51bced398b qrefresh: allow to specify '--message/'--logfile' and '--edit' at the same time
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21423
diff changeset
41 HG: added file
2694
0fb28dbf0dc7 MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff changeset
42
12468
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
43 Should display 'Second commit message'
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
44
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
45 $ hg log -l1 --template "{desc}\n"
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
46 Second commit message
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
47
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
48 Testing changing message with -l
2694
0fb28dbf0dc7 MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff changeset
49
12468
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
50 $ echo "Third commit message" > logfile
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
51 $ echo " This is the 3rd log message" >> logfile
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
52 $ echo bbbb > file
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
53 $ hg qrefresh -l logfile
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
54
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
55 Should display 'Third commit message\\\n This is the 3rd log message'
2694
0fb28dbf0dc7 MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff changeset
56
12468
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
57 $ hg log -l1 --template "{desc}\n"
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
58 Third commit message
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
59 This is the 3rd log message
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
60
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
61 Testing changing message with -l-
2694
0fb28dbf0dc7 MQ: uniformise message and logfile option.
"Mathieu Clabaut <mathieu.clabaut@gmail.com>"
parents:
diff changeset
62
12468
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
63 $ hg qnew -m "First commit message" second-patch
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
64 $ echo aaaa > file2
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
65 $ hg add file2
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
66 $ echo bbbb > file2
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
67 $ (echo "Fifth commit message"; echo " This is the 5th log message") | hg qrefresh -l-
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
68
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
69 Should display 'Fifth commit message\\\n This is the 5th log message'
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
70
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
71 $ hg log -l1 --template "{desc}\n"
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
72 Fifth commit message
d8bf747d2e29 tests: unify test-mq-qrefresh-replace-log-message
Matt Mackall <mpm@selenic.com>
parents: 5334
diff changeset
73 This is the 5th log message
21236
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
74
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
75 Test saving last-message.txt:
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
76
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
77 $ cat > $TESTTMP/editor.sh << EOF
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
78 > echo "==== before editing"
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
79 > cat \$1
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
80 > echo "===="
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
81 > (echo; echo "test saving last-message.txt") >> \$1
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
82 > EOF
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
83
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
84 $ cat > $TESTTMP/commitfailure.py <<EOF
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
85 > from mercurial import util
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
86 > def reposetup(ui, repo):
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
87 > class commitfailure(repo.__class__):
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
88 > def commit(self, *args, **kwargs):
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
89 > raise util.Abort('emulating unexpected abort')
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
90 > repo.__class__ = commitfailure
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
91 > EOF
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
92
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
93 $ cat >> .hg/hgrc <<EOF
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
94 > [extensions]
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
95 > # this failure occurs before editor invocation
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
96 > commitfailure = $TESTTMP/commitfailure.py
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
97 > EOF
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
98
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
99 $ hg qapplied
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
100 first-patch
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
101 second-patch
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
102 $ hg tip --template "{files}\n"
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
103 file2
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
104
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
105 (test that editor is not invoked before transaction starting)
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
106
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
107 $ rm -f .hg/last-message.txt
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
108 $ HGEDITOR="sh $TESTTMP/editor.sh" hg qrefresh -e
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
109 refresh interrupted while patch was popped! (revert --all, qpush to recover)
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
110 abort: emulating unexpected abort
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
111 [255]
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
112 $ cat .hg/last-message.txt
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
113 cat: .hg/last-message.txt: No such file or directory
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
114 [1]
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
115
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
116 (reset applied patches and directory status)
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
117
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
118 $ cat >> .hg/hgrc <<EOF
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
119 > [extensions]
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
120 > commitfailure = !
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
121 > EOF
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
122
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
123 $ hg qapplied
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
124 first-patch
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
125 $ hg status -A file2
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
126 ? file2
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
127 $ rm file2
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
128 $ hg qpush -q second-patch
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
129 now at: second-patch
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
130
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
131 (test that editor is invoked and commit message is saved into
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
132 "last-message.txt")
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
133
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
134 $ cat >> .hg/hgrc <<EOF
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
135 > [hooks]
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
136 > # this failure occurs after editor invocation
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
137 > pretxncommit.unexpectedabort = false
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
138 > EOF
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
139
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
140 $ rm -f .hg/last-message.txt
21423
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
141 $ hg status --rev "second-patch^1" -arm
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
142 A file2
21236
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
143 $ HGEDITOR="sh $TESTTMP/editor.sh" hg qrefresh -e
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
144 ==== before editing
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
145 Fifth commit message
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
146 This is the 5th log message
21423
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
147
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
148
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
149 HG: Enter commit message. Lines beginning with 'HG:' are removed.
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
150 HG: Leave message empty to use default message.
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
151 HG: --
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
152 HG: user: test
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
153 HG: branch 'default'
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
154 HG: added file2
21236
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
155 ====
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
156 transaction abort!
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
157 rollback completed
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
158 note: commit message saved in .hg/last-message.txt
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
159 refresh interrupted while patch was popped! (revert --all, qpush to recover)
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
160 abort: pretxncommit.unexpectedabort hook exited with status 1
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
161 [255]
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
162 $ cat .hg/last-message.txt
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
163 Fifth commit message
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
164 This is the 5th log message
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
165
21423
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
166
7d408720453d mq: use the editor gotten by "getcommiteditor()" instead of "ui.edit()" (qrefresh/qfold)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 21236
diff changeset
167
21236
49148d7868df qrefresh: use "editor" argument of "commit()" instead of explicit "ui.edit()"
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 17478
diff changeset
168 test saving last-message.txt