Changeset 12948


Ignore:
Timestamp:
Oct 9, 2009, 5:31:05 PM (10 years ago)
Author:
gz
Message:

Smarter svn update (r12896)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lib/compile-ccl.lisp

    r12945 r12948  
    526526    (when full
    527527      (setq clean t kernel t reload t))
    528     (when update (update-ccl :verbose (not (eq update :quiet))))
     528    (when update
     529      (multiple-value-bind (changed conflicts new-binaries)
     530          (update-ccl :verbose (not (eq update :quiet)))
     531        (declare (ignore changed conflicts))
     532        (when new-binaries
     533          (format t "~&There are new bootstrapping binaries.  Please restart
     534the lisp and run REBUILD-CCL again.")
     535          (return-from rebuild-ccl nil))))
    529536    (when (or clean force)
    530537      ;; for better bug reports...
     
    643650(defun update-ccl (&key (verbose t))
    644651  (let* ((changed ())
     652         (new-binaries ())
    645653         (conflicts ()))
    646654    (with-output-to-string (out)
     
    686694                ;; repository versions.
    687695                (setq changed (if (or added deleted updated merged conflicts) t))
    688              
    689696                (dolist (f binaries)
    690                   (when (member f conflicts :test #'string=)
    691                     (svn-revert f)))
     697                  (cond ((member f conflicts :test #'string=)
     698                         (svn-revert f)
     699                         (setq new-binaries t))
     700                        ((or (member f updated :test #'string=)
     701                             (member f merged :test #'string=))
     702                         (setq new-binaries t))))
     703
    692704                ;; If there are any remaining conflicts, offer
    693705                ;; to revert them.
    694706                (when conflicts
    695707                  (with-preserved-working-directory ()
    696                     (cerror "Discard local changes to these files (using 'svn revert'."
    697                             "'svn update' was unable to merge local changes to the following file~p with the updated versions:~{~&~s~~}" (length conflicts) conflicts)
     708                    (cerror "Discard local changes to these files (using 'svn revert')."
     709                            "'svn update' was unable to merge local changes to the following file~p with the updated versions:~{~&~s~}" (length conflicts) conflicts)
    698710                    (dolist (c (copy-list conflicts))
    699711                      (svn-revert c))))
     
    711723                    (show-changes "Updated files" updated)
    712724                    (show-changes "Files with local changes, successfully merged" merged)))))))))
    713     (values changed conflicts)))
     725    (values changed conflicts new-binaries)))
    714726
    715727(defmacro with-preserved-working-directory ((&optional dir) &body body)
Note: See TracChangeset for help on using the changeset viewer.