mercurial/HGCommand.st
changeset 102 16bc16d9e6d5
parent 95 83ee62dc9491
child 105 25e8ff9d2a31
--- a/mercurial/HGCommand.st	Fri Nov 23 23:12:15 2012 +0000
+++ b/mercurial/HGCommand.st	Fri Nov 23 23:13:22 2012 +0000
@@ -958,64 +958,16 @@
     revision := something.
 ! !
 
-!HGCommand::update methodsFor:'executing'!
-
-execute
-    "
-    A hacked version of #execute that returns a open read
-    stream to read directly from 'hg cat' stdout...
-    
-    "
-
-    | pipe output pid environment sema args |
-
-    pipe := NonPositionableExternalStream makePipe.
-    output := pipe first.
-
-    OperatingSystem isUNIXlike ifTrue:[
-        environment := OperatingSystem getEnvironment copy.
-    ] ifFalse:[
-        environment := Dictionary new.
-    ].
-    environment at:'LANG' put:'C'.
-
-    args := self arguments.
-    OperatingSystem isMSWINDOWSlike ifTrue:[
-        args := String streamContents:[:s|
-            args 
-                do:[:each | s nextPut:$"; nextPutAll: each; nextPut: $"]
-                separatedBy: [ s space ]
-        ]
-    ].
-
-    sema := Semaphore new name: 'Waiting for hg command to finish'.
-    pid := OperatingSystem exec:(self executable) withArguments:args
-            environment:environment
-            fileDescriptors:{0 . pipe second fileDescriptor . pipe second fileDescriptor}
-            fork:true 
-            newPgrp:false 
-            inDirectory:self workingDirectory.
-    pipe second close.
-    pid isNil ifTrue:[
-        HGCommandError raiseErrorString: 'cannot execute hg command'.
-        output close.
-        ^ self.
-    ].
-    ^output
-
-    "Created: / 17-11-2012 / 00:13:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
 !HGCommand::update methodsFor:'private'!
 
 argumentsCommandOn:stream
     "Called to get command specific options"
 
-    revision isNil ifTrue:[
+    revision notNil ifTrue:[
         stream nextPut:'--rev'; nextPut: revision asString.
     ].
 
-    "Modified: / 21-11-2012 / 00:18:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 23-11-2012 / 23:08:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 parse:stream