Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mercurial
mercurial-devel
Commits
0292f88d
Commit
0292f88d
authored
13 years ago
by
Matt Mackall
Browse files
Options
Downloads
Patches
Plain Diff
rollback: use a hint for force
parent
59e8bc22
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mercurial/localrepo.py
+1
-1
1 addition, 1 deletion
mercurial/localrepo.py
tests/test-rollback.t
+2
-1
2 additions, 1 deletion
tests/test-rollback.t
with
3 additions
and
2 deletions
mercurial/localrepo.py
+
1
−
1
View file @
0292f88d
...
@@ -791,7 +791,7 @@
...
@@ -791,7 +791,7 @@
if
not
force
and
self
[
'
.
'
]
!=
self
[
'
tip
'
]
and
desc
==
'
commit
'
:
if
not
force
and
self
[
'
.
'
]
!=
self
[
'
tip
'
]
and
desc
==
'
commit
'
:
raise
util
.
Abort
(
raise
util
.
Abort
(
_
(
'
rollback of last commit while not checked out
'
_
(
'
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
)
ui
.
status
(
msg
)
if
dryrun
:
if
dryrun
:
...
...
This diff is collapsed.
Click to expand it.
tests/test-rollback.t
+
2
−
1
View file @
0292f88d
...
@@ -160,7 +160,8 @@
...
@@ -160,7 +160,8 @@
$
hg
update
0
$
hg
update
0
1
files
updated
,
0
files
merged
,
1
files
removed
,
0
files
unresolved
1
files
updated
,
0
files
merged
,
1
files
removed
,
0
files
unresolved
$
hg
rollback
$
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
]
[
255
]
$
hg
tip
-
q
$
hg
tip
-
q
2:4d9cd3795eea
2:4d9cd3795eea
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment