mercurial/commands.py
branchstable
changeset 14721 4fcde634f5e0
parent 14713 88a53081fb21
child 14725 2852933fc942
--- a/mercurial/commands.py	Wed Jun 22 10:13:44 2011 +0200
+++ b/mercurial/commands.py	Wed Jun 22 15:34:33 2011 +0200
@@ -4181,8 +4181,12 @@
     parent, p2 = repo.dirstate.parents()
 
     if not pats and not opts.get('all'):
-        raise util.Abort(_('no files or directories specified'),
-                         hint=_('use --all to discard all changes'))
+        msg = _("no files or directories specified")
+        hint = _("use --all to discard all changes")
+        if p2 != nullid:
+            hint = _("uncommitted merge, use --all to discard all changes,"
+                     " or 'hg update -C .' to abort the merge")
+        raise util.Abort(msg, hint=hint)
 
     ctx = scmutil.revsingle(repo, opts.get('rev'))
     node = ctx.node()