Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
H
hg-pull-mirror-test2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
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
heptapod
Testing Projects
hg-pull-mirror-test2
Commits
f38c90953c2c
Commit
f38c90953c2c
authored
19 years ago
by
mpm
Browse files
Options
Downloads
Patches
Plain Diff
Make undo and recover friendlier
Add them to the help display, have them report failure
parent
5dcbe4d9a30c
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
hg
+2
-2
2 additions, 2 deletions
hg
mercurial/hg.py
+3
-0
3 additions, 0 deletions
mercurial/hg.py
with
5 additions
and
2 deletions
hg
+
2
−
2
View file @
f38c9095
...
...
@@ -36,7 +36,8 @@
init create a new repository in this directory
log <file> show revision history of a single file
merge <path> merge changes from <path> into local repository
recover rollback an interrupted transaction
remove [files...] remove the given files in the next commit
serve export the repository via HTTP
status show new, missing, and changed files in working dir
tags show current changeset tags
...
...
@@ -39,7 +40,8 @@
remove [files...] remove the given files in the next commit
serve export the repository via HTTP
status show new, missing, and changed files in working dir
tags show current changeset tags
undo undo the last transaction
"""
def
filterfiles
(
list
,
files
):
...
...
@@ -424,7 +426,6 @@
print
"
%-30s %5d:%s
"
%
(
k
,
repo
.
changelog
.
rev
(
n
),
hg
.
hex
(
n
))
elif
cmd
==
"
recover
"
:
ui
.
status
(
"
rolling back any existing journal
"
)
repo
.
recover
()
elif
cmd
==
"
undo
"
:
...
...
@@ -428,7 +429,6 @@
repo
.
recover
()
elif
cmd
==
"
undo
"
:
ui
.
status
(
"
rolling back previous transaction
"
)
repo
.
recover
(
"
undo
"
)
elif
cmd
==
"
verify
"
:
...
...
This diff is collapsed.
Click to expand it.
mercurial/hg.py
+
3
−
0
View file @
f38c9095
...
...
@@ -300,4 +300,5 @@
def
recover
(
self
,
f
=
"
journal
"
):
self
.
lock
()
if
os
.
path
.
exists
(
self
.
join
(
f
)):
self
.
ui
.
status
(
"
attempting to rollback %s information
\n
"
%
f
)
return
rollback
(
self
.
opener
,
self
.
join
(
f
))
...
...
@@ -303,4 +304,6 @@
return
rollback
(
self
.
opener
,
self
.
join
(
f
))
else
:
self
.
ui
.
warn
(
"
no %s information available
\n
"
%
f
)
def
lock
(
self
,
wait
=
1
):
try
:
...
...
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