Show More
@@ -111,7 +111,8 b' def _commitfiltered(repo, ctx, match, ke' | |||||
111 | @command('uncommit', |
|
111 | @command('uncommit', | |
112 | [('', 'keep', None, _('allow an empty commit after uncommiting')), |
|
112 | [('', 'keep', None, _('allow an empty commit after uncommiting')), | |
113 | ('', 'allow-dirty-working-copy', False, |
|
113 | ('', 'allow-dirty-working-copy', False, | |
114 | _('allow uncommit with outstanding changes')) |
|
114 | _('allow uncommit with outstanding changes')), | |
|
115 | (b'n', b'note', b'', _(b'store a note on uncommit'), _(b'TEXT')) | |||
115 | ] + commands.walkopts + commands.commitopts + commands.commitopts2 |
|
116 | ] + commands.walkopts + commands.commitopts + commands.commitopts2 | |
116 | + commands.commitopts3, |
|
117 | + commands.commitopts3, | |
117 | _('[OPTION]... [FILE]...'), |
|
118 | _('[OPTION]... [FILE]...'), | |
@@ -129,6 +130,7 b' def uncommit(ui, repo, *pats, **opts):' | |||||
129 | """ |
|
130 | """ | |
130 | opts = pycompat.byteskwargs(opts) |
|
131 | opts = pycompat.byteskwargs(opts) | |
131 |
|
132 | |||
|
133 | cmdutil.checknotesize(ui, opts) | |||
132 | cmdutil.resolvecommitoptions(ui, opts) |
|
134 | cmdutil.resolvecommitoptions(ui, opts) | |
133 |
|
135 | |||
134 | with repo.wlock(), repo.lock(): |
|
136 | with repo.wlock(), repo.lock(): |
@@ -36,6 +36,7 b' Help for uncommit' | |||||
36 |
|
36 | |||
37 | --keep allow an empty commit after uncommiting |
|
37 | --keep allow an empty commit after uncommiting | |
38 | --allow-dirty-working-copy allow uncommit with outstanding changes |
|
38 | --allow-dirty-working-copy allow uncommit with outstanding changes | |
|
39 | -n --note TEXT store a note on uncommit | |||
39 | -I --include PATTERN [+] include names matching the given patterns |
|
40 | -I --include PATTERN [+] include names matching the given patterns | |
40 | -X --exclude PATTERN [+] exclude names matching the given patterns |
|
41 | -X --exclude PATTERN [+] exclude names matching the given patterns | |
41 | -m --message TEXT use text as commit message |
|
42 | -m --message TEXT use text as commit message | |
@@ -570,7 +571,7 b' Bad option combinations' | |||||
570 |
|
571 | |||
571 | $ hg rollback -q --config ui.rollback=True |
|
572 | $ hg rollback -q --config ui.rollback=True | |
572 | $ cd dir |
|
573 | $ cd dir | |
573 | $ hg uncommit . |
|
574 | $ hg uncommit . -n 'this is a note' | |
574 | note: keeping empty commit |
|
575 | note: keeping empty commit | |
575 | $ hg status |
|
576 | $ hg status | |
576 | A dir/file2.txt |
|
577 | A dir/file2.txt |
General Comments 0
You need to be logged in to leave comments.
Login now