From mhenoch at common-lisp.net Tue Apr 1 21:12:15 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Tue, 1 Apr 2008 16:12:15 -0500 (EST) Subject: [Cl-darcs-cvs] r180 - cl-darcs/trunk Message-ID: <20080401211215.BB4ED6D364@common-lisp.net> Author: mhenoch Date: Tue Apr 1 16:12:14 2008 New Revision: 180 Added: cl-darcs/trunk/Makefile (contents, props changed) Log: Add basic Makefile Added: cl-darcs/trunk/Makefile ============================================================================== --- (empty file) +++ cl-darcs/trunk/Makefile Tue Apr 1 16:12:14 2008 @@ -0,0 +1,14 @@ +CLISP ?= clisp +CLISP_OPTIONS ?= -i $(HOME)/.clisprc +SBCL ?= sbcl +SBCL_OPTIONS ?= --disable-debugger + +any: + @echo Use either \"$(MAKE) clisp\" or \"$(MAKE) sbcl\". + @false + +clisp: + $(CLISP) $(CLISP_OPTIONS) dump-clisp.lisp + +sbcl: + $(SBCL) $(SBCL_OPTIONS) --load dump-sbcl.lisp From mhenoch at common-lisp.net Tue Apr 1 21:26:32 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Tue, 1 Apr 2008 16:26:32 -0500 (EST) Subject: [Cl-darcs-cvs] r181 - cl-darcs/trunk Message-ID: <20080401212632.694086101F@common-lisp.net> Author: mhenoch Date: Tue Apr 1 16:26:32 2008 New Revision: 181 Modified: cl-darcs/trunk/upath.lisp Log: Fix MAKE-UPATH for short arguments Modified: cl-darcs/trunk/upath.lisp ============================================================================== --- cl-darcs/trunk/upath.lisp (original) +++ cl-darcs/trunk/upath.lisp Tue Apr 1 16:26:32 2008 @@ -31,8 +31,10 @@ (net.uri:uri path) (string - (if (or (string= path "http://" :end1 7) - (string= path "https://" :end1 8)) + (if (or (and (>= (length path) 7) + (string= path "http://" :end1 7)) + (and (>= (length path) 8) + (string= path "https://" :end1 8))) (net.uri:parse-uri path) (pathname path))))) From mhenoch at common-lisp.net Tue Apr 1 21:34:11 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Tue, 1 Apr 2008 16:34:11 -0500 (EST) Subject: [Cl-darcs-cvs] r182 - cl-darcs/trunk Message-ID: <20080401213411.1DC7C44065@common-lisp.net> Author: mhenoch Date: Tue Apr 1 16:34:10 2008 New Revision: 182 Modified: cl-darcs/trunk/get.lisp cl-darcs/trunk/upath.lisp Log: Add TRUENAME argument to UPATH-TO-STRING, and use it in GET-REPO Modified: cl-darcs/trunk/get.lisp ============================================================================== --- cl-darcs/trunk/get.lisp (original) +++ cl-darcs/trunk/get.lisp Tue Apr 1 16:34:10 2008 @@ -49,7 +49,7 @@ ;; Create directories... (ensure-directories-exist outname) (prepare-new-repo outname) - (set-default-repo outname inrepodir) + (set-default-repo outname (upath-to-string inrepodir) :truename t) (when checkpoint (format t "~&Copying checkpoint...") Modified: cl-darcs/trunk/upath.lisp ============================================================================== --- cl-darcs/trunk/upath.lisp (original) +++ cl-darcs/trunk/upath.lisp Tue Apr 1 16:34:10 2008 @@ -83,14 +83,17 @@ (open upath :direction :input :if-does-not-exist :error :element-type (if binary '(unsigned-byte 8) 'character))))) -(defun upath-to-string (upath) +(defun upath-to-string (upath &key truename) "Convert UPATH to a string. -This string can be read with MAKE-UPATH." +This string can be read with MAKE-UPATH. +When TRUENAME is provided and true, give absolute/canonical form." (ctypecase upath (string upath) (pathname - (namestring upath)) + (namestring (if truename + (truename upath) + upath))) (net.uri:uri (with-output-to-string (s) (net.uri:render-uri upath s))))) From mhenoch at common-lisp.net Tue Apr 1 21:45:39 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Tue, 1 Apr 2008 16:45:39 -0500 (EST) Subject: [Cl-darcs-cvs] r183 - cl-darcs/trunk Message-ID: <20080401214539.9AF7175138@common-lisp.net> Author: mhenoch Date: Tue Apr 1 16:45:39 2008 New Revision: 183 Modified: cl-darcs/trunk/get.lisp Log: Fix order of parentheses Modified: cl-darcs/trunk/get.lisp ============================================================================== --- cl-darcs/trunk/get.lisp (original) +++ cl-darcs/trunk/get.lisp Tue Apr 1 16:45:39 2008 @@ -49,7 +49,7 @@ ;; Create directories... (ensure-directories-exist outname) (prepare-new-repo outname) - (set-default-repo outname (upath-to-string inrepodir) :truename t) + (set-default-repo outname (upath-to-string inrepodir :truename t)) (when checkpoint (format t "~&Copying checkpoint...") From mhenoch at common-lisp.net Tue Apr 1 22:00:18 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Tue, 1 Apr 2008 17:00:18 -0500 (EST) Subject: [Cl-darcs-cvs] r184 - cl-darcs/trunk Message-ID: <20080401220018.38C132413B@common-lisp.net> Author: mhenoch Date: Tue Apr 1 17:00:17 2008 New Revision: 184 Modified: cl-darcs/trunk/upath.lisp Log: Add TRUENAME argument to MAKE-UPATH Modified: cl-darcs/trunk/upath.lisp ============================================================================== --- cl-darcs/trunk/upath.lisp (original) +++ cl-darcs/trunk/upath.lisp Tue Apr 1 17:00:17 2008 @@ -20,14 +20,18 @@ ;; file. For local files, just use pathnames. For remote files, use ;; the PURI library. (Or the real thing, if we're using ACL) -(defun make-upath (path) +(defun make-upath (path &key truename) "Turn PATH into a \"universal pathname\". If PATH is a pathname or URI, return it unchanged. If PATH starts with \"http://\" or \"https://\", return a URI. -Else, return a pathname." +Else, return a pathname. + +If TRUENAME is provided and true, give an absolute path." (ctypecase path (pathname - path) + (if truename + (truename path) + path)) (net.uri:uri path) (string @@ -36,7 +40,9 @@ (and (>= (length path) 8) (string= path "https://" :end1 8))) (net.uri:parse-uri path) - (pathname path))))) + (if truename + (truename (pathname path)) + (pathname path)))))) (defun upath-subdir (base subdirs &optional filename) "From BASE, descend into SUBDIRS and FILENAME. From mhenoch at common-lisp.net Tue Apr 1 22:01:01 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Tue, 1 Apr 2008 17:01:01 -0500 (EST) Subject: [Cl-darcs-cvs] r185 - cl-darcs/trunk Message-ID: <20080401220101.2FE1D2A199@common-lisp.net> Author: mhenoch Date: Tue Apr 1 17:01:01 2008 New Revision: 185 Modified: cl-darcs/trunk/get.lisp Log: GET-REPO: Use more truenames. Output same success message as darcs. Modified: cl-darcs/trunk/get.lisp ============================================================================== --- cl-darcs/trunk/get.lisp (original) +++ cl-darcs/trunk/get.lisp Tue Apr 1 17:01:01 2008 @@ -34,7 +34,7 @@ (setf outname (fad:pathname-as-directory outname)) ;; other access methods later... ;; XXX: checkpoints? - (let* ((repodir (make-upath inrepodir)) + (let* ((repodir (make-upath inrepodir :truename t)) ;; Here we get a list of lists. Each list represents a tag; ;; the latest tag is at the head. Each list contains patches ;; in the order they are to be applied. @@ -48,6 +48,8 @@ ;; Create directories... (ensure-directories-exist outname) + ;; Now that the directory exists, we can get its truename + (setf outname (truename outname)) (prepare-new-repo outname) (set-default-repo outname (upath-to-string inrepodir :truename t)) @@ -85,7 +87,7 @@ (force-output))) (format t "~&Creating pristine") (create-pristine-from-tree outname) - (format t "~&All done")))) + (format t "~&Finished getting.")))) (defun select-some-patches (patchinfo-list) "Interactively select some patches from PATCHINFO-LIST. From mhenoch at common-lisp.net Tue Apr 1 22:01:29 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Tue, 1 Apr 2008 17:01:29 -0500 (EST) Subject: [Cl-darcs-cvs] r186 - cl-darcs/trunk Message-ID: <20080401220129.875AE44065@common-lisp.net> Author: mhenoch Date: Tue Apr 1 17:01:29 2008 New Revision: 186 Modified: cl-darcs/trunk/cmdline.lisp Log: "darcs get" Modified: cl-darcs/trunk/cmdline.lisp ============================================================================== --- cl-darcs/trunk/cmdline.lisp (original) +++ cl-darcs/trunk/cmdline.lisp Tue Apr 1 17:01:29 2008 @@ -324,6 +324,33 @@ ;; Change the default repository. (when (first from-repositories) - (set-default-repo ourrepo (upath-to-string (first from-repositories)))) + (set-default-repo ourrepo (upath-to-string (first from-repositories) :truename t))) 0)) + +(define-darcs-command get + (repodir) + (from) + "Get a copy of a repository." + (setf from (make-upath from)) + (let* ((to (or + ;; Either there is an explicit repodir... + repodir + ;; ...or we make one relative to the current directory. + (make-pathname + :directory + (list :relative + (typecase from + ;; If we have a local pathname, use the last component. + (pathname + (or (pathname-name pathname) + (car (last (pathname-directory pathname))))) + ;; Otherwise, use the part from the last slash. + (t + (let* ((s (upath-to-string from)) + (last-slash (position #\/ s :from-end t))) + (if last-slash + (subseq s (1+ last-slash)) + s))))))))) + (get-repo from to)) + 0) From mhenoch at common-lisp.net Tue Apr 1 23:37:27 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Tue, 1 Apr 2008 18:37:27 -0500 (EST) Subject: [Cl-darcs-cvs] r187 - cl-darcs/trunk Message-ID: <20080401233727.BFB6268220@common-lisp.net> Author: mhenoch Date: Tue Apr 1 18:37:24 2008 New Revision: 187 Modified: cl-darcs/trunk/cmdline.lisp Log: Generate documentation for all command arguments Modified: cl-darcs/trunk/cmdline.lisp ============================================================================== --- cl-darcs/trunk/cmdline.lisp (original) +++ cl-darcs/trunk/cmdline.lisp Tue Apr 1 18:37:24 2008 @@ -70,7 +70,7 @@ (defun command-usage (command) "Print longer documentation for COMMAND." - (format *error-output* "~&~A~%" (documentation (command-function command) 'function))) + (format *error-output* "~&~A~%" (get (command-function command) 'darcs-documentation))) (defmacro define-darcs-command (name options operands docstring &body body) "Define a darcs command called NAME. @@ -98,7 +98,35 @@ `(,o (cdr (assoc (option-keyword ,(option-symbol o)) ,options-sym)))) options) (destructuring-bind ,operands ,operands-sym - , at body)))))))) + , at body)))) + (setf (get ',function 'darcs-documentation) + ,(if (null options) + docstring + `(format nil + "~A~%~%~:{~A~30,5T~A~%~}" + ,docstring + (mapcar + (lambda (opt) + (list + (cond + ((and (option-short opt) + (option-long opt)) + (format nil "--~A~@[=~A~], -~C" + (option-long opt) + (option-arg opt) + (option-short opt))) + ((option-short opt) + (format nil "-~C~@[ ~A~]" + (option-short opt) + (option-arg opt))) + ((option-long opt) + (format nil "--~A~@[=~A~]" + (option-long opt) + (option-arg opt))) + (t + (error "Option ~A has neither short nor long argument form." (option-keyword opt)))) + (option-help opt))) + (list ,@(mapcar #'option-symbol options)))))))))) (defparameter opt-repodir (make-option From mhenoch at common-lisp.net Tue Apr 1 23:50:52 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Tue, 1 Apr 2008 18:50:52 -0500 (EST) Subject: [Cl-darcs-cvs] r188 - cl-darcs/trunk Message-ID: <20080401235052.7F9CEA17C@common-lisp.net> Author: mhenoch Date: Tue Apr 1 18:50:52 2008 New Revision: 188 Modified: cl-darcs/trunk/cmdline.lisp Log: Remove superfluous documentation for 'darcs init' Modified: cl-darcs/trunk/cmdline.lisp ============================================================================== --- cl-darcs/trunk/cmdline.lisp (original) +++ cl-darcs/trunk/cmdline.lisp Tue Apr 1 18:50:52 2008 @@ -226,10 +226,7 @@ (diff-repo-display (find-repo))) (define-darcs-command init (repodir) () - "Initialize a darcs repository in the current directory. - -Options: ---repodir=DIRECTORY Use DIRECTORY instead of current directory" + "Initialize a darcs repository in the current directory." (let ((repodir (or repodir *default-pathname-defaults*))) (format t "Creating repo in ~A...~%" repodir) From mhenoch at common-lisp.net Wed Apr 2 00:23:06 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Tue, 1 Apr 2008 19:23:06 -0500 (EST) Subject: [Cl-darcs-cvs] r189 - cl-darcs/trunk Message-ID: <20080402002306.89034A1B0@common-lisp.net> Author: mhenoch Date: Tue Apr 1 19:23:06 2008 New Revision: 189 Modified: cl-darcs/trunk/cmdline.lisp Log: Fix typo Modified: cl-darcs/trunk/cmdline.lisp ============================================================================== --- cl-darcs/trunk/cmdline.lisp (original) +++ cl-darcs/trunk/cmdline.lisp Tue Apr 1 19:23:06 2008 @@ -368,8 +368,8 @@ (typecase from ;; If we have a local pathname, use the last component. (pathname - (or (pathname-name pathname) - (car (last (pathname-directory pathname))))) + (or (pathname-name from) + (car (last (pathname-directory from))))) ;; Otherwise, use the part from the last slash. (t (let* ((s (upath-to-string from)) From mhenoch at common-lisp.net Wed Apr 2 18:03:03 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 13:03:03 -0500 (EST) Subject: [Cl-darcs-cvs] r190 - cl-darcs/trunk Message-ID: <20080402180303.B57D1111DC@common-lisp.net> Author: mhenoch Date: Wed Apr 2 13:03:02 2008 New Revision: 190 Removed: cl-darcs/trunk/binary-text.lisp Modified: cl-darcs/trunk/cl-darcs.asd Log: Remove unused binary-text.lisp Modified: cl-darcs/trunk/cl-darcs.asd ============================================================================== --- cl-darcs/trunk/cl-darcs.asd (original) +++ cl-darcs/trunk/cl-darcs.asd Wed Apr 2 13:03:02 2008 @@ -29,7 +29,7 @@ (:file "condition" :depends-on ("packages")) (:file "util" :depends-on ("packages" "condition" #-allegro "inflate")) (:file "unreadable-stream" :depends-on ("packages")) - (:file "upath" :depends-on ("util" #|"binary-text"|#)) + (:file "upath" :depends-on ("util")) (:file "patchinfo" :depends-on ("util")) (:file "get" :depends-on ("util")) From mhenoch at common-lisp.net Wed Apr 2 18:06:41 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 13:06:41 -0500 (EST) Subject: [Cl-darcs-cvs] r191 - cl-darcs/trunk Message-ID: <20080402180641.9A60317051@common-lisp.net> Author: mhenoch Date: Wed Apr 2 13:06:41 2008 New Revision: 191 Modified: cl-darcs/trunk/README Log: Mention CL-DIFFLIB in README Modified: cl-darcs/trunk/README ============================================================================== --- cl-darcs/trunk/README (original) +++ cl-darcs/trunk/README Wed Apr 2 13:06:41 2008 @@ -47,6 +47,7 @@ - FLEXI-STREAMS: http://weitz.de/flexi-streams/ - CL-FAD: http://weitz.de/cl-fad/ - CL-PPCRE: http://weitz.de/cl-ppcre/ + - CL-DIFFLIB: http://www.cliki.net/CL-DIFFLIB All of these are ASDF-INSTALLable. From mhenoch at common-lisp.net Wed Apr 2 18:08:20 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 13:08:20 -0500 (EST) Subject: [Cl-darcs-cvs] r192 - cl-darcs/trunk Message-ID: <20080402180820.8FD152D063@common-lisp.net> Author: mhenoch Date: Wed Apr 2 13:08:20 2008 New Revision: 192 Modified: cl-darcs/trunk/README Log: Mention Lispworks compatibility Modified: cl-darcs/trunk/README ============================================================================== --- cl-darcs/trunk/README (original) +++ cl-darcs/trunk/README Wed Apr 2 13:08:20 2008 @@ -32,10 +32,11 @@ * Compatibility -cl-darcs works on CLISP and SBCL on Unix-like systems. Getting it to -work on other Lisp implementations should be simple; grep the code for -#+clisp or #+sbcl. For other operating systems, modify -MAKE-TEMP-FILE-NAME in util.lisp accordingly. +cl-darcs works on CLISP and SBCL on Unix-like systems; it has also +been reported to work on Lispworks. Getting it to work on other Lisp +implementations should be simple; grep the code for #+clisp or #+sbcl. +For other operating systems, modify MAKE-TEMP-FILE-NAME in util.lisp +accordingly. * Dependencies From mhenoch at common-lisp.net Wed Apr 2 20:55:20 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 15:55:20 -0500 (EST) Subject: [Cl-darcs-cvs] r193 - in cl-darcs/trunk: . doc Message-ID: <20080402205520.581831704E@common-lisp.net> Author: mhenoch Date: Wed Apr 2 15:55:19 2008 New Revision: 193 Added: cl-darcs/trunk/Makefile.am cl-darcs/trunk/configure.ac cl-darcs/trunk/doc/Makefile.am Removed: cl-darcs/trunk/Makefile Log: Autoconfiscate Added: cl-darcs/trunk/Makefile.am ============================================================================== --- (empty file) +++ cl-darcs/trunk/Makefile.am Wed Apr 2 15:55:19 2008 @@ -0,0 +1,12 @@ +bin_PROGRAMS = darcs +darcs_SOURCES = cl-darcs.asd apply-patch.lisp cmdline.lisp commute.lisp condition.lisp diff.lisp display-patch.lisp dump-clisp.lisp dump-sbcl.lisp equal.lisp get.lisp getopt.lisp ifstar.lisp inflate.lisp invert-patch.lisp merge.lisp packages.lisp patch-core.lisp patchinfo.lisp pending.lisp prefs.lisp pristine.lisp pull.lisp read-patch.lisp record.lisp repo.lisp revert.lisp send.lisp touching.lisp unreadable-stream.lisp unwind.lisp upath.lisp util.lisp write-patch.lisp + +SUBDIRS=doc + +darcs: build_with_ at my_lisp@ + +build_with_clisp: + @CLISP@ @CLISP_FLAGS@ @srcdir@/dump-clisp.lisp + +build_with_sbcl: + @SBCL@ @SBCL_FLAGS@ --load @srcdir@/dump-sbcl.lisp Added: cl-darcs/trunk/configure.ac ============================================================================== --- (empty file) +++ cl-darcs/trunk/configure.ac Wed Apr 2 15:55:19 2008 @@ -0,0 +1,56 @@ +AC_INIT([cl-darcs], [0.3.0], [cl-darcs-devel at common-lisp.net]) +AM_INIT_AUTOMAKE([no-dependencies foreign]) + +my_lisp="" + +AC_ARG_WITH(clisp, [AS_HELP_STRING([--with-clisp], [use clisp])], + [my_lisp=$my_lisp"clisp"], []) +AC_ARG_WITH(clisp-flags, [AS_HELP_STRING([--with-clisp-flags], [clisp flags (default -i ~/.clisprc)])], + [], + [with_clisp_flags="-i ~/.clisprc"]) + +AC_ARG_WITH(sbcl, [AS_HELP_STRING([--with-sbcl], [use sbcl])], + [my_lisp=$my_lisp"sbcl"], []) +AC_ARG_WITH(sbcl-flags, [AS_HELP_STRING([--with-sbcl-flags], [sbcl flags (default --disable-debugger)])], + [], + [with_sbcl_flags="--disable-debugger"]) + +dnl First, try to find clisp +if test -z "$my_lisp" -o "$my_lisp" = clisp; then + if test -z "$CLISP"; then + AC_CHECK_PROG(CLISP, clisp, clisp, []) + fi + if test -n "$CLISP"; then + my_lisp=clisp + AC_MSG_CHECKING([for clisp flags]) + CLISP_FLAGS=$with_clisp_flags + AC_MSG_RESULT($CLISP_FLAGS) + fi +fi + +dnl Then, try to find sbcl +if test -z "$my_lisp" -o "$my_lisp" = sbcl; then + if test -z "$SBCL"; then + AC_CHECK_PROG(SBCL, sbcl, sbcl, []) + fi + if test -n "$SBCL"; then + my_lisp=sbcl + AC_MSG_CHECKING([for sbcl flags]) + SBCL_FLAGS=$with_sbcl_flags + AC_MSG_RESULT($SBCL_FLAGS) + fi +fi + +dnl Did we find any lisp? +if test -z "$my_lisp"; then + AC_MSG_ERROR([no lisp found]) +fi + +AC_SUBST(my_lisp) +AC_SUBST(CLISP) +AC_SUBST(CLISP_FLAGS) +AC_SUBST(SBCL) +AC_SUBST(SBCL_FLAGS) + +AC_CONFIG_FILES([Makefile doc/Makefile]) +AC_OUTPUT Added: cl-darcs/trunk/doc/Makefile.am ============================================================================== --- (empty file) +++ cl-darcs/trunk/doc/Makefile.am Wed Apr 2 15:55:19 2008 @@ -0,0 +1 @@ +info_TEXINFOS=cl-darcs.texi From mhenoch at common-lisp.net Wed Apr 2 21:14:09 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 16:14:09 -0500 (EST) Subject: [Cl-darcs-cvs] r194 - in cl-darcs/trunk: . doc Message-ID: <20080402211409.78425340A4@common-lisp.net> Author: mhenoch Date: Wed Apr 2 16:14:08 2008 New Revision: 194 Modified: cl-darcs/trunk/cl-darcs.asd cl-darcs/trunk/doc/cl-darcs.texi Log: Update version number Modified: cl-darcs/trunk/cl-darcs.asd ============================================================================== --- cl-darcs/trunk/cl-darcs.asd (original) +++ cl-darcs/trunk/cl-darcs.asd Wed Apr 2 16:14:08 2008 @@ -7,7 +7,7 @@ (defsystem cl-darcs :description "Darcs client" - :version "0.2.0" + :version "0.3.0" :licence "GPL" :author "Magnus Henoch " :depends-on (:split-sequence Modified: cl-darcs/trunk/doc/cl-darcs.texi ============================================================================== --- cl-darcs/trunk/doc/cl-darcs.texi (original) +++ cl-darcs/trunk/doc/cl-darcs.texi Wed Apr 2 16:14:08 2008 @@ -1,11 +1,11 @@ \input texinfo @setfilename cl-darcs.info - at settitle cl-darcs 0.2.0 manual + at settitle cl-darcs 0.3.0 manual @copying -This is the manual for cl-darcs, version 0.2.0. +This is the manual for cl-darcs, version 0.3.0. -Copyright @copyright{} 2007 Magnus Henoch +Copyright @copyright{} 2007, 2008 Magnus Henoch @quotation Permission is granted to make and distribute verbatim copies or @@ -15,7 +15,7 @@ @end copying @titlepage - at title cl-darcs 0.2.0 + at title cl-darcs 0.3.0 @subtitle a darcs client in Common Lisp @author Magnus Henoch From mhenoch at common-lisp.net Wed Apr 2 21:32:07 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 16:32:07 -0500 (EST) Subject: [Cl-darcs-cvs] r195 - cl-darcs/trunk Message-ID: <20080402213207.A58AA1509D@common-lisp.net> Author: mhenoch Date: Wed Apr 2 16:32:07 2008 New Revision: 195 Added: cl-darcs/trunk/dump-clisp.lisp cl-darcs/trunk/dump-sbcl.lisp Log: Commit dump scripts Added: cl-darcs/trunk/dump-clisp.lisp ============================================================================== --- (empty file) +++ cl-darcs/trunk/dump-clisp.lisp Wed Apr 2 16:32:07 2008 @@ -0,0 +1,35 @@ +;;; Copyright (C) 2007, 2008 Magnus Henoch +;;; +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU General Public License as +;;; published by the Free Software Foundation; either version 2 of the +;;; License, or (at your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program; if not, write to the Free Software +;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +;; Use this file to create a "darcs" executable using CLISP. + +(let* ((src-dir (make-pathname :name nil :type nil :defaults *load-truename*)) + (asdf:*central-registry* (cons src-dir asdf:*central-registry*))) + (asdf:oos 'asdf:load-op :cl-darcs)) + +(in-package :darcs) + +(defun run-with-clisp () + (ext:quit (handle-command-line ext:*args*))) + +(ext:saveinitmem "darcs" + :executable t + :norc t + :quiet t + :init-function #'run-with-clisp + :start-package :darcs) + +(ext:quit) Added: cl-darcs/trunk/dump-sbcl.lisp ============================================================================== --- (empty file) +++ cl-darcs/trunk/dump-sbcl.lisp Wed Apr 2 16:32:07 2008 @@ -0,0 +1,34 @@ +;;; Copyright (C) 2007, 2008 Magnus Henoch +;;; +;;; This program is free software; you can redistribute it and/or +;;; modify it under the terms of the GNU General Public License as +;;; published by the Free Software Foundation; either version 2 of the +;;; License, or (at your option) any later version. +;;; +;;; This program is distributed in the hope that it will be useful, +;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;;; General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with this program; if not, write to the Free Software +;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +;; Use this file to create a "darcs" executable using SBCL: +;; sbcl --disable-debugger --load dump-sbcl.lisp + +(let* ((src-dir (make-pathname :name nil :type nil :defaults *load-truename*)) + (asdf:*central-registry* (cons src-dir asdf:*central-registry*))) + (asdf:oos 'asdf:load-op :cl-darcs)) + +(in-package :darcs) + +(defun run-with-sbcl () + (sb-ext:quit :unix-status (handle-command-line (cdr sb-ext:*posix-argv*)))) + +(proclaim '(optimize debug)) +(sb-ext:save-lisp-and-die "darcs" + :executable t + :toplevel #'run-with-sbcl) + +(sb-ext:quit) From mhenoch at common-lisp.net Wed Apr 2 22:00:31 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 17:00:31 -0500 (EST) Subject: [Cl-darcs-cvs] r196 - cl-darcs/trunk Message-ID: <20080402220031.6A0BD4E041@common-lisp.net> Author: mhenoch Date: Wed Apr 2 17:00:30 2008 New Revision: 196 Modified: cl-darcs/trunk/Makefile.am Log: Don't rebuild darcs unless dependencies changed Modified: cl-darcs/trunk/Makefile.am ============================================================================== --- cl-darcs/trunk/Makefile.am (original) +++ cl-darcs/trunk/Makefile.am Wed Apr 2 17:00:30 2008 @@ -3,7 +3,8 @@ SUBDIRS=doc -darcs: build_with_ at my_lisp@ +darcs: $(darcs_SOURCES) + $(MAKE) build_with_ at my_lisp@ build_with_clisp: @CLISP@ @CLISP_FLAGS@ @srcdir@/dump-clisp.lisp From mhenoch at common-lisp.net Wed Apr 2 22:00:47 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 17:00:47 -0500 (EST) Subject: [Cl-darcs-cvs] r197 - cl-darcs/trunk Message-ID: <20080402220047.2D80856230@common-lisp.net> Author: mhenoch Date: Wed Apr 2 17:00:46 2008 New Revision: 197 Modified: cl-darcs/trunk/Makefile.am Log: Satisfy ASDF's tarball name convention Modified: cl-darcs/trunk/Makefile.am ============================================================================== --- cl-darcs/trunk/Makefile.am (original) +++ cl-darcs/trunk/Makefile.am Wed Apr 2 17:00:46 2008 @@ -3,6 +3,9 @@ SUBDIRS=doc +# satisfy ASDF's tarball name convention +distdir=$(PACKAGE)_$(VERSION) + darcs: $(darcs_SOURCES) $(MAKE) build_with_ at my_lisp@ From mhenoch at common-lisp.net Wed Apr 2 22:06:36 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 17:06:36 -0500 (EST) Subject: [Cl-darcs-cvs] r198 - in cl-darcs/trunk: . doc Message-ID: <20080402220636.ED03975138@common-lisp.net> Author: mhenoch Date: Wed Apr 2 17:06:36 2008 New Revision: 198 Removed: cl-darcs/trunk/doc/Makefile.am Modified: cl-darcs/trunk/Makefile.am cl-darcs/trunk/configure.ac Log: Use one central makefile Modified: cl-darcs/trunk/Makefile.am ============================================================================== --- cl-darcs/trunk/Makefile.am (original) +++ cl-darcs/trunk/Makefile.am Wed Apr 2 17:06:36 2008 @@ -1,7 +1,7 @@ bin_PROGRAMS = darcs darcs_SOURCES = cl-darcs.asd apply-patch.lisp cmdline.lisp commute.lisp condition.lisp diff.lisp display-patch.lisp dump-clisp.lisp dump-sbcl.lisp equal.lisp get.lisp getopt.lisp ifstar.lisp inflate.lisp invert-patch.lisp merge.lisp packages.lisp patch-core.lisp patchinfo.lisp pending.lisp prefs.lisp pristine.lisp pull.lisp read-patch.lisp record.lisp repo.lisp revert.lisp send.lisp touching.lisp unreadable-stream.lisp unwind.lisp upath.lisp util.lisp write-patch.lisp -SUBDIRS=doc +info_TEXINFOS=doc/cl-darcs.texi # satisfy ASDF's tarball name convention distdir=$(PACKAGE)_$(VERSION) Modified: cl-darcs/trunk/configure.ac ============================================================================== --- cl-darcs/trunk/configure.ac (original) +++ cl-darcs/trunk/configure.ac Wed Apr 2 17:06:36 2008 @@ -52,5 +52,5 @@ AC_SUBST(SBCL) AC_SUBST(SBCL_FLAGS) -AC_CONFIG_FILES([Makefile doc/Makefile]) +AC_CONFIG_FILES([Makefile]) AC_OUTPUT From mhenoch at common-lisp.net Wed Apr 2 22:27:17 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 17:27:17 -0500 (EST) Subject: [Cl-darcs-cvs] r199 - cl-darcs/trunk Message-ID: <20080402222717.B54EA17054@common-lisp.net> Author: mhenoch Date: Wed Apr 2 17:27:17 2008 New Revision: 199 Modified: cl-darcs/trunk/Makefile.am Log: Include test suite in distribution Modified: cl-darcs/trunk/Makefile.am ============================================================================== --- cl-darcs/trunk/Makefile.am (original) +++ cl-darcs/trunk/Makefile.am Wed Apr 2 17:27:17 2008 @@ -3,6 +3,8 @@ info_TEXINFOS=doc/cl-darcs.texi +dist_noinst_DATA=tests/package.lisp tests/gcau-tests.lisp + # satisfy ASDF's tarball name convention distdir=$(PACKAGE)_$(VERSION) From mhenoch at common-lisp.net Wed Apr 2 22:35:47 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 17:35:47 -0500 (EST) Subject: [Cl-darcs-cvs] r200 - cl-darcs/trunk/doc Message-ID: <20080402223547.5ADAF4E042@common-lisp.net> Author: mhenoch Date: Wed Apr 2 17:35:47 2008 New Revision: 200 Modified: cl-darcs/trunk/doc/cl-darcs.texi Log: Add dir entry to documentation Modified: cl-darcs/trunk/doc/cl-darcs.texi ============================================================================== --- cl-darcs/trunk/doc/cl-darcs.texi (original) +++ cl-darcs/trunk/doc/cl-darcs.texi Wed Apr 2 17:35:47 2008 @@ -14,6 +14,11 @@ @end quotation @end copying + at dircategory Software development + at direntry +* Cl-darcs: (cl-darcs). Darcs version control system client + at end direntry + @titlepage @title cl-darcs 0.3.0 @subtitle a darcs client in Common Lisp From mhenoch at common-lisp.net Wed Apr 2 22:40:59 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 17:40:59 -0500 (EST) Subject: [Cl-darcs-cvs] r201 - cl-darcs/trunk Message-ID: <20080402224059.0238F37014@common-lisp.net> Author: mhenoch Date: Wed Apr 2 17:40:59 2008 New Revision: 201 Modified: cl-darcs/trunk/README Log: Mention compilation in README Modified: cl-darcs/trunk/README ============================================================================== --- cl-darcs/trunk/README (original) +++ cl-darcs/trunk/README Wed Apr 2 17:40:59 2008 @@ -2,7 +2,18 @@ writing it because the original client requires GHC (the Glasgow Haskell Compiler), which is not available on all platforms. -cl-darcs is currently in a very early state of development. +* Compiling + +If you use CLISP or SBCL, you can use cl-darcs as a standalone +executable with an interface very similar to the real darcs. Just +run: + +./configure && make && make install + +You can also use cl-darcs from the REPL, by installing it as an ASDF +system: + +ln -s $PWD/cl-darcs.asd /path/to/asdf-systems/ * Usage From mhenoch at common-lisp.net Wed Apr 2 23:50:10 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 18:50:10 -0500 (EST) Subject: [Cl-darcs-cvs] r202 - cl-darcs/trunk/doc Message-ID: <20080402235010.DD2086D360@common-lisp.net> Author: mhenoch Date: Wed Apr 2 18:50:10 2008 New Revision: 202 Modified: cl-darcs/trunk/doc/cl-darcs.texi Log: Document command line tool Modified: cl-darcs/trunk/doc/cl-darcs.texi ============================================================================== --- cl-darcs/trunk/doc/cl-darcs.texi (original) +++ cl-darcs/trunk/doc/cl-darcs.texi Wed Apr 2 18:50:10 2008 @@ -42,6 +42,7 @@ @menu * Introduction:: +* Running cl-darcs:: * Access methods:: * Getting a repository:: * Creating a new repository:: @@ -50,7 +51,7 @@ * Working directory layout:: @end menu - at node Introduction, Access methods, Top, Top + at node Introduction, Running cl-darcs, Top, Top @chapter Introduction cl-darcs is an implementation of the darcs version control system @@ -82,7 +83,24 @@ middle-of-the-room cases). However, it is already useful for simple usage. - at node Access methods, Getting a repository, Introduction, Top + at node Running cl-darcs, Access methods, Introduction, Top + at chapter Running cl-darcs + +There are two ways of running cl-darcs, from the shell, or from the +REPL. + + at section From the shell + +If you have successfully compiled the @file{darcs} binary, you can use +it much like you'd use the original darcs client, except that it only +supports a small subset of the commands. + + at section From the REPL + +Of course, all functionality is equally available from the REPL, though +sometimes with different syntax or semantics. + + at node Access methods, Getting a repository, Running cl-darcs, Top @chapter Access methods cl-darcs can access repositories on a local disk (read and write) and on @@ -103,20 +121,14 @@ Using a caching proxy (e.g. Squid) can be a good idea, since cl-darcs is sometimes a bit wasteful about how much it downloads, and bugs might make it lose what it already has downloaded. + +This variable is not available in the standalone @file{darcs} +executable. @end defopt @node Getting a repository, Creating a new repository, Access methods, Top @chapter Getting a repository - at defun DARCS:GET-REPO in-path out-path &key query -Get a local copy of the tree at @var{in-path}, and write it to - at var{out-path}. @var{in-path} may be an HTTP URL or a local directory. - at var{out-path} must be a local nonexistent directory. - -If @var{query} is true, ask for a range of patches to download and -apply. - at end defun - Getting a copy of a repository involves getting all the patches from that repository, and applying them one by one to the local tree. This can be a lot of data, if the repository has long history. Darcs has a @@ -126,6 +138,21 @@ @file{_darcs/prefs/defaultrepo}), and is used as default repository to pull from. @xref{Pulling new patches}. + at deffn Command @command{darcs get} [@kbd{--repodir=}@var{to}] from +Get a local copy of the tree at @var{from}, and write it to @var{to}. +If @var{to} is not specified, a subdirectory of the current directory is +created, based on the last path element of @var{from}. + at end deffn + + at defun DARCS:GET-REPO in-path out-path &key query +Get a local copy of the tree at @var{in-path}, and write it to + at var{out-path}. @var{in-path} may be an HTTP URL or a local directory. + at var{out-path} must be a local nonexistent directory. + +If @var{query} is true, ask for a range of patches to download and +apply. + at end defun + @node Creating a new repository, Pulling new patches, Getting a repository, Top @chapter Creating a new repository @@ -145,6 +172,17 @@ Updating your working copy with new patches from the original repository is called ``pulling'' these patches. + at deffn Command @command{darcs pull} [@kbd{--all-patches}|@kbd{-a}] [@kbd{--repodir=}@var{local}] [@var{foreign}] + +Pull new patches from repository @var{foreign} into repository + at var{local}. If @var{local} is not specified, it defaults to the +current directory. If @var{foreign} is not specified, it defaults to +the repository you pulled from last time. + +If you specify @kbd{-a} or @kbd{--all-patches}, all new patches are +pulled; otherwise you will be asked for which ones to pull. + at end deffn + @defun DARCS:PULL our-repo &optional their-repo Pull new patches from @var{their-repo} into @var{our-repo}. @var{our-repo} must be a local darcs tree. @var{their-repo} can be a @@ -162,9 +200,6 @@ from where you can recover the changed file and merge it with your changes. -Also, all new patches will be pulled without asking. This is -suboptimal; selecting some of the patches should be supported. - @node Recording a patch, Working directory layout, Pulling new patches, Top @chapter Recording a patch @@ -172,6 +207,10 @@ called ``recording'' in darcs. Before doing that, you may want to review your local changes. + at deffn Command @command{darcs whatsnew} +Find changes in the repository in the current directory, and print them. + at end deffn + @defun DARCS:DIFF-REPO-DISPLAY repo Find changes in @var{repo} and print them. @end defun @@ -181,6 +220,11 @@ ignored; see @ref{Boring files}. New files in your tree are automatically included in the diff output, unless they are ``boring''. + at deffn Command @command{darcs record} +Interactively ask which changes to record, what name to give the patch, +and who the author is. + at end deffn + @defun DARCS:RECORD-CHANGES repo name author date log Interactively ask which changes to @var{repo} to record. From mhenoch at common-lisp.net Thu Apr 3 00:00:27 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 19:00:27 -0500 (EST) Subject: [Cl-darcs-cvs] r203 - cl-darcs/trunk Message-ID: <20080403000027.9620E111F2@common-lisp.net> Author: mhenoch Date: Wed Apr 2 19:00:27 2008 New Revision: 203 Modified: cl-darcs/trunk/cmdline.lisp Log: Use DARCS-DOCUMENTATION property in USAGE Modified: cl-darcs/trunk/cmdline.lisp ============================================================================== --- cl-darcs/trunk/cmdline.lisp (original) +++ cl-darcs/trunk/cmdline.lisp Wed Apr 2 19:00:27 2008 @@ -65,7 +65,7 @@ (format *error-output* " ~A~15,2T~A~%" cmd (car (split-sequence:split-sequence - #\Newline (documentation function 'function) + #\Newline (get function 'darcs-documentation) :count 1)))))) (defun command-usage (command) From mhenoch at common-lisp.net Thu Apr 3 00:02:00 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 19:02:00 -0500 (EST) Subject: [Cl-darcs-cvs] r204 - cl-darcs/trunk Message-ID: <20080403000200.53E7E111F3@common-lisp.net> Author: mhenoch Date: Wed Apr 2 19:02:00 2008 New Revision: 204 Modified: cl-darcs/trunk/cmdline.lisp Log: Note todo items for command operands Modified: cl-darcs/trunk/cmdline.lisp ============================================================================== --- cl-darcs/trunk/cmdline.lisp (original) +++ cl-darcs/trunk/cmdline.lisp Wed Apr 2 19:02:00 2008 @@ -97,9 +97,11 @@ (lambda (o) `(,o (cdr (assoc (option-keyword ,(option-symbol o)) ,options-sym)))) options) + ;; XXX: what if this fails? (destructuring-bind ,operands ,operands-sym , at body)))) (setf (get ',function 'darcs-documentation) + ;; XXX: documentation for operands ,(if (null options) docstring `(format nil From mhenoch at common-lisp.net Thu Apr 3 00:03:59 2008 From: mhenoch at common-lisp.net (mhenoch at common-lisp.net) Date: Wed, 2 Apr 2008 19:03:59 -0500 (EST) Subject: [Cl-darcs-cvs] r205 - cl-darcs/trunk/doc Message-ID: <20080403000359.29838111F2@common-lisp.net> Author: mhenoch Date: Wed Apr 2 19:03:58 2008 New Revision: 205 Modified: cl-darcs/trunk/doc/cl-darcs.texi Log: Document "darcs init" Modified: cl-darcs/trunk/doc/cl-darcs.texi ============================================================================== --- cl-darcs/trunk/doc/cl-darcs.texi (original) +++ cl-darcs/trunk/doc/cl-darcs.texi Wed Apr 2 19:03:58 2008 @@ -156,6 +156,10 @@ @node Creating a new repository, Pulling new patches, Getting a repository, Top @chapter Creating a new repository + at deffn Command @command{darcs init} +Create a new empty repository in the current directory. + at end deffn + @defun DARCS:CREATE-REPO repodir Create a new empty repository in @var{repodir}. @var{repodir} must be a local nonexistent directory.