diff -r 624c53e4121d -r 7b1e524ad73f hgext/uncommit.py --- a/hgext/uncommit.py Wed Sep 20 02:18:01 2017 +0530 +++ b/hgext/uncommit.py Wed Sep 20 02:40:25 2017 +0530 @@ -149,7 +149,8 @@ with repo.wlock(), repo.lock(): wctx = repo[None] - if not pats: + if not pats and not repo.ui.configbool('experimental', + 'uncommitondirtywdir', False): cmdutil.bailifchanged(repo) if wctx.parents()[0].node() == node.nullid: raise error.Abort(_("cannot uncommit null changeset"))