diff -r 78124cee58da -r 1b0ddad9770e mercurial/HGCommand.st --- a/mercurial/HGCommand.st Mon Jan 14 14:39:05 2013 +0000 +++ b/mercurial/HGCommand.st Mon Jan 14 17:01:55 2013 +0000 @@ -63,6 +63,13 @@ privateIn:HGCommand ! +HGCommand subclass:#merge + instanceVariableNames:'revision tool' + classVariableNames:'' + poolDictionaries:'' + privateIn:HGCommand +! + HGCommand subclass:#mv instanceVariableNames:'source destination' classVariableNames:'' @@ -91,6 +98,13 @@ privateIn:HGCommand ! +HGCommand subclass:#resolve__list + instanceVariableNames:'' + classVariableNames:'' + poolDictionaries:'' + privateIn:HGCommand +! + HGCommand subclass:#showconfig instanceVariableNames:'key' classVariableNames:'' @@ -316,6 +330,12 @@ "Created: / 13-11-2012 / 09:00:52 / Jan Vrany " ! +merge + ^merge new + + "Created: / 14-01-2013 / 16:03:33 / Jan Vrany " +! + mv ^mv new @@ -340,6 +360,12 @@ "Created: / 15-11-2012 / 00:06:23 / Jan Vrany " ! +resolve__list + ^resolve__list new + + "Created: / 14-01-2013 / 16:42:17 / Jan Vrany " +! + showconfig ^showconfig new @@ -982,6 +1008,60 @@ "Modified: / 05-12-2012 / 23:51:29 / Jan Vrany " ! ! +!HGCommand::merge methodsFor:'accessing'! + +revision + ^ revision +! + +revision:something + revision := something. +! + +tool + ^ tool +! + +tool:aString + tool := aString. +! ! + +!HGCommand::merge methodsFor:'private'! + +argumentsCommandOn:stream + "Called to get command specific options" + + revision notNil ifTrue:[ + stream nextPut:'--rev'; nextPut: revision asString. + ]. + + revision notNil ifTrue:[ + stream nextPut:'--tool'; nextPut: tool asString. + ]. + + "Modified: / 14-01-2013 / 15:40:07 / Jan Vrany " +! + +parse:stream + "Parses output of 'hg' command, i.e. commit, log, update, checkout, + etc." + + ^ (HGCommandParser on: stream) parseCommandMerge + + "Modified: / 14-01-2013 / 16:00:40 / Jan Vrany " +! + +status: status result: result + "Called when hg command finishes, passing it's status and result from parser" + + (status code ~~ 0 and:[status code ~~ 1]) ifTrue:[ + HGCommandError raiseErrorString: ('hg command failed (status %1)' expandMacrosWith: status code) . + ]. + ^result + + "Created: / 14-01-2013 / 16:05:34 / Jan Vrany " +! ! + !HGCommand::mv methodsFor:'accessing'! destination @@ -1134,6 +1214,31 @@ "Modified: / 15-11-2012 / 00:38:52 / Jan Vrany " ! ! +!HGCommand::resolve__list methodsFor:'private'! + +argumentsCommandOn:stream + "Called to get command specific options" + + stream nextPut: '--list' + + "Modified: / 14-01-2013 / 16:43:00 / Jan Vrany " +! + +command + ^'resolve' + + "Created: / 14-01-2013 / 16:50:15 / Jan Vrany " +! + +parse:stream + "Parses output of 'hg' command, i.e. commit, log, update, checkout, + etc." + + ^ (HGCommandParser on: stream) parseCommandResolveList + + "Modified: / 14-01-2013 / 16:43:24 / Jan Vrany " +! ! + !HGCommand::showconfig methodsFor:'accessing'! argumentsCommandOn:stream @@ -1208,9 +1313,9 @@ "Parses output of 'hg' command, i.e. commit, log, update, checkout, etc." - ^ nil + ^ (HGCommandParser on: stream) parseCommandUpdate - "Modified: / 21-11-2012 / 00:19:22 / Jan Vrany " + "Modified: / 14-01-2013 / 16:00:49 / Jan Vrany " ! ! !HGCommand::version methodsFor:'private'!