diff -r ff9cb7067329 -r 28ba7d111337 hgext/uncommit.py --- a/hgext/uncommit.py Sat Mar 17 00:06:14 2018 +0900 +++ b/hgext/uncommit.py Wed Mar 14 11:16:49 2018 -0700 @@ -166,7 +166,8 @@ with repo.transaction('uncommit'): match = scmutil.match(old, pats, opts) - newid = _commitfiltered(repo, old, match, opts.get('keep')) + allowempty = opts.get('keep') or pats + newid = _commitfiltered(repo, old, match, allowempty) if newid is None: ui.status(_("nothing to uncommit\n")) return 1