[Cl-darcs-cvs] r175 - cl-darcs/trunk

mhenoch at common-lisp.net mhenoch at common-lisp.net
Wed Mar 5 09:39:54 UTC 2008


Author: mhenoch
Date: Wed Mar  5 04:39:54 2008
New Revision: 175

Modified:
   cl-darcs/trunk/cmdline.lisp
Log:
Make FIND-REPO handle its error case properly.
FINISH-OUTPUT before reading answers in "record".


Modified: cl-darcs/trunk/cmdline.lisp
==============================================================================
--- cl-darcs/trunk/cmdline.lisp	(original)
+++ cl-darcs/trunk/cmdline.lisp	Wed Mar  5 04:39:54 2008
@@ -114,10 +114,11 @@
   (if (fad:directory-exists-p (upath-subdir dir '("_darcs")))
       (fad:directory-exists-p dir)	;get directory truename
       (let ((parent-dir (ignore-errors
-			  (merge-pathnames 
-			   (make-pathname :directory '(:relative :up))
-			   dir))))
-	(if parent-dir
+			  (fad:directory-exists-p
+			   (merge-pathnames 
+			    (make-pathname :directory '(:relative :up))
+			    dir)))))
+	(if (and parent-dir (not (equal dir parent-dir)))
 	    (find-repo parent-dir)
 	    (error "Not in a darcs repo.")))))
 
@@ -245,10 +246,12 @@
 		       ;; XXX: other ways to indicate author
 		       (progn
 			 (format *query-io* "~&Who is the author? ")
+			 (finish-output *query-io*)
 			 (read-line *query-io*))))
 	   (patch-name (or patch-name
 			   (progn
 			     (format *query-io* "~&What is the patch name? ")
+			     (finish-output *query-io*)
 			     (read-line *query-io*))))
 	   (files (mapcar
 		   (lambda (file)



More information about the Cl-darcs-cvs mailing list