diff --git a/hgext/uncommit.py b/hgext/uncommit.py
--- a/hgext/uncommit.py
+++ b/hgext/uncommit.py
@@ -157,7 +157,7 @@
     with repo.wlock(), repo.lock():
 
         if not pats and not repo.ui.configbool('experimental',
-                                                'uncommitondirtywdir'):
+                                               'uncommitondirtywdir'):
             cmdutil.bailifchanged(repo)
         old = repo['.']
         rewriteutil.precheck(repo, [old.rev()], 'uncommit')