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
5983de86462c
Commit
5983de86462c
authored
12 years ago
by
Matt Mackall
Browse files
Options
Downloads
Patches
Plain Diff
bookmarks: catch the proper exception for missing revisions
This fixes a regression from 1.7
parent
8d44b5a2974f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
mercurial/bookmarks.py
+2
-2
2 additions, 2 deletions
mercurial/bookmarks.py
tests/test-bookmarks.t
+5
-0
5 additions, 0 deletions
tests/test-bookmarks.t
with
7 additions
and
2 deletions
mercurial/bookmarks.py
+
2
−
2
View file @
5983de86
...
...
@@ -7,7 +7,7 @@
from
mercurial.i18n
import
_
from
mercurial.node
import
hex
from
mercurial
import
encoding
,
error
,
util
from
mercurial
import
encoding
,
util
import
errno
,
os
def
valid
(
mark
):
...
...
@@ -36,7 +36,7 @@
refspec
=
encoding
.
tolocal
(
refspec
)
try
:
bookmarks
[
refspec
]
=
repo
.
changelog
.
lookup
(
sha
)
except
error
.
Repo
LookupError
:
except
LookupError
:
pass
except
IOError
,
inst
:
if
inst
.
errno
!=
errno
.
ENOENT
:
...
...
This diff is collapsed.
Click to expand it.
tests/test-bookmarks.t
+
5
−
0
View file @
5983de86
...
...
@@ -371,3 +371,8 @@
*
Z
3
:
125
c9a1d6df6
x
y 2:db815d6d32e6
test missing revisions
$ echo "92
5
d80f479bc
z
"
> .hg/bookmarks
$ hg book
no bookmarks set
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