##// END OF EJS Templates
revlog: map rev(wdirid) to WdirUnsupported exception...
Yuya Nishihara -
r32657:7b17f9de default
parent child Browse files
Show More
@@ -26,6 +26,7 from .node import (
26 26 hex,
27 27 nullid,
28 28 nullrev,
29 wdirid,
29 30 wdirrev,
30 31 )
31 32 from .i18n import _
@@ -416,6 +417,8 class revlog(object):
416 417 raise
417 418 except RevlogError:
418 419 # parsers.c radix tree lookup failed
420 if node == wdirid:
421 raise error.WdirUnsupported
419 422 raise LookupError(node, self.indexfile, _('no node'))
420 423 except KeyError:
421 424 # pure python cache lookup failed
@@ -430,6 +433,8 class revlog(object):
430 433 if v == node:
431 434 self._nodepos = r - 1
432 435 return r
436 if node == wdirid:
437 raise error.WdirUnsupported
433 438 raise LookupError(node, self.indexfile, _('no node'))
434 439
435 440 # Accessors for index entries.
@@ -190,6 +190,8 def callcatch(ui, func):
190 190 if inst.hint:
191 191 ui.warn(_("(%s)\n") % inst.hint)
192 192 return 1
193 except error.WdirUnsupported:
194 ui.warn(_("abort: working directory revision cannot be specified\n"))
193 195 except error.Abort as inst:
194 196 ui.warn(_("abort: %s\n") % inst)
195 197 if inst.hint:
@@ -110,6 +110,12 Test max chain len
110 110 7 6 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 2 (glob)
111 111 8 7 -1 ??? ??? ??? ??? ??? 0 ??? ???? ? 1 3 (glob)
112 112
113 Test WdirUnsupported exception
114
115 $ hg debugdata -c ffffffffffffffffffffffffffffffffffffffff
116 abort: working directory revision cannot be specified
117 [255]
118
113 119 Test cache warming command
114 120
115 121 $ rm -rf .hg/cache/
General Comments 0
You need to be logged in to leave comments. Login now