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

mhenoch at common-lisp.net mhenoch at common-lisp.net
Sat Jul 15 11:40:13 UTC 2006


Author: mhenoch
Date: Sat Jul 15 07:40:12 2006
New Revision: 34

Modified:
   cl-darcs/trunk/pull.lisp
Log:
Use "defaultrepo" preference if no repo specified to pull from


Modified: cl-darcs/trunk/pull.lisp
==============================================================================
--- cl-darcs/trunk/pull.lisp	(original)
+++ cl-darcs/trunk/pull.lisp	Sat Jul 15 07:40:12 2006
@@ -16,9 +16,15 @@
 
 (in-package :darcs)
 
-(defun pull (ourrepo theirrepo)
-  "Pull new patches from THEIRREPO into OURREPO."
+(defun pull (ourrepo &optional theirrepo)
+  "Pull new patches from THEIRREPO into OURREPO.
+If THEIRREPO is not specified, use default repositiory specified
+in preferences."
   (setf ourrepo (fad:pathname-as-directory ourrepo))
+  (unless theirrepo
+    (setf theirrepo (car (get-preflist ourrepo "defaultrepo")))
+    (unless theirrepo
+      (error "No remote repositiory specified, and no default available.")))
   (let ((our-patchinfo (read-repo-patch-list ourrepo))
 	(their-patchinfo (read-repo-patch-list theirrepo)))
     (multiple-value-bind (common only-ours only-theirs)



More information about the Cl-darcs-cvs mailing list