#BUGFIX by cg
class: HGChangesetId
changed: #readFrom:onError:
error block's value should always be returned.
(grafted from e25fb535194016001a2cad6bb6b157ad5cf176ae)
--- a/mercurial/HGChangesetId.st Tue Jan 24 23:20:46 2017 +0000
+++ b/mercurial/HGChangesetId.st Mon Jan 23 13:56:25 2017 +0100
@@ -201,21 +201,21 @@
hashPos <= 6 ifTrue:[
hashPos to: 6 do:[:i|
stream atEnd ifTrue:[
- aBlock valueWithOptionalArgument:'Unexpected end of stream, hex digit expected'.
+ ^ aBlock valueWithOptionalArgument:'Unexpected end of stream, hex digit expected'.
].
c1 isNil ifTrue:[
c1 := stream peek.
c1 isHexDigit ifFalse:[
- aBlock valueWithOptionalArgument:'Hex digit ([0-9a-z]) expected but ', c1 , ' found'.
+ ^ aBlock valueWithOptionalArgument:'Hex digit ([0-9a-z]) expected but ', c1 , ' found'.
].
stream next.
].
stream atEnd ifTrue:[
- aBlock valueWithOptionalArgument:'Unexpected end of stream, hex digit expected'.
+ ^ aBlock valueWithOptionalArgument:'Unexpected end of stream, hex digit expected'.
].
c2 := stream peek.
c2 isHexDigit ifFalse:[
- aBlock valueWithOptionalArgument:'Hex digit ([0-9a-z]) expected but ', c1 , ' found'.
+ ^ aBlock valueWithOptionalArgument:'Hex digit ([0-9a-z]) expected but ', c1 , ' found'.
].
hash at:i put: (c1 digitValue << 4) | c2 digitValue.
hashPos := i + 1.
@@ -228,19 +228,19 @@
short := false.
hashPos to: 20 do:[:i|
stream atEnd ifTrue:[
- aBlock valueWithOptionalArgument:'Unexpected end of stream, hex digit expected'.
+ ^ aBlock valueWithOptionalArgument:'Unexpected end of stream, hex digit expected'.
].
c1 := stream peek.
c1 isHexDigit ifFalse:[
- aBlock valueWithOptionalArgument:'Hex digit ([0-9a-z]) expected but ', c1 , ' found'.
+ ^ aBlock valueWithOptionalArgument:'Hex digit ([0-9a-z]) expected but ', c1 , ' found'.
].
stream next.
stream atEnd ifTrue:[
- aBlock valueWithOptionalArgument:'Unexpected end of stream, hex digit expected'.
+ ^ aBlock valueWithOptionalArgument:'Unexpected end of stream, hex digit expected'.
].
c2 := stream peek.
c2 isHexDigit ifFalse:[
- aBlock valueWithOptionalArgument:'Hex digit ([0-9a-z]) expected but ', c1 , ' found'.
+ ^ aBlock valueWithOptionalArgument:'Hex digit ([0-9a-z]) expected but ', c1 , ' found'.
].
hash at:i put: (c1 digitValue << 4) + c2 digitValue.
stream next.
@@ -450,6 +450,6 @@
!
version_SVN
- ^ '§Id:: §'
+ ^ 'Id:: '
! !