diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
index 59e8bc22506ec40f74ce192b6f0c36fb9e42d2c6_bWVyY3VyaWFsL2xvY2FscmVwby5weQ==..0292f88d3b8673b0ae19641bdfb29fd39c33ad99_bWVyY3VyaWFsL2xvY2FscmVwby5weQ== 100644
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -791,7 +791,7 @@
         if not force and self['.'] != self['tip'] and desc == 'commit':
             raise util.Abort(
                 _('rollback of last commit while not checked out '
-                  'may lose data (use -f to force)'))
+                  'may lose data'), hint=_('use -f to force'))
 
         ui.status(msg)
         if dryrun:
diff --git a/tests/test-rollback.t b/tests/test-rollback.t
index 59e8bc22506ec40f74ce192b6f0c36fb9e42d2c6_dGVzdHMvdGVzdC1yb2xsYmFjay50..0292f88d3b8673b0ae19641bdfb29fd39c33ad99_dGVzdHMvdGVzdC1yb2xsYmFjay50 100644
--- a/tests/test-rollback.t
+++ b/tests/test-rollback.t
@@ -160,7 +160,8 @@
   $ hg update 0
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ hg rollback
-  abort: rollback of last commit while not checked out may lose data (use -f to force)
+  abort: rollback of last commit while not checked out may lose data
+  (use -f to force)
   [255]
   $ hg tip -q
   2:4d9cd3795eea