diff -r 5b8836e39cbc -r 7516fdf761f8 mercurial/HGCommand.st --- a/mercurial/HGCommand.st Sun Jul 06 11:31:48 2014 +0100 +++ b/mercurial/HGCommand.st Sun Jul 06 16:56:41 2014 +0100 @@ -1164,6 +1164,10 @@ | pipe output pid environment sema args sout exec | + destination notNil ifTrue:[ + ^ super execute. + ]. + pipe := NonPositionableExternalStream makePipe. output := pipe first. @@ -1183,9 +1187,7 @@ ] ]. - sout := destination notNil - ifTrue:[destination asFilename writeStream] - ifFalse:[pipe second]. + sout := pipe second. sema := Semaphore new name: 'Waiting for hg command to finish'. exec := [ pid := OperatingSystem exec:(self executable) withArguments:args @@ -1214,12 +1216,10 @@ output close. ^ self. ]. - ^destination notNil - ifTrue:[sema wait. nil] - ifFalse:[output]. + ^ output. "Created: / 17-11-2012 / 00:13:37 / Jan Vrany " - "Modified: / 04-12-2012 / 10:10:57 / Jan Vrany " + "Modified: / 06-07-2014 / 16:46:30 / Jan Vrany " ! ! !HGCommand::cat methodsFor:'private'! @@ -1233,17 +1233,24 @@ revision isNil ifTrue:[ self error:'No revision specified' ]. + destination notNil ifTrue:[ + stream nextPut: '-o'. + stream nextPut: destination asFilename pathName. + ]. + stream nextPut:'--rev'; nextPut: revision asString. stream nextPut:path - "Modified: / 17-11-2012 / 00:09:28 / Jan Vrany " + "Modified: / 06-07-2014 / 16:45:27 / Jan Vrany " ! parseOutput:stream "Parses output of 'hg' command, i.e. commit, log, update, checkout, etc." - ^ self shouldImplement + "/ Nothing to do... + + "Modified: / 06-07-2014 / 16:53:20 / Jan Vrany " ! ! !HGCommand::clone methodsFor:'accessing'!