Commit 17a243c8 authored by Eric Timmons's avatar Eric Timmons
Browse files

Add (setf project-repo)

parent ba158458
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -192,3 +192,11 @@ instantiated."))
    (setf (slot-value project slot-name)
          (awhen repo-description
            (make-repo-from-description it)))))

(defmethod (setf project-repo) (new-repo project)
  ;; TODO: Make a repo-equal function. This will modify the metadata if the
  ;; plist keys aren't in the same order.
  (let ((repo-description (repo-to-description new-repo)))
    (unless (equal repo-description (metadata-value project :repo))
      (setf (metadata-value project :repo) repo-description)))
  (setf (slot-value project 'repo) new-repo))