diff -r af5fea76e6ed -r 5acd6d915c77 mercurial/HGCommand.st --- a/mercurial/HGCommand.st Fri Feb 07 11:02:59 2014 +0100 +++ b/mercurial/HGCommand.st Sun Feb 09 19:36:58 2014 +0000 @@ -83,7 +83,7 @@ ! HGCommand subclass:#log - instanceVariableNames:'start stop path childrenOnly revsets' + instanceVariableNames:'start stop path childrenOnly idsOnly revsets limit' classVariableNames:'' poolDictionaries:'' privateIn:HGCommand @@ -531,7 +531,7 @@ errors nextPut: anException. "Created: / 04-02-2013 / 21:29:41 / Jan Vrany " - "Modified: / 05-03-2013 / 19:32:34 / Jan Vrany " + "Modified: / 09-02-2014 / 19:28:16 / Jan Vrany " ! signal @@ -712,7 +712,7 @@ ! command - "Returns the git 'command' option, i.e. commit, + "Returns the hg 'command' option, i.e. commit, push, pull, ..." ^self class nameWithoutPrefix @@ -724,7 +724,7 @@ "Created: / 11-05-2011 / 07:58:27 / Jan Vrany " "Modified (format): / 27-12-2011 / 15:47:17 / dundee" "Modified: / 30-09-2012 / 23:37:06 / Jan Vrany " - "Modified (comment): / 17-10-2012 / 13:25:58 / Jan Vrany " + "Modified (comment): / 08-02-2014 / 11:41:10 / Jan Vrany " ! executable @@ -1184,8 +1184,6 @@ "Modified: / 08-03-2013 / 19:35:17 / Jan Vrany " ! ! - - !HGCommand::locate methodsFor:'accessing'! revision @@ -1228,6 +1226,22 @@ childrenOnly := aBoolean. ! +idsOnly + ^ idsOnly +! + +idsOnly:aBoolean + idsOnly := aBoolean. +! + +limit + ^ limit +! + +limit:anInteger + limit := anInteger. +! + path ^ path ! @@ -1260,6 +1274,7 @@ | template | + template := HGCommandParser templateLog. path isNil ifTrue:[ revsets isEmptyOrNil ifTrue:[ self error:'No revisions given'. @@ -1268,10 +1283,11 @@ stream nextPut:'--rev'. stream nextPut:revset asString ]. - template := HGCommandParser templateLog. ] ifFalse:[ stream nextPut: '--follow'. - template := HGCommandParser templateLogFile. + ]. + idsOnly == true ifTrue:[ + template := HGCommandParser templateLogIdsOnly. ]. childrenOnly == true ifTrue:[ @@ -1282,13 +1298,27 @@ nextPut:'--debug'; nextPut:'--template'; nextPut:template. + limit notNil ifTrue:[ + stream + nextPut: '-l'; + nextPut: limit printString + ]. path notNil ifTrue:[ stream nextPut: path. ]. "Created: / 13-11-2012 / 09:05:16 / Jan Vrany " - "Modified: / 22-01-2013 / 16:16:10 / Jan Vrany " + "Modified: / 08-02-2014 / 22:22:36 / Jan Vrany " +! + +parseError:stream + "Parses output of 'hg' command, i.e. commit, log, update, checkout, + etc." + + ^ (self parserOn: stream) parseErrorLog. + + "Created: / 09-02-2014 / 10:22:38 / Jan Vrany " ! parseOutput:stream @@ -1298,12 +1328,12 @@ childrenOnly == true ifTrue:[ ^ (self parserOn:stream) parseCommandLogChildren. ]. - ^ path isNil + ^ idsOnly ~~ true ifTrue:[ (self parserOn:stream) parseCommandLog ] - ifFalse:[ (self parserOn:stream) parseCommandLogFile ] + ifFalse:[ (self parserOn:stream) parseCommandLogIdsOnly ] "Created: / 13-11-2012 / 09:05:47 / Jan Vrany " - "Modified: / 05-12-2012 / 23:51:29 / Jan Vrany " + "Modified: / 08-02-2014 / 22:12:19 / Jan Vrany " ! ! !HGCommand::merge methodsFor:'accessing'!