##// END OF EJS Templates
commit: --edit/-e to force edit of otherwise-supplied commit message...
"Bradley M. Kuhn" -
r21021:42298149 default
parent child Browse files
Show More
@@ -1324,6 +1324,8 b' def clone(ui, source, dest=None, **opts)'
1324 1324 _('mark a branch as closed, hiding it from the branch list')),
1325 1325 ('', 'amend', None, _('amend the parent of the working dir')),
1326 1326 ('s', 'secret', None, _('use the secret phase for committing')),
1327 ('e', 'edit', None,
1328 _('further edit commit message already specified')),
1327 1329 ] + walkopts + commitopts + commitopts2 + subrepoopts,
1328 1330 _('[OPTION]... [FILE]...'))
1329 1331 def commit(ui, repo, *pats, **opts):
@@ -1362,6 +1364,8 b' def commit(ui, repo, *pats, **opts):'
1362 1364
1363 1365 Returns 0 on success, 1 if nothing changed.
1364 1366 """
1367 forceeditor = opts.get('force_editor') or opts.get('edit')
1368
1365 1369 if opts.get('subrepos'):
1366 1370 if opts.get('amend'):
1367 1371 raise util.Abort(_('cannot amend with --subrepos'))
@@ -1400,7 +1404,7 b' def commit(ui, repo, *pats, **opts):'
1400 1404 raise util.Abort(_('cannot amend changeset with children'))
1401 1405
1402 1406 e = cmdutil.commiteditor
1403 if opts.get('force_editor'):
1407 if forceeditor:
1404 1408 e = cmdutil.commitforceeditor
1405 1409
1406 1410 # commitfunc is used only for temporary amend commit by cmdutil.amend
@@ -1435,7 +1439,7 b' def commit(ui, repo, *pats, **opts):'
1435 1439 newmarks.write()
1436 1440 else:
1437 1441 e = cmdutil.commiteditor
1438 if opts.get('force_editor'):
1442 if forceeditor:
1439 1443 e = cmdutil.commitforceeditor
1440 1444
1441 1445 def commitfunc(ui, repo, message, match, opts):
@@ -120,7 +120,18 b' partial subdir commit test'
120 120 $ hg add
121 121 adding bar/bar (glob)
122 122 adding foo/foo (glob)
123 $ hg ci -m commit-subdir-1 foo
123 $ HGEDITOR=cat hg ci -e -m commit-subdir-1 foo
124 commit-subdir-1
125
126
127 HG: Enter commit message. Lines beginning with 'HG:' are removed.
128 HG: Leave message empty to abort commit.
129 HG: --
130 HG: user: test
131 HG: branch 'default'
132 HG: added foo/foo
133
134
124 135 $ hg ci -m commit-subdir-2 bar
125 136
126 137 subdir log 1
@@ -174,11 +185,23 b' full log'
174 185 dot and subdir commit test
175 186
176 187 $ hg init test3
188 $ echo commit-foo-subdir > commit-log-test
177 189 $ cd test3
178 190 $ mkdir foo
179 191 $ echo foo content > foo/plain-file
180 192 $ hg add foo/plain-file
181 $ hg ci -m commit-foo-subdir foo
193 $ HGEDITOR=cat hg ci --edit -l ../commit-log-test foo
194 commit-foo-subdir
195
196
197 HG: Enter commit message. Lines beginning with 'HG:' are removed.
198 HG: Leave message empty to abort commit.
199 HG: --
200 HG: user: test
201 HG: branch 'default'
202 HG: added foo/plain-file
203
204
182 205 $ echo modified foo content > foo/plain-file
183 206 $ hg ci -m commit-foo-dot .
184 207
@@ -199,7 +199,7 b' Show all commands + options'
199 199 add: include, exclude, subrepos, dry-run
200 200 annotate: rev, follow, no-follow, text, user, file, date, number, changeset, line-number, ignore-all-space, ignore-space-change, ignore-blank-lines, include, exclude
201 201 clone: noupdate, updaterev, rev, branch, pull, uncompressed, ssh, remotecmd, insecure
202 commit: addremove, close-branch, amend, secret, include, exclude, message, logfile, date, user, subrepos
202 commit: addremove, close-branch, amend, secret, edit, include, exclude, message, logfile, date, user, subrepos
203 203 diff: rev, change, text, git, nodates, show-function, reverse, ignore-all-space, ignore-space-change, ignore-blank-lines, unified, stat, include, exclude, subrepos
204 204 export: output, switch-parent, rev, text, git, nodates
205 205 forget: include, exclude
@@ -62,6 +62,7 b' help record (record)'
62 62 list
63 63 --amend amend the parent of the working dir
64 64 -s --secret use the secret phase for committing
65 -e --edit further edit commit message already specified
65 66 -I --include PATTERN [+] include names matching the given patterns
66 67 -X --exclude PATTERN [+] exclude names matching the given patterns
67 68 -m --message TEXT use text as commit message
General Comments 0
You need to be logged in to leave comments. Login now