comparison tests/test-shelve.t @ 21852:37a5decc6924

shelve: accept '--edit' like other commands creating new changeset After this patch, users can invoke editor for the commit message by '--edit' option regardless of '--message'.
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 20 Jun 2014 16:15:38 +0900
parents 3eb43b706174
children b081decd9062
comparison
equal deleted inserted replaced
21851:aad28ff87788 21852:37a5decc6924
14 $ echo d > d 14 $ echo d > d
15 $ echo x > x 15 $ echo x > x
16 $ hg addremove -q 16 $ hg addremove -q
17 17
18 shelving in an empty repo should be possible 18 shelving in an empty repo should be possible
19 19 (this tests also that editor is not invoked, if '--edit' is not
20 $ hg shelve 20 specified)
21
22 $ HGEDITOR=cat hg shelve
21 shelved as default 23 shelved as default
22 0 files updated, 0 files merged, 5 files removed, 0 files unresolved 24 0 files updated, 0 files merged, 5 files removed, 0 files unresolved
23 25
24 $ hg unshelve 26 $ hg unshelve
25 unshelving change 'default' 27 unshelving change 'default'
130 $ hg unshelve foo 132 $ hg unshelve foo
131 abort: shelved change 'foo' not found 133 abort: shelved change 'foo' not found
132 [255] 134 [255]
133 135
134 named shelves, specific filenames, and "commit messages" should all work 136 named shelves, specific filenames, and "commit messages" should all work
137 (this tests also that editor is invoked, if '--edit' is specified)
135 138
136 $ hg status -C 139 $ hg status -C
137 M a/a 140 M a/a
138 A b.rename/b 141 A b.rename/b
139 b/b 142 b/b
140 A c.copy 143 A c.copy
141 c 144 c
142 R b/b 145 R b/b
143 $ hg shelve -q -n wibble -m wat a 146 $ HGEDITOR=cat hg shelve -q -n wibble -m wat -e a
147 wat
148
149
150 HG: Enter commit message. Lines beginning with 'HG:' are removed.
151 HG: Leave message empty to abort commit.
152 HG: --
153 HG: user: shelve@localhost
154 HG: branch 'default'
155 HG: changed a/a
144 156
145 expect "a" to no longer be present, but status otherwise unchanged 157 expect "a" to no longer be present, but status otherwise unchanged
146 158
147 $ hg status -C 159 $ hg status -C
148 A b.rename/b 160 A b.rename/b