##// END OF EJS Templates
rollback: use a hint for force
Matt Mackall -
r15187:0292f88d default
parent child Browse files
Show More
@@ -791,7 +791,7 b' class localrepository(repo.repository):'
791 if not force and self['.'] != self['tip'] and desc == 'commit':
791 if not force and self['.'] != self['tip'] and desc == 'commit':
792 raise util.Abort(
792 raise util.Abort(
793 _('rollback of last commit while not checked out '
793 _('rollback of last commit while not checked out '
794 'may lose data (use -f to force)'))
794 'may lose data'), hint=_('use -f to force'))
795
795
796 ui.status(msg)
796 ui.status(msg)
797 if dryrun:
797 if dryrun:
@@ -160,7 +160,8 b' that would lose data (issue2998)'
160 $ hg update 0
160 $ hg update 0
161 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
161 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
162 $ hg rollback
162 $ hg rollback
163 abort: rollback of last commit while not checked out may lose data (use -f to force)
163 abort: rollback of last commit while not checked out may lose data
164 (use -f to force)
164 [255]
165 [255]
165 $ hg tip -q
166 $ hg tip -q
166 2:4d9cd3795eea
167 2:4d9cd3795eea
General Comments 0
You need to be logged in to leave comments. Login now