##// END OF EJS Templates
bookmarks: catch the proper exception for missing revisions...
Matt Mackall -
r16573:5983de86 2.2.1 stable
parent child Browse files
Show More
@@ -7,7 +7,7 b''
7
7
8 from mercurial.i18n import _
8 from mercurial.i18n import _
9 from mercurial.node import hex
9 from mercurial.node import hex
10 from mercurial import encoding, error, util
10 from mercurial import encoding, util
11 import errno, os
11 import errno, os
12
12
13 def valid(mark):
13 def valid(mark):
@@ -36,7 +36,7 b' def read(repo):'
36 refspec = encoding.tolocal(refspec)
36 refspec = encoding.tolocal(refspec)
37 try:
37 try:
38 bookmarks[refspec] = repo.changelog.lookup(sha)
38 bookmarks[refspec] = repo.changelog.lookup(sha)
39 except error.RepoLookupError:
39 except LookupError:
40 pass
40 pass
41 except IOError, inst:
41 except IOError, inst:
42 if inst.errno != errno.ENOENT:
42 if inst.errno != errno.ENOENT:
@@ -371,3 +371,8 b' test wrongly formated bookmark'
371 * Z 3:125c9a1d6df6
371 * Z 3:125c9a1d6df6
372 x y 2:db815d6d32e6
372 x y 2:db815d6d32e6
373
373
374 test missing revisions
375
376 $ echo "925d80f479bc z" > .hg/bookmarks
377 $ hg book
378 no bookmarks set
General Comments 0
You need to be logged in to leave comments. Login now