revert: mention update in hint of abort when reverting to non-parent
and explicitly warn about uncommitted changes
Examples:
BEFORE:
$ hg par -q
7:
e81a2efd53d4
$ hg revert -r 2
abort: no files or directories specified
(use --all to discard all changes)
AFTER:
Clean working directory (revert can be easily undone, no edits to be lost):
$ hg revert -r 2
abort: no files or directories specified
(use --all to revert all files, or 'hg update 2' to update)
Uncommitted changes (revert --all *does* discard edits and is pretty hard to
undo or even impossible if --no-backup is specified):
$ hg revert -r 2
abort: no files or directories specified
(uncommitted changes, use --all to discard all changes, or 'hg update 2' to update)
revset: fix aliases with 0 or more than 2 parameters
The existing code seemed to have incorrect assumptions about how parameter
lists are represented by the parser.
Now the match and replace functions have been merged and simplified by using
getlist().
match: fix bug caused by refactoring in
cfc89398f710
revert: be more helpful on uncommitted merges
BEFORE:
$ hg revert
abort: no files or directories specified
(use --all to discard all changes)
AFTER:
$ hg revert
abort: no files or directories specified
(uncommitted merge, use --all to discard all changes, or 'hg update -C .' to abort the merge)
opener: add self._audit (
issue2862)