Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | hgext/uncommit.py (3 lines) | |||
M | tests/test-uncommit.t (3 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | martinvonz | ||
Closed | martinvonz |
_('[OPTION]... [FILE]...')) | _('[OPTION]... [FILE]...')) | ||||
def uncommit(ui, repo, *pats, **opts): | def uncommit(ui, repo, *pats, **opts): | ||||
"""uncommit part or all of a local changeset | """uncommit part or all of a local changeset | ||||
This command undoes the effect of a local commit, returning the affected | This command undoes the effect of a local commit, returning the affected | ||||
files to their uncommitted state. This means that files modified or | files to their uncommitted state. This means that files modified or | ||||
deleted in the changeset will be left unchanged, and so will remain | deleted in the changeset will be left unchanged, and so will remain | ||||
modified in the working directory. | modified in the working directory. | ||||
If no files are specified, the commit will be pruned, unless --keep is | |||||
given. | |||||
""" | """ | ||||
opts = pycompat.byteskwargs(opts) | opts = pycompat.byteskwargs(opts) | ||||
with repo.wlock(), repo.lock(): | with repo.wlock(), repo.lock(): | ||||
if not pats and not repo.ui.configbool('experimental', | if not pats and not repo.ui.configbool('experimental', | ||||
'uncommitondirtywdir'): | 'uncommitondirtywdir'): | ||||
cmdutil.bailifchanged(repo) | cmdutil.bailifchanged(repo) |
uncommit part or all of a local changeset | uncommit part or all of a local changeset | ||||
This command undoes the effect of a local commit, returning the affected | This command undoes the effect of a local commit, returning the affected | ||||
files to their uncommitted state. This means that files modified or | files to their uncommitted state. This means that files modified or | ||||
deleted in the changeset will be left unchanged, and so will remain | deleted in the changeset will be left unchanged, and so will remain | ||||
modified in the working directory. | modified in the working directory. | ||||
If no files are specified, the commit will be pruned, unless --keep is | |||||
given. | |||||
(use 'hg help -e uncommit' to show help for the uncommit extension) | (use 'hg help -e uncommit' to show help for the uncommit extension) | ||||
options ([+] can be repeated): | options ([+] can be repeated): | ||||
--keep allow an empty commit after uncommiting | --keep allow an empty commit after uncommiting | ||||
-I --include PATTERN [+] include names matching the given patterns | -I --include PATTERN [+] include names matching the given patterns | ||||
-X --exclude PATTERN [+] exclude names matching the given patterns | -X --exclude PATTERN [+] exclude names matching the given patterns | ||||