mercurial/HGCommandParser.st
changeset 865 c2e908e7dadc
parent 859 d990a97b26a4
child 866 8a885a75daa9
equal deleted inserted replaced
864:c854577212b8 865:c2e908e7dadc
  1045     statusesAndPaths := OrderedCollection new.
  1045     statusesAndPaths := OrderedCollection new.
  1046     [ stream atEnd ] whileFalse:[
  1046     [ stream atEnd ] whileFalse:[
  1047         | status path |
  1047         | status path |
  1048 
  1048 
  1049         stream peek == Character space ifTrue:[
  1049         stream peek == Character space ifTrue:[
  1050             statusesAndPaths last first"status" isAdded ifTrue:[
  1050             | last |
       
  1051 
       
  1052             last := statusesAndPaths last first.
       
  1053             (last isAdded or:[last isModified]) ifTrue:[
  1051                 stream next.
  1054                 stream next.
  1052                 self expectSpace.
  1055                 self expectSpace.
  1053                 path := self nextLine.
  1056                 path := self nextLine.
  1054                 statusesAndPaths last at:1 put: (HGStatus copied source: path)
  1057                 statusesAndPaths last at:1 put: (HGStatus copied source: path)
  1055             ] ifFalse:[
  1058             ] ifFalse:[
  1063         ].
  1066         ].
  1064     ].
  1067     ].
  1065     ^ statusesAndPaths
  1068     ^ statusesAndPaths
  1066 
  1069 
  1067     "Created: / 23-10-2012 / 10:57:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1070     "Created: / 23-10-2012 / 10:57:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1068     "Modified: / 21-11-2012 / 01:09:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1071     "Modified: / 10-01-2019 / 21:04:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
  1069 !
  1072 !
  1070 
  1073 
  1071 parseCommandUpdate
  1074 parseCommandUpdate
  1072     "Parse output of 'hg update' command. "
  1075     "Parse output of 'hg update' command. "
  1073 
  1076