hgext/uncommit.py
changeset 34284 624c53e4121d
parent 34283 f94442d46984
child 34285 7b1e524ad73f
--- a/hgext/uncommit.py	Sat Sep 16 02:34:13 2017 +0530
+++ b/hgext/uncommit.py	Wed Sep 20 02:18:01 2017 +0530
@@ -22,6 +22,7 @@
 from mercurial.i18n import _
 
 from mercurial import (
+    cmdutil,
     commands,
     context,
     copies,
@@ -148,6 +149,8 @@
     with repo.wlock(), repo.lock():
         wctx = repo[None]
 
+        if not pats:
+            cmdutil.bailifchanged(repo)
         if wctx.parents()[0].node() == node.nullid:
             raise error.Abort(_("cannot uncommit null changeset"))
         if len(wctx.parents()) > 1: