From 12d254f62973cab4ac8bcb57825d8245dc79ede2 Mon Sep 17 00:00:00 2001 From: Eduardo Cavazos Date: Sun, 2 Mar 2008 00:33:37 -0600 Subject: [PATCH 1/4] io.files tests: minor fix --- core/io/files/files-tests.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/io/files/files-tests.factor b/core/io/files/files-tests.factor index 850a30380b..92cc548d89 100755 --- a/core/io/files/files-tests.factor +++ b/core/io/files/files-tests.factor @@ -101,7 +101,7 @@ USING: tools.test io.files io threads kernel continuations ; [ ] [ "copy-tree-test" temp-file - "copy-destination" temp-file copy-tree-to + "copy-destination" temp-file copy-tree-into ] unit-test [ "Foobar" ] [ @@ -109,7 +109,7 @@ USING: tools.test io.files io threads kernel continuations ; ] unit-test [ ] [ - "copy-destination/copy-tree-test/a/b/c/d" temp-file "" temp-file copy-file-to + "copy-destination/copy-tree-test/a/b/c/d" temp-file "" temp-file copy-file-into ] unit-test [ "Foobar" ] [ From 67eade4a296a617d2ad7e82d010fb3ff5a5d8186 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 2 Mar 2008 18:49:04 -0500 Subject: [PATCH 2/4] Fix refresh-all --- core/vocabs/loader/loader.factor | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/vocabs/loader/loader.factor b/core/vocabs/loader/loader.factor index 57743ce9e1..acc6c783a5 100755 --- a/core/vocabs/loader/loader.factor +++ b/core/vocabs/loader/loader.factor @@ -180,8 +180,7 @@ SYMBOL: sources-changed? [ t sources-changed? set-global ] "vocabs.loader" add-init-hook : refresh-all ( -- ) - sources-changed? get-global - [ "" refresh f sources-changed? set-global ] when ; + "" refresh f sources-changed? set-global ; GENERIC: (load-vocab) ( name -- vocab ) From 151c62d609d1b5437e0bb824e7be5a36a23ff53b Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 2 Mar 2008 18:51:35 -0500 Subject: [PATCH 3/4] Fix bootstrap.image.upload --- extra/bootstrap/image/upload/upload.factor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extra/bootstrap/image/upload/upload.factor b/extra/bootstrap/image/upload/upload.factor index 110547d963..084f30a103 100755 --- a/extra/bootstrap/image/upload/upload.factor +++ b/extra/bootstrap/image/upload/upload.factor @@ -8,7 +8,7 @@ SYMBOL: upload-images-destination : destination ( -- dest ) upload-images-destination get - "slava@/var/www/factorcode.org/w/images/latest/" + "slava@/var/www/factorcode.org/newsite/images/latest/" or ; : checksums "checksums.txt" temp-file ; From e555c00287126c92193fddeb5cfec72a688c4967 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Mon, 3 Mar 2008 02:22:27 -0600 Subject: [PATCH 4/4] Fix alarms bug --- extra/alarms/alarms-tests.factor | 17 +++++++++++++++++ extra/alarms/alarms.factor | 5 ++--- 2 files changed, 19 insertions(+), 3 deletions(-) create mode 100755 extra/alarms/alarms-tests.factor diff --git a/extra/alarms/alarms-tests.factor b/extra/alarms/alarms-tests.factor new file mode 100755 index 0000000000..1af851c9c6 --- /dev/null +++ b/extra/alarms/alarms-tests.factor @@ -0,0 +1,17 @@ +IN: alarms.tests +USING: alarms kernel calendar sequences tools.test threads +concurrency.count-downs ; + +[ ] [ + 1 + { f } clone 2dup + [ first cancel-alarm count-down ] 2curry 1 seconds later + swap set-first + await +] unit-test + +[ ] [ + [ + [ resume ] curry instant later drop + ] "test" suspend drop +] unit-test diff --git a/extra/alarms/alarms.factor b/extra/alarms/alarms.factor index d008b7b462..1ccfdcbd30 100755 --- a/extra/alarms/alarms.factor +++ b/extra/alarms/alarms.factor @@ -37,8 +37,8 @@ SYMBOL: alarm-thread register-alarm ; : call-alarm ( alarm -- ) - dup alarm-quot try dup alarm-entry box> drop + dup alarm-quot try dup alarm-interval [ reschedule-alarm ] [ drop ] if ; : (trigger-alarms) ( alarms now -- ) @@ -46,8 +46,7 @@ SYMBOL: alarm-thread 2drop ] [ over heap-peek drop over alarm-expired? [ - over heap-pop drop call-alarm - (trigger-alarms) + over heap-pop drop call-alarm (trigger-alarms) ] [ 2drop ] if