/[meta-cvs]/meta-cvs/F-26D2A2DCE1CF180F943606C59DC63A51.lisp
ViewVC logotype

Diff of /meta-cvs/F-26D2A2DCE1CF180F943606C59DC63A51.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by kaz, Sat Jul 6 17:15:01 2002 UTC revision 1.10 by kaz, Mon Jul 8 04:34:49 2002 UTC
# Line 86  Line 86 
86        ((4) 85/100)        ((4) 85/100)
87        (otherwise 80/100))))        (otherwise 80/100))))
88    
 (defun added-removed (old-paths new-paths  
                       &key (key-old #'values) (key-new #'values))  
   (let (added-files removed-files stable-files)  
     (let ((old-iter old-paths)  
           (new-iter new-paths))  
       (symbol-macrolet ((old-key (funcall key-old (first old-iter)))  
                         (new-key (funcall key-new (first new-iter))))  
         (flet ((inc-old ()  
                  (push (first old-iter) removed-files)  
                  (setf old-iter (rest old-iter)))  
                (inc-new ()  
                  (push (first new-iter) added-files)  
                  (setf new-iter (rest new-iter))))  
           (loop  
             (cond  
               ((and (null old-iter) (null new-iter))  
                  (return))  
               ((null old-iter)  
                  (inc-new))  
               ((null new-iter)  
                  (inc-old))  
               ((string< old-key new-key)  
                  (inc-old))  
               ((string= new-key old-key)  
                  (push (first old-iter) stable-files)  
                  (setf old-iter (rest old-iter))  
                  (setf new-iter (rest new-iter)))  
               (t (inc-new)))))))  
     (values added-files removed-files stable-files)))  
   
89  (defun determine-common-words (common-hash added-or-removed-files)  (defun determine-common-words (common-hash added-or-removed-files)
90    (dolist (file added-or-removed-files common-hash)    (dolist (file added-or-removed-files common-hash)
91      (maphash #'(lambda (key value)      (maphash #'(lambda (key value)
# Line 177  Line 147 
147                                      (list* object (abstract-to-real-path name)                                      (list* object (abstract-to-real-path name)
148                                             stuff))) old-paths))                                             stuff))) old-paths))
149    
       (setf old-paths (sort old-paths #'string< :key #'second))  
   
150        (for-each-file-info (fi *this-dir*)        (for-each-file-info (fi *this-dir*)
151          (let* ((path (canonicalize-path (file-name fi))))          (let* ((path (canonicalize-path (file-name fi))))
152            (cond            (cond
# Line 188  Line 156 
156                (when (path-equal path *mcvs-dir*)                (when (path-equal path *mcvs-dir*)
157                  (skip))))))                  (skip))))))
158    
159        (setf new-paths (sort new-paths #'string<))        (multiple-value-setq (stable-files removed-files added-files)
160                               (intersection-difference old-paths new-paths
161        (multiple-value-setq (added-files removed-files stable-files)                                                      :key1 #'second
162                             (added-removed old-paths new-paths                                                      :test #'equal))
                                           :key-old #'second))  
163    
164        (chatter-terse "Analyzing ~a added files.~%" (length added-files))        (chatter-terse "Analyzing ~a added files.~%" (length added-files))
165        (setf added-files (mapcar #'(lambda (name)        (setf added-files (mapcar #'(lambda (name)

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.5