--- 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 <jan.vrany@fit.cvut.cz>"
!
+merge
+ ^merge new
+
+ "Created: / 14-01-2013 / 16:03:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
mv
^mv new
@@ -340,6 +360,12 @@
"Created: / 15-11-2012 / 00:06:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+resolve__list
+ ^resolve__list new
+
+ "Created: / 14-01-2013 / 16:42:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
showconfig
^showconfig new
@@ -982,6 +1008,60 @@
"Modified: / 05-12-2012 / 23:51:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!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 <jan.vrany@fit.cvut.cz>"
+!
+
+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 <jan.vrany@fit.cvut.cz>"
+!
+
+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 <jan.vrany@fit.cvut.cz>"
+! !
+
!HGCommand::mv methodsFor:'accessing'!
destination
@@ -1134,6 +1214,31 @@
"Modified: / 15-11-2012 / 00:38:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+!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 <jan.vrany@fit.cvut.cz>"
+!
+
+command
+ ^'resolve'
+
+ "Created: / 14-01-2013 / 16:50:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+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 <jan.vrany@fit.cvut.cz>"
+! !
+
!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 <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-01-2013 / 16:00:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!HGCommand::version methodsFor:'private'!