mason: add retries in another place, and add a type declaration

Slava Pestov 2009-05-10 16:40:19 -05:00
parent cd64833360
commit 59c7e881da
2 changed files with 9 additions and 7 deletions

View File

@ -5,12 +5,12 @@ math.functions make io io.files io.pathnames io.directories
io.directories.hierarchy io.launcher io.encodings.utf8 prettyprint
combinators.short-circuit parser combinators calendar
calendar.format arrays mason.config locals system debugger fry
continuations ;
continuations strings ;
IN: mason.common
SYMBOL: current-git-id
ERROR: output-process-error output process ;
ERROR: output-process-error { output string } { process process } ;
M: output-process-error error.
[ "Process:" print process>> . nl ]

View File

@ -2,7 +2,7 @@
! See http://factorcode.org/license.txt for BSD license.
USING: arrays accessors io io.sockets io.encodings.utf8 io.files
io.launcher kernel make mason.config mason.common mason.email
mason.twitter namespaces sequences prettyprint ;
mason.twitter namespaces sequences prettyprint fry ;
IN: mason.notify
: status-notify ( input-file args -- )
@ -14,10 +14,12 @@ IN: mason.notify
target-cpu get ,
target-os get ,
] { } make prepend
[ 5 ] 2dip '[
<process>
swap >>command
swap [ +closed+ ] unless* >>stdin
_ >>command
_ [ +closed+ ] unless* >>stdin
try-output-process
] retry
] [ 2drop ] if ;
: notify-begin-build ( git-id -- )