Fix bad error messages in `HGChangesetId` parser
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 23 Aug 2018 10:37:24 +0100
changeset 858 dcfd093c3257
parent 851 f54518cda3e7
child 859 d990a97b26a4
Fix bad error messages in `HGChangesetId` parser The error was signalled correctly but its message was wrong / misleading (copy-paste error)
mercurial/HGChangesetId.st
--- a/mercurial/HGChangesetId.st	Sun Jul 29 03:51:29 2018 +0000
+++ b/mercurial/HGChangesetId.st	Thu Aug 23 10:37:24 2018 +0100
@@ -215,7 +215,7 @@
             ].
             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 ', c2 , ' found'.
             ].
             hash at:i put: (c1 digitValue << 4) | c2 digitValue.
             hashPos := i + 1.
@@ -240,7 +240,7 @@
             ].
             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 ', c2 , ' found'.
             ].
             hash at:i put: (c1 digitValue << 4) + c2 digitValue.
             stream next.
@@ -273,8 +273,7 @@
     "
 
     "Created: / 13-11-2012 / 16:49:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 13-07-2016 / 18:15:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified (comment): / 08-02-2018 / 08:41:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 23-08-2018 / 10:30:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGChangesetId class methodsFor:'accessing'!