# HG changeset patch # User Jan Vrany # Date 1416175125 0 # Node ID 395a5253c3d4ec8b794185ebcab2cf5d88d897c1 # Parent 14d868f983a90151fff775d8fa7df156b1a3de8f Fixed date (Timestamp) parsing after changes in Timestamp 1.159 Cherry-picked from 0c2c8eb5df33. diff -r 14d868f983a9 -r 395a5253c3d4 mercurial/HGCommandParser.st --- a/mercurial/HGCommandParser.st Thu Jul 31 09:56:40 2014 +0100 +++ b/mercurial/HGCommandParser.st Sun Nov 16 21:58:45 2014 +0000 @@ -274,22 +274,27 @@ ! parseDate - | ts | + | ts c | ts := Timestamp readIso8601FormatFrom:stream. - (stream peek == $+ or:[stream peek == $-]) ifFalse:[ - self error:'Timezone expected, ' , stream peek , ' found' + c := stream peek. + c == Character space ifTrue:[ + stream next. + c := stream peek. + ]. + (c == $+ or:[c == $-]) ifFalse:[ + self error:'Cannot read timezone: ''+'' or ''-'' expected, ''' , c , ''' found' ]. stream next. 4 timesRepeat:[ - ('0123456789' includes: stream peek) ifFalse:[ - self error:'Timezone expected, ' , stream peek , ' found' + ('0123456789' includes: (c := stream peek)) ifFalse:[ + self error:'Cannot read timezone: digit expected, ''' , c , ''' found' ]. stream next. ]. ^ts "Created: / 13-11-2012 / 10:22:46 / Jan Vrany " - "Modified: / 13-11-2012 / 17:28:44 / Jan Vrany " + "Modified: / 06-11-2014 / 10:44:49 / Jan Vrany " ! parseInteger