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

mhenoch at common-lisp.net mhenoch at common-lisp.net
Tue Jul 11 16:07:38 UTC 2006


Author: mhenoch
Date: Tue Jul 11 12:07:37 2006
New Revision: 21

Modified:
   cl-darcs/trunk/commute.lisp
Log:
Add default method for commute.


Modified: cl-darcs/trunk/commute.lisp
==============================================================================
--- cl-darcs/trunk/commute.lisp	(original)
+++ cl-darcs/trunk/commute.lisp	Tue Jul 11 12:07:37 2006
@@ -6,6 +6,11 @@
 P1-NEW has the same effect as applying P1 and then P2.
 If commutations fails, return nil."))
 
+(defmethod commute ((p2 patch) (p1 patch))
+  "Default method prints a warning and returns nil."
+  (warn "No method defined for commuting ~A and ~A." p2 p1)
+  nil)
+
 (defmethod commute :around ((p2 file-patch) (p1 file-patch))
   "If P1 and P2 change different files, commutation is trivial."
   (let ((p1-file (patch-filename p1))



More information about the Cl-darcs-cvs mailing list