DiffListUtility.st
changeset 14334 e54a95bfa77b
parent 13340 7a295f0992df
child 15566 184cea584be5
child 18025 b805418f6bdf
--- a/DiffListUtility.st	Thu May 08 16:20:05 2014 +0200
+++ b/DiffListUtility.st	Thu May 08 19:49:06 2014 +0200
@@ -135,7 +135,7 @@
      diffList diffTemplate diffCmd|
 
     diffTemplate := self diffCommand.
-    diffTemplate isNil ifTrue:[
+    diffTemplate isEmptyOrNil ifTrue:[
         "/ self warn:'no diff command available'.
         ^ nil
     ].
@@ -161,6 +161,9 @@
 
         stream := PipeStream readingFrom:diffCmd.
         stream isNil ifTrue:[
+            "this code is not reached in win32.
+             PipeStream starts a cmd.exe, which is always successful
+             at the first place and fails later"
             stream := PipeStream readingFrom:('support' asFilename / diffCmd).
             stream isNil ifTrue:[
                 self error:'cannot execute diff' mayProceed:true.
@@ -172,7 +175,11 @@
         (stream readWaitWithTimeout:10) ifTrue:[
             "/ timeout
             stream close.
-            self error:'cannot execute diff (timeout)' mayProceed:true.
+            (stream exitStatus notNil and:[stream exitStatus isError]) ifTrue:[
+                self error:'cannot execute diff (command error)' mayProceed:true.
+            ] ifFalse:[
+                self error:'cannot execute diff (timeout)' mayProceed:true.
+            ].
             ^ nil.
         ].
 
@@ -207,10 +214,10 @@
 !DiffListUtility class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DiffListUtility.st,v 1.8 2013-08-21 13:56:32 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DiffListUtility.st,v 1.9 2014-05-08 17:49:06 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/DiffListUtility.st,v 1.8 2013-08-21 13:56:32 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DiffListUtility.st,v 1.9 2014-05-08 17:49:06 stefan Exp $'
 ! !