mercurial/HGCommand.st
changeset 562 e694ffae649b
parent 511 ad2f56473052
child 563 6104cd9f44f1
--- a/mercurial/HGCommand.st	Mon Aug 24 16:23:15 2015 +0100
+++ b/mercurial/HGCommand.st	Tue Aug 25 09:03:57 2015 +0100
@@ -18,6 +18,8 @@
 "
 "{ Package: 'stx:libscm/mercurial' }"
 
+"{ NameSpace: Smalltalk }"
+
 Object subclass:#HGCommand
 	instanceVariableNames:'workingDirectory result error errors blocker errorReader
 		outputReader'
@@ -160,6 +162,13 @@
 	privateIn:HGCommand
 !
 
+HGCommand subclass:#share
+	instanceVariableNames:'source destination update'
+	classVariableNames:''
+	poolDictionaries:''
+	privateIn:HGCommand
+!
+
 HGCommand subclass:#showconfig
 	instanceVariableNames:'key'
 	classVariableNames:''
@@ -659,6 +668,12 @@
     "Created: / 14-01-2013 / 16:42:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+share
+    ^share new
+
+    "Created: / 25-08-2015 / 01:50:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 showconfig
     ^showconfig new
 
@@ -1647,7 +1662,6 @@
     "Created: / 13-02-2014 / 12:36:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-
 !HGCommand::locate methodsFor:'accessing'!
 
 revision
@@ -2184,6 +2198,60 @@
     "Modified: / 14-01-2013 / 16:43:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!HGCommand::share methodsFor:'accessing'!
+
+destination
+    ^ destination
+!
+
+destination:aString
+    destination := aString.
+!
+
+source
+    ^ source
+!
+
+source:aString
+    source := aString.
+!
+
+update
+    ^ update
+!
+
+update:aBoolean
+    update := aBoolean.
+! !
+
+!HGCommand::share methodsFor:'private'!
+
+argumentsCommandOn:stream
+    "Called to get command specific options"
+    update == false ifTrue:[
+        stream nextPut:'--noupdate'.
+    ].
+    stream nextPut: '--bookmarks'.
+    stream nextPut: source; nextPut: destination.
+
+    "Created: / 01-10-2012 / 00:04:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 25-08-2015 / 01:46:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+argumentsGlobalOn: stream
+    stream nextPut: '--config'; nextPut:'extensions.share='
+
+    "Created: / 25-08-2015 / 01:47:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+parseOutput:stream
+    "superclass Command says that I am responsible to implement this method"
+
+    ^ nil
+
+    "Modified: / 14-11-2012 / 22:42:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !HGCommand::showconfig methodsFor:'accessing'!
 
 argumentsCommandOn:stream