--- a/mercurial/HGCommandParser.st Tue Nov 27 21:00:31 2012 +0000
+++ b/mercurial/HGCommandParser.st Tue Nov 27 21:42:13 2012 +0000
@@ -25,6 +25,12 @@
!HGCommandParser class methodsFor:'templates'!
+templateHeads
+ ^'{rev}:{node}\n'
+
+ "Created: / 27-11-2012 / 21:25:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
templateLog
^
'{rev}:{node}
@@ -248,6 +254,21 @@
"Modified: / 27-11-2012 / 20:21:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+parseCommandHeads
+ "Parse output of 'hg heads' command, assuming the template given
+ was HGCommandParser templateHeads. Return a list of HGChangesetId."
+
+ | ids |
+
+ ids := OrderedCollection new.
+ [ stream atEnd ] whileFalse:[
+ ids add: self parseNodeId. self expectLineEnd.
+ ].
+ ^ids
+
+ "Created: / 27-11-2012 / 21:24:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
parseCommandLocate
"Filenames are 0-byte separated. Yeah, Mercurial is easy
to parse"
@@ -272,11 +293,12 @@
parseCommandLog
"Parse output of 'hg log' command, assuming the template given
- was HGCommandParser templateLog. Return a list of HGRevision."
+ was HGCommandParser templateLog. Return a list of HGChangeset."
^self parseLog
"Created: / 13-11-2012 / 09:09:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 27-11-2012 / 21:24:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
parseCommandStatus