Show More
@@ -178,7 +178,8 b' def createcmd(ui, repo, pats, opts):' | |||||
178 | if hasmq: |
|
178 | if hasmq: | |
179 | saved, repo.mq.checkapplied = repo.mq.checkapplied, False |
|
179 | saved, repo.mq.checkapplied = repo.mq.checkapplied, False | |
180 | try: |
|
180 | try: | |
181 |
return repo.commit(message, user, opts.get('date'), match |
|
181 | return repo.commit(message, user, opts.get('date'), match, | |
|
182 | editor=cmdutil.getcommiteditor(**opts)) | |||
182 | finally: |
|
183 | finally: | |
183 | if hasmq: |
|
184 | if hasmq: | |
184 | repo.mq.checkapplied = saved |
|
185 | repo.mq.checkapplied = saved | |
@@ -635,6 +636,8 b' def unshelve(ui, repo, *shelved, **opts)' | |||||
635 | _('shelve with the specified commit date'), _('DATE')), |
|
636 | _('shelve with the specified commit date'), _('DATE')), | |
636 | ('d', 'delete', None, |
|
637 | ('d', 'delete', None, | |
637 | _('delete the named shelved change(s)')), |
|
638 | _('delete the named shelved change(s)')), | |
|
639 | ('e', 'edit', False, | |||
|
640 | _('invoke editor on commit messages')), | |||
638 | ('l', 'list', None, |
|
641 | ('l', 'list', None, | |
639 | _('list current shelves')), |
|
642 | _('list current shelves')), | |
640 | ('m', 'message', '', |
|
643 | ('m', 'message', '', | |
@@ -680,6 +683,7 b' def shelvecmd(ui, repo, *pats, **opts):' | |||||
680 | ('cleanup', 'cleanup'), |
|
683 | ('cleanup', 'cleanup'), | |
681 | # ('date', 'create'), # ignored for passing '--date "0 0"' in tests |
|
684 | # ('date', 'create'), # ignored for passing '--date "0 0"' in tests | |
682 | ('delete', 'delete'), |
|
685 | ('delete', 'delete'), | |
|
686 | ('edit', 'create'), | |||
683 | ('list', 'list'), |
|
687 | ('list', 'list'), | |
684 | ('message', 'create'), |
|
688 | ('message', 'create'), | |
685 | ('name', 'create'), |
|
689 | ('name', 'create'), |
@@ -16,8 +16,10 b'' | |||||
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 | (this tests also that editor is not invoked, if '--edit' is not | |||
|
20 | specified) | |||
19 |
|
21 | |||
20 | $ hg shelve |
|
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 | |||
@@ -132,6 +134,7 b' apply it and make sure our state is as e' | |||||
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 | |
@@ -140,7 +143,16 b' named shelves, specific filenames, and "' | |||||
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 |
General Comments 0
You need to be logged in to leave comments.
Login now