APPROVE COMMIT
Norbert, once you've sobered up from all the xmas cheer you're
enjoying, this is good to go. :-)
NOTE: This patch has been committed.
xetla patch:
ChangeLog files diff command: cvs -q diff -U 0
Files affected: ChangeLog
Source files diff command: cvs -q diff -uN
Files affected: ChangeLog.d/ChangeLog-1.1 ChangeLog.d/ChangeLog-1.0 ChangeLog.d/ChangeLog-0.2 ChangeLog.d/ChangeLog-0.1 xetla.el xetla-version.el xetla-tips.el xetla-core.el xetla-browse.el smerge.el package-info.in Makefile
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xetla/ChangeLog,v
retrieving revision 1.2
diff -u -p -U0 -r1.2 ChangeLog
--- ChangeLog 4 Apr 2005 19:05:48 -0000 1.2
+++ ChangeLog 25 Dec 2005 10:52:21 -0000
@@ -0,0 +1,15 @@
+2005-12-24 Steve Youngs <steve(a)sxemacs.org>
+
+ * steve(a)eicq.org--2005/xetla--main--1.1--version-0 is released.
+ See ./ChangeLog.d/ChangeLog-1.1 for details.
+
+ * ChangeLog.d/*: New files.
+
+ * package-info.in (description): Mention (S)XEmacs in the
+ description.
+ (provides): Remove smerge, it isn't part of XEtla anymore.
+
+ * Makefile (AUTHOR_VERSION): Bump to
+ steve(a)eicq.org--2005/xetla--main--1.1--version-0
+ (ELCS): Remove smerge.el, it isn't part of XEtla anymore.
+
Index: Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xetla/Makefile,v
retrieving revision 1.2
diff -u -p -u -r1.2 Makefile
--- Makefile 4 Apr 2005 19:05:48 -0000 1.2
+++ Makefile 25 Dec 2005 10:52:07 -0000
@@ -18,7 +18,7 @@
# Boston, MA 02111-1307, USA.
VERSION = 1.00
-AUTHOR_VERSION = steve(a)eicq.org--2005/xetla--main--1.0--version-0
+AUTHOR_VERSION = steve(a)eicq.org--2005/xetla--main--1.1--version-0
MAINTAINER = Steve Youngs <steve(a)youngs.au.com>
PACKAGE = xetla
PKG_TYPE = regular
@@ -27,7 +27,6 @@ CATEGORY = standard
ELCS = \
ewoc.elc \
- smerge.elc \
xetla-version.elc \
xetla-browse.elc \
xetla-core.elc \
Index: package-info.in
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xetla/package-info.in,v
retrieving revision 1.1
diff -u -p -u -r1.1 package-info.in
--- package-info.in 4 Apr 2005 13:27:19 -0000 1.1
+++ package-info.in 25 Dec 2005 10:52:07 -0000
@@ -9,11 +9,11 @@
priority low
category CATEGORY
dump nil
- description "Frontend to GNU/arch (tla)."
+ description "(S)XEmacs Frontend to GNU/arch (tla)."
filename FILENAME
md5sum MD5SUM
size SIZE
- provides (ewoc smerge xetla-browse xetla-core
+ provides (ewoc xetla-browse xetla-core
xetla-defs xetla-tips xetla-version xetla)
requires (REQUIRES)
type regular
Index: smerge.el
===================================================================
RCS file: smerge.el
diff -N smerge.el
--- smerge.el 4 Apr 2005 13:27:20 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,453 +0,0 @@
-;;; smerge.el --- SAM's Merge layer on top of ediff
-
-;; Copyright (C) 2002,2003 Sean MacLennan
-;; $Revision: 1.1 $ $Date: 2005/04/04 13:27:20 $
-;; XEmacs
-
-;; 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, 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 GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-;; Boston, MA 02111-1307, USA.
-
-;; TODO:
-;; - keymap for buffer!
-;; - ediff needs a list of args
-;; - add more documentation!!!
-
-;; smerge marks the file with the `smerge-merged-face' when the files
-;; are merged. In the case of "only in" files, merged means you copied
-;; the file over to the other directory. However, for ediffed files,
-;; merged means you ran ediff on the files. This does not mean the
-;; files are identical. And you are allowed to run ediff on the files
-;; again. It is really just a marker that you looked at the file.
-
-(require 'ediff)
-
-(defmacro smerge-do-in-gnu-emacs (&rest body)
- "Execute BODY if in GNU/Emacs."
- (unless running-xemacs `(progn ,@body)))
-(put 'smerge-do-in-gnu-emacs 'lisp-indent-hook 'defun)
-
-(defmacro smerge-do-in-xemacs (&rest body)
- "Execute BODY if in XEmacs."
- (when running-xemacs `(progn ,@body)))
-(put 'smerge-do-in-xemacs 'lisp-indent-hook 'defun)
-
-
-(smerge-do-in-xemacs
- (defalias 'smerge-dirlist 'directory-files))
-
-(smerge-do-in-gnu-emacs
- (require 'extent)
-
- (defun smerge-dirlist (directory &optional full match nosort files-only)
- (if (eq files-only nil)
- (directory-files directory full match nosort)
- (let ((rawlist (directory-files-and-attributes
- directory full match nosort))
- dirlist)
- (setq files-only (if (eq files-only t) nil t))
- (dolist (entry rawlist)
- (when (eq (nth 1 entry) files-only)
- (setq dirlist (cons (car entry) dirlist))))
- dirlist)))
-
- (defun temp-directory ()
- (let ((tmp (getenv "TMPDIR")))
- (if tmp tmp "/tmp")))
-
- (defun read-directory-name (prompt &optional dir default mustmatch)
- (let* ((dir (read-file-name prompt dir default mustmatch))
- (attr (file-attributes dir)))
- (unless (eq (car attr) t) (error "Must be a directory"))
- dir))
-
- (defun kill-entire-line (&optional arg)
- (let ((kill-whole-line t)) (beginning-of-line) (kill-line arg)))
- )
-
-(defvar smerge-diff-program ediff-diff-program
- "*Program to use to diff the directories. Must support --brief option.")
-
-(defvar smerge-diff-options ediff-diff-options "*See `ediff-diff-options'.")
-
-(defvar smerge-diff-excludes '("*.o" "*.obj" "*.a" "*.lib" "*~" ".#*" "CVS")
- "*List of patterns of files and subdirectories to ignore.
-smerge builds a temprorary file (`smerge-exclude-file') based on this list
-and passes it to `smerge-diff-program' with the --exclude-from option.
-Note: These excludes are wildcard expressions as used by diff, not lisp
-regular expressions.")
-
-(defvar smerge-preserve-modes t
- "*When copying files, preserver the mode of the destination file.")
-
-(defvar smerge-exclude-file (concat (temp-directory) "/smerge-excludes")
- "*Temporary file to hold the `smerge-excludes'.")
-
-(defface smerge-only1-face
- '((((class color)) (:foreground "purple"))
- (t (:underline t)))
- "Face for files/directories only in directory 1.")
-
-(defface smerge-only2-face
- '((((class color)) (:foreground "blue"))
- (t (:underline t)))
- "Face for files/directories only in directory 2.")
-
-(defface smerge-diff-face
- '((((class color)) (:foreground "red"))
- (t (:bold t)))
- "Face for files that are different.")
-
-(defface smerge-merged-face
- '((((class color)) (:foreground "black"))
- (t (:bold t)))
- "Face for files that are merged.")
-
-
-(defvar smerge-buffer "*smerge-output*" "*Name of smerge output buffer.")
-
-(defvar smerge-keymap nil "*Keymap used by smerge.")
-
-(defvar smerge-cvsignore nil
- "*If non-nil, use the .cvsignore files in `dir1' to ignore files.")
-
-;; For debugging
-(defvar smerge-raw-diff-output nil
- "*If non-nil, filename to write the raw diff output to. (dbg)")
-(defvar smerge-keep-cvsignore-buffer nil
- "*If non-nil, keep the raw cvsignore buffer. (dbg)")
-
-;; Internals
-;; SAM This should be a list?
-(defvar smerge-flags nil)
-(defvar smerge-dir1 nil)
-(defvar smerge-dir2 nil)
-(defvar smerge-file nil)
-(defvar smerge-extent nil)
-
-
-(defconst smerge-copy-menu
- (list "Copy to ..."
- [(concat smerge-dir1 smerge-file) (smerge-copy 1) (smerge-allow-dir 1)]
- [(concat smerge-dir2 smerge-file) (smerge-copy 2) (smerge-allow-dir 2)]
- ))
-
-(defun smerge-init ()
- "This creates the keymap."
- (unless smerge-keymap
- (setq smerge-keymap (make-sparse-keymap "smerge"))
- (if running-xemacs
- (progn
- (define-key smerge-keymap 'button1 'smerge-mousable)
- (define-key smerge-keymap 'button2 'smerge-mousable)
- (define-key smerge-keymap 'button3 'smerge-menu))
- (define-key smerge-keymap [mouse-1] 'smerge-mousable)
- (define-key smerge-keymap [mouse-2] 'smerge-mousable)
- (define-key smerge-keymap [mouse-3] 'smerge-menu))
-
- (define-key smerge-keymap "\C-m" 'smerge-ediff-or-copy)
- (define-key smerge-keymap "g" 'smerge-reload)
- (define-key smerge-keymap "r" 'smerge-reload)
- (define-key smerge-keymap "n" 'smerge-next)
- (define-key smerge-keymap "p" 'smerge-prev)
- ))
-
-;;;###autoload
-(defun smerge (flags &optional dir1 dir2)
- "Merge two directories recursively."
- (interactive "p")
- (smerge-init)
- (unless dir1
- (setq dir1 (read-directory-name "Directory 1: " nil nil t)))
- (unless dir2
- (setq dir2 (read-directory-name "Directory 2: " nil nil t)))
- (switch-to-buffer smerge-buffer) ;; Yes I want to be in the output buffer
- (toggle-read-only 0) ;; writable
- (setq smerge-flags flags)
- (setq smerge-dir1 (file-name-as-directory (expand-file-name dir1)))
- (setq smerge-dir2 (file-name-as-directory (expand-file-name dir2)))
- (smerge-recursive-diff)
- (smerge-fixup-filenames)
- (when smerge-cvsignore (smerge-cvsignore smerge-dir1))
- (smerge-post-process flags)
- (toggle-read-only 1) ;; read-only
- )
-
-(defun smerge-reload ()
- "Rediff two directories recursively."
- (interactive)
- (smerge smerge-flags smerge-dir1 smerge-dir2))
-
-(defun smerge-recursive-diff ()
- (let (rc)
- (erase-buffer)
- (dolist (exclude smerge-diff-excludes) (insert (concat exclude "\n")))
- (write-region (point-min) (point-max) smerge-exclude-file nil 'no-message)
- (erase-buffer)
- (let ((diff-options (concat "--exclude-from=" smerge-exclude-file
- " -r" " --brief " smerge-diff-options)))
- ;; Since we are tightly coupled with ediff, use their program!
- ;; This erases the diff buffer automatically.
- (ediff-exec-process smerge-diff-program
- (current-buffer)
- 'synchronize
- diff-options
- smerge-dir1 smerge-dir2))
- (delete-file smerge-exclude-file)
- (when smerge-raw-diff-output
- (write-region (point-min) (point-max) smerge-raw-diff-output))
- (and (numberp rc) (eq rc 0))))
-
-(defun smerge-fixup-filenames ()
- "Diff splits the `Only in' files into directory and filename.
-Top level directories end in /, subdirs do not."
- (goto-char (point-min))
- (while (re-search-forward "^\\(Only in [^:]*\\)\\(.\\): " nil t)
- (if (string= (match-string 2) "/")
- (replace-match "\\1/" nil nil)
- (replace-match "\\1\\2/" nil nil))))
-
-(defun smerge-post-process (flags)
- (let (match extent file start)
- (goto-char (point-min))
- (insert (format "Diff %s and %s\n\n" smerge-dir1 smerge-dir2))
- (setq start (point))
-
- (cond ((> flags 4) ;; c-u c-u
- ;; Remove different files
- (while (re-search-forward "^Files .*\n" nil t)
- (replace-match "")))
- ((> flags 1) ;; c-u
- ;; Remove the unique files
- (while (re-search-forward "^Only in .*\n" nil t)
- (replace-match ""))))
-
- ;; Only in 1
- (setq match (format "^Only in %s\\(.*\\)$" smerge-dir1))
- (goto-char (point-min))
- (while (re-search-forward match nil t)
- (setq file (match-string 1))
- (setq extent
- (smerge-make-extent (match-beginning 0) (match-end 0) 'smerge-only1-face))
- (set-extent-property extent 'type 2)
- (replace-match file)
- )
-
- ;; Only in 2
- (setq match (format "^Only in %s\\(.*\\)$" smerge-dir2))
- (goto-char (point-min))
- (while (re-search-forward match nil t)
- (setq file (match-string 1))
- (setq extent
- (smerge-make-extent (match-beginning 0) (match-end 0) 'smerge-only2-face))
- (set-extent-property extent 'type 1)
- (replace-match (concat "\t\t\t\t" file))
- )
-
- ;; Both
- (setq match (format "^Files %s\\(.+\\) and %s.+ differ$" smerge-dir1 smerge-dir2))
- (goto-char (point-min))
- (while (re-search-forward match nil t)
- (setq file (match-string 1))
- (setq extent
- (smerge-make-extent (match-beginning 0) (match-end 0) 'smerge-diff-face))
- (set-extent-property extent 'type 3)
- (replace-match (concat "\t\t" file))
- )
-
- ;; Back to start
- (goto-char start)
- (if (re-search-forward "\\w" nil t) (forward-char -1))
- ))
-
-(autoload 'defadvice "advice" nil nil 'macro)
-
-(defadvice ediff-quit (after smerge activate)
- (when (extentp smerge-extent)
- (set-extent-property smerge-extent 'face 'smerge-merged-face) ;; SAM
- (delete-other-windows)
- (switch-to-buffer smerge-buffer)
- (let ((next (next-extent smerge-extent))
- start)
- (when next
- (setq start (extent-start-position next))
- (goto-char start)
- (if (re-search-forward "\\w" nil t) (forward-char -1))
- ))
- (setq smerge-extent nil) ;; done
- ))
-
-(defun smerge-file (extent)
- "Given a smerge extent, return the file name."
- (let ((file (buffer-substring
- (extent-start-position extent)
- (extent-end-position extent))))
- (string-match "\t*\\(.*\\)" file)
- (match-string 1 file)))
-
-(defun smerge-menu (event)
- "This is called on a right mouse click in the display window.
-Pops up a menu that allows copying the file to directory one or two."
- (interactive "e")
- (let ((extent (extent-at (event-point event))))
- (unless extent (error "No extent at point"))
- (setq smerge-file (smerge-file extent))
- (setq smerge-extent extent)
- (popup-menu smerge-copy-menu)))
-
-
-(defun smerge-mousable (event)
- "This is called on a left or middle mouse click in the display window."
- (interactive "e")
- (smerge-ediff (extent-at (event-point event))))
-
-(defun smerge-ediff-or-copy ()
- "Ediff or copy the file."
- (interactive)
- (let* ((extent (extent-at (point)))
- (type (extent-property extent 'type)))
- (unless extent (error "No extent at point"))
- (cond ((or (eq type 1) (eq type 2))
- (setq smerge-file (smerge-file extent))
- (smerge-copy 1 t))
- ((eq type 3) (smerge-ediff extent))
- (t (beep)))))
-
-(defun smerge-ediff (&optional extent)
- "Ediff the two files."
- (interactive)
- (let (file)
- (unless extent
- (setq extent (extent-at (point)))
- (unless extent (error "No extent at point")))
- (if (eq (extent-property extent 'type) 3)
- (progn
- (setq smerge-extent extent)
- (setq file (smerge-file extent))
- (ediff-files
- (concat smerge-dir1 file) (concat smerge-dir2 file)))
- (beep))))
-
-
-(defun smerge-allow-dir (dir)
- "Are we allowed to copy to this directory."
- (let ((type (extent-property smerge-extent 'type)))
- (if type
- (> (logand (extent-property smerge-extent 'type) dir) 0)
- (message "WARNING: No type for extent!")
- 0)))
-
-;; Copy file preserving the destination modes if necessary
-(defun smerge-copy-file (src dst &optional ok-if-already-exists keep-time)
- (let ((modes (file-modes dst)))
- (copy-file src dst ok-if-already-exists keep-time)
- (and smerge-preserve-modes
- modes
- (set-file-modes dst modes))))
-
-(defun smerge-copy (dir &optional ask)
- "Do the copy to the directory specified."
- (let ((file1 (concat smerge-dir1 smerge-file))
- (file2 (concat smerge-dir2 smerge-file))
- src dst)
- (cond ((eq dir 1) (setq src file2 dst file1))
- ((eq dir 2) (setq src file1 dst file2))
- (t (error "Huh?")))
- (when (or (not ask)
- (yes-or-no-p (format "Copy to %s? " dst)))
- (smerge-copy-file src dst t t)
- ;; Mark as merged
- (set-extent-property smerge-extent 'face 'smerge-merged-face)
- ;; If this is an "only" mark as copied
- (when (< (extent-property smerge-extent 'type) 3)
- (set-extent-property smerge-extent 'type 0))
- (setq smerge-extent nil)
- )))
-
-(defun smerge-make-extent (start end face)
- (let (extent)
- (setq end (1+ end)) ;; include the NL
- (setq extent (make-extent start end))
- (set-extent-face extent face)
- (set-extent-mouse-face extent 'highlight)
- (set-extent-keymap extent smerge-keymap)
- extent
- ))
-
-;; .cvsignore code
-
-(defun smerge-find-ignores (dir)
- "Find all the .cvsignore files recursively from `dir'. `dir' must end in /."
- (let ((dirlist (smerge-dirlist dir nil "^[^.].*" nil 'dirs))
- (file (concat dir ".cvsignore"))
- filelist)
- (if (file-exists-p file) (setq filelist (list file)))
- (dolist (subdir dirlist)
- (unless (string= subdir "CVS")
- (setq filelist (append filelist
- (smerge-find-ignores (concat dir subdir "/"))))))
- filelist))
-
-(defun smerge-build-ignore-list (dir)
- "Build a list of files/directories to ignore. `dir' must end in /."
- (let ((list (smerge-find-ignores dir))
- (buff (get-buffer-create "*smerge-cvsignores*"))
- start)
- (save-excursion
- (set-buffer buff)
- (erase-buffer)
- (dolist (file list)
- (setq start (point))
- (insert-file-contents file)
- (goto-char start)
- (while (re-search-forward "^" nil t)
- (insert file)))
- (goto-char (point-min))
- (while (re-search-forward ".cvsignore" nil t)
- (replace-match ""))
- ;; Protect . from regexp
- (goto-char (point-min))
- (while (search-forward "." nil t)
- (replace-match "\\\\."))
- ;; Convert * -> .*
- (goto-char (point-min))
- (while (search-forward "*" nil t)
- (replace-match ".*"))
- ;; Build the list
- (setq list nil)
- (goto-char (point-min))
- (while (re-search-forward "^.+$" nil t)
- (setq list (cons (match-string 0) list))))
- (unless smerge-keep-cvsignore-buffer
- (kill-buffer buff))
- list))
-
-(defun smerge-cvsignore (dir)
- "smerge internal function to remove the .cvsignore matches"
- (let ((list (smerge-build-ignore-list dir))
- match)
- (dolist (ignore list)
- (goto-char (point-min))
- ;; Only match complete matches
- ;; We cannot use \b here since we are matching filenames
- (setq match (concat ignore "\\s-"))
- (while (re-search-forward match nil t)
- ;; Since we match the \n at the end of some lines...
- (goto-char (match-beginning 0))
- (kill-entire-line)
- ))))
-
-;; .cvsignore code ends
-
-(provide 'smerge)
Index: xetla-browse.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xetla/xetla-browse.el,v
retrieving revision 1.1
diff -u -p -u -r1.1 xetla-browse.el
--- xetla-browse.el 4 Apr 2005 13:27:20 -0000 1.1
+++ xetla-browse.el 25 Dec 2005 10:52:08 -0000
@@ -63,7 +63,8 @@
;;; Code:
(eval-when-compile
(require 'cl)
- (autoload 'easy-mmode-define-keymap "easy-mmode"))
+ (autoload 'easy-mmode-define-keymap "easy-mmode")
+ (autoload 'ad-add-advice "advice"))
(require 'tree-widget)
(require 'xetla)
Index: xetla-core.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xetla/xetla-core.el,v
retrieving revision 1.1
diff -u -p -u -r1.1 xetla-core.el
--- xetla-core.el 4 Apr 2005 13:27:20 -0000 1.1
+++ xetla-core.el 25 Dec 2005 10:52:09 -0000
@@ -402,12 +402,18 @@ ones are killed.")
It will eventually be killed when the number of buffers in
`xetla-dead-process-buffer-queue'exceeds `xetla-number-of-dead-process-buffer'."
(add-to-list 'xetla-dead-process-buffer-queue buffer t)
+ (setq xetla-dead-process-buffer-queue
+ (remove-if-not #'buffer-live-p xetla-dead-process-buffer-queue))
(when xetla-number-of-dead-process-buffer
(while (> (length xetla-dead-process-buffer-queue)
(max 2 xetla-number-of-dead-process-buffer))
- (kill-buffer (car xetla-dead-process-buffer-queue))
- (setq xetla-dead-process-buffer-queue
- (cdr xetla-dead-process-buffer-queue)))))
+ (let ((currbuf (car xetla-dead-process-buffer-queue)))
+ ;; just to be completely certain
+ (when (buffer-live-p currbuf)
+ (kill-buffer currbuf))
+ ;; now remove that killed buffer
+ (setq xetla-dead-process-buffer-queue
+ (cdr xetla-dead-process-buffer-queue))))))
(defvar xetla-last-process-buffer nil
"The last created process buffer.")
@@ -695,7 +701,7 @@ with `xetla-open-internal-log-buffer'."
(toggle-read-only 1))
(define-derived-mode xetla-process-buffer-mode fundamental-mode
- "Xetla Process"
+ "XEtla Process"
"Major mode for process buffers. Mainly defines \\[bury-buffer]
to quit the buffer"
(toggle-read-only 1))
Index: xetla-tips.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xetla/xetla-tips.el,v
retrieving revision 1.1
diff -u -p -u -r1.1 xetla-tips.el
--- xetla-tips.el 4 Apr 2005 13:27:20 -0000 1.1
+++ xetla-tips.el 25 Dec 2005 10:52:09 -0000
@@ -59,7 +59,7 @@
to show you interesting features that you may have missed! Disable me
by setting the variable `xetla-tips-enabled' to nil.
-Press q to exit, n to view next tip, p to view previous tip."
+Press `q' to exit, `n' to view next tip, `p' to view previous tip."
"For the available xetla commands Xetla provides a corresponding interactive
function.
Some examples:
@@ -70,57 +70,69 @@ M-x xetla-changes ... runs tla chang
XEtla prompts for the needed parameters."
"Most interesting commands are available through a global keyboard
-shortcut. Try \"C-x T C-h\" to get a list"
+shortcut. Try `C-x T C-h' to get a list"
"XEtla provides several major modes for different buffers. Each mode
-has its own keybindings. Get help with \"C-h m\""
- "When XEtla is loaded, C-M-h in a minibuffer prompt gives you help
+has its own keybindings. Get help with `\\[describe-mode]'"
+ "When XEtla is loaded, `C-M-h' in a minibuffer prompt gives you help
about the command being run."
"When you are prompted for an archive, category, branch, version or
-revision name, lots of keybindings are available. Get a list with \"C-h\"."
- "XEtla allows you to manage a list of bookmarks. Try \"C-x T b\" and add
+revision name, lots of keybindings are available. Get a list with `C-h'."
+ "XEtla allows you to manage a list of bookmarks. Try `\\[xetla-bookmarks]' and add
bookmarks from the menu. You may also add bookmarks from an archives,
category, version or revision buffer as well as from the xetla-browse
buffer."
"From the bookmark buffer, you can select some bookmarks and make
-them partners with M-p. Afterwards, pressing 'M m' on a bookmark will
+them partners with \\<xetla-bookmarks-mode-map>`\\[xetla-bookmarks-marked-are-partners]'. Afterwards, pressing `\\[xetla-bookmarks-missing]' on a bookmark will
show you the missing patches from his partners."
- "You can add changelog style comments to your commit log by \"C-x T a\"."
+ "You can add changelog style comments to your commit log by `\\[xetla-add-log-entry]'."
"You can enable ispell, flyspell or other useful mode for editing
-log files by \"M-x customize-variable RET xetla-log-edit-mode-hook RET\"."
+log files by `M-x customize-variable RET xetla-log-edit-mode-hook RET'."
"By default, XEtla caches any log file you retrieve with
`xetla-cat-log' or `xetla-cat-archive-log' in ~/.arch-log-library. This
speeds up many XEtla operations.
You can disable this by setting `xetla-log-library-greedy' to nil."
"XEtla is highly customizable.
-Start it by \"M-x customize-group RET xetla RET\"."
+Start it by `M-x customize-group RET xetla RET'."
"In an *xetla-changes* buffer you can quickly jump to the source file by
-\"RET\", or view the source file in another window by \"v\", or start
-an ediff session by \"e\" to inspect/reject parts of the changes."
+`RET', or view the source file in another window by `v', or start
+an ediff session by `e' to inspect/reject parts of the changes."
"In a *xetla-changes* buffer, you can quickly jump from the list of
-files to the corresponding patch hunk, and come back with \"j\""
+files to the corresponding patch hunk, and come back with `j'"
"After committing, you can review the last committed patch with
-\"M-x xetla-changes-last-revision RET\".
+`M-x xetla-changes-last-revision RET'.
Usefull to review and fix a patch you've just merged without mixing
manual modifications and merge in the same patch."
- "After a merge, typing \"C-c m\" in the log buffer will generate
+ "After a merge, typing \\<xetla-log-edit-mode-map> `\\[xetla-log-edit-insert-log-for-merge-and-headers]' in the log buffer will generate
for you a summary line, keyword and body. This is highly
customizable."
- "Report bugs using M-x xetla-submit-bug-report RET"
- "You've got a nice, graphical, archive browser one M-x xetla-browse
-RET away."
- "In the bookmark buffer, pressing \"C-x C-f\" starts with the local
+ "Report bugs using `M-x xetla-submit-bug-report RET'"
+ "You've got a nice, graphical, archive browser one
+`M-x xetla-browse RET' away."
+ "In the bookmark buffer, pressing\\<xetla-bookmarks-mode-map> `\\[xetla-bookmarks-find-file] starts with the local
tree of the bookmark at point for the default directory."
- "SMerge mode is an Emacs minor mode usefull to resolve conflicts
-after a -three-way merge. XEtla will enter this mode automatically
-when you open a file with conflicts. Type M-x xetla-conflicts-finish RET
-to exit smerge mode and delete the corresponding .rej file."
- "\"C-x T e\" in a source file will open an ediff session with the
+ "`\\[xetla-file-ediff]' in a source file will open an ediff session with the
unmodified version of the file. From here, you can undo patch hunks
-one by one with the key \"b\""
+one by one with the key `b'"
"In the *tree-lint* buffer, with your cursor on a message, most
commands will apply to all the files listed under this message."
+ "Many XEtla commands accept one or more prefix arguments. For example,
+from the *xetla-log-edit* buffer:
+\\<xetla-log-edit-mode-map>
+ `\\[xetla-log-edit-done]' -- Save and kill the log buffer
+ `\\[universal-argument] \\[xetla-log-edit-done]' -- Save and kill the log, plus commit the changes
+ `\\[universal-argument] \\[universal-argument] \\[xetla-log-edit-done]' -- Save and kill the log, plus commit and \"seal\"
+`\\[universal-argument] \\[universal-argument] \\[universal-argument] \\[xetla-log-edit-done]' -- Save and kill the log, plus commit and \"fix\"
+
+All of the XEtla commands that accept prefix arguments are documented,
+so use `\\[describe-function] xetla-[command] RET' to see more nifty
+tricks."
+ "Give a prefix argument to M-x xetla-changelog and you'll be prompted
+for a version to display a ChangeLog for. This is handy if you want to
+see a ChangeLog for a previous version of a project."
+ "In a *xetla-changes* buffer, hit RET with point somewhere in the diff
+and you'll be taken to that exact spot in the source file."
]
"List of tips. Add more !")
@@ -152,7 +164,7 @@ Commands:
"************************* Did you know? *************************"
'xetla-messages)
"\n\n")
- (insert message)
+ (insert (substitute-command-keys message))
(newline 2)
(insert (xetla-face-add
"*********************************************************************"
Index: xetla-version.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xetla/xetla-version.el,v
retrieving revision 1.1
diff -u -p -u -r1.1 xetla-version.el
--- xetla-version.el 4 Apr 2005 13:27:21 -0000 1.1
+++ xetla-version.el 25 Dec 2005 10:52:09 -0000
@@ -1,5 +1,5 @@
;;; Automatically generated file -- DO NOT EDIT OR DELETE
;;;###autoload
(defconst xetla-version
- "steve(a)eicq.org--2005/xetla--main--1.0--version-0")
+ "steve(a)eicq.org--2005/xetla--main--1.1--version-0")
(provide 'xetla-version)
Index: xetla.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/xetla/xetla.el,v
retrieving revision 1.1
diff -u -p -u -r1.1 xetla.el
--- xetla.el 4 Apr 2005 13:27:21 -0000 1.1
+++ xetla.el 25 Dec 2005 10:52:11 -0000
@@ -1,7 +1,7 @@
;;; xetla.el --- Arch (tla) interface for XEmacs
;; Copyright (C) 2003-2004 by Stefan Reichoer (GPL)
-;; Copyright (C) 2004 Steve Youngs (BSD)
+;; Copyright (C) 2004 2005 Steve Youngs (BSD)
;; Author: Steve Youngs <steve(a)eicq.org>
;; Maintainer: Steve Youngs <steve(a)eicq.org>
@@ -94,6 +94,123 @@
;;; Code:
+;;; XEtla/Xtla safety code
+;; You can run into some problems if you have both XEtla and Xtla
+;; installed at the same time. The following attempts to guard
+;; against it by warning the user and giving them a couple of
+;; functions for disabling one of XEtla or Xtla in their current
+;; session. Dangerous stuff!!
+(defvar xetla-dont-warn-about-xtla nil)
+
+(when (and (featurep 'xtla)
+ (not xetla-dont-warn-about-xtla))
+ (xetla-warn-about-xtla))
+
+(defconst xetla-warn-about-xtla-text
+ "We have detected that you have both XEtla and Xtla installed.
+
+This is never a very good idea (unless you _really_ know what you are
+doing) because both packages share similar key bindings and install
+similar hooks.
+
+Our suggestion is that you remove either XEtla or Xtla and just use the
+other. For your convenience there is `xetla-attempt-xetla-removal' and
+`xetla-attempt-xtla-removal', which will attempt to disable one of the
+packages for the current session only.
+
+Use those functions at your own risk. The best answer is to not load
+one of XEtla or Xtla in the first place.
+
+To disable this warning: (setq xetla-dont-warn-about-xtla t).")
+
+(defun xetla-warn-about-xtla ()
+ "Pop up a big fat warning about trying to use XEtla and xtla together."
+ (get-buffer-create "*XEtla/Xtla Warning*")
+ (with-current-buffer "*XEtla/Xtla Warning*"
+ (erase-buffer)
+ (insert xetla-warn-about-xtla-text))
+ (pop-to-buffer "*XEtla/Xtla Warning*"))
+
+(defun xetla-attempt-xetla-removal ()
+ "Attempt to disable xetla.
+
+**** This is dangerous, use at your own risk. ****
+
+This function attempts to unload all the XEtla features, remove the
+`xetla-find-file-hook', remove entries from `auto-mode-alist', and
+finally, remove the XEtla lisp directory from the `load-path'. After
+all of this has happened, Xtla should run without problems. Please
+note that we do _NOT_ guarantee that this will work perfectly and you
+really should physically remove either XEtla or Xtla.
+
+Use of this function is only valid in the current session, in other
+words, it ain't saved."
+ (interactive)
+ ;; unload the features
+ (when (featurep 'xetla-tips) (unload-feature 'xetla-tips t))
+ (when (featurep 'xetla-browse) (unload-feature 'xetla-browse t))
+ (when (featurep 'xetla) (unload-feature 'xetla t))
+ (when (featurep 'xetla-core) (unload-feature 'xetla-core t))
+ (when (featurep 'xetla-defs) (unload-feature 'xetla-defs t))
+ (when (featurep 'xetla-autoloads) (unload-feature 'xetla-autoloads t))
+ ;; remove the hooks
+ (remove-hook 'find-file-hooks 'xetla-find-file-hook)
+ ;; clean out auto-mode-alist
+ (setq auto-mode-alist
+ (delete '("\\+\\+log\\." . xetla-log-edit-mode) auto-mode-alist))
+ (setq auto-mode-alist
+ (delete '("/\\(=tagging-method\\|\\.arch-inventory\\)$" . xetla-inventory-file-mode)
+ auto-mode-alist))
+ ;; clean out the load-path
+ (setq load-path
+ (remove (file-name-directory (locate-library "xetla")) load-path))
+ ;; did I miss anything?
+ ;; what can we do about key bindings?
+
+ (message "To ensure correct key bindings, please reload Xtla"))
+
+(defun xetla-attempt-xtla-removal ()
+ "Attempt to disable Xtla.
+
+**** This is dangerous, use at your own risk. ****
+
+This function attempts to unload all the Xtla features, remove the
+`tla-find-file-hook', remove entries from `auto-mode-alist', and
+finally, remove the XEtla lisp directory from the `load-path'. After
+all of this has happened, XEtla should run without problems. Please
+note that we do _NOT_ guarantee that this will work perfectly and you
+really should physically remove either XEtla or Xtla.
+
+Use of this function is only valid in the current session, in other
+words, it ain't saved."
+ (interactive)
+ ;; unload the features
+ (when (featurep 'xtla-tips) (unload-feature 'xtla-tips t))
+ (when (featurep 'xtla-browse) (unload-feature 'xtla-browse t))
+ (when (featurep 'xtla) (unload-feature 'xtla t))
+ (when (featurep 'xtla-core) (unload-feature 'xtla-core t))
+ (when (featurep 'xtla-defs) (unload-feature 'xtla-defs t))
+ (when (featurep 'xtla-emacs) (unload-feature 'xtla-emacs t))
+ (when (featurep 'xtla-xemacs) (unload-feature 'xtla-xemacs t))
+ (when (featurep 'xtla-autoloads) (unload-feature 'xtla-autoloads t))
+ ;; remove the hooks
+ (remove-hook 'find-file-hooks 'tla-find-file-hook)
+ ;; clean out auto-mode-alist
+ (setq auto-mode-alist
+ (delete '("\\+\\+log\\." . tla-log-edit-mode) auto-mode-alist))
+ (setq auto-mode-alist
+ (delete '("/\\(=tagging-method\\|\\.arch-inventory\\)$" . tla-inventory-file-mode)
+ auto-mode-alist))
+ ;; clean out the load-path
+ (setq load-path
+ (remove (file-name-directory (locate-library "xtla")) load-path))
+ ;; did I miss anything?
+ ;; what can we do about key bindings?
+ (message "To ensure correct key bindings, please reload XEtla"))
+
+;;; End XEtls/Xtla safety code
+
+
(eval-and-compile
(when (locate-library "xetla-version")
(require 'xetla-version)))
@@ -2731,9 +2848,72 @@ correctly filled in."
(dolist (function xetla-commit-check-log-buffer-functions)
(funcall function)))
+(defcustom xetla-warn-about-conflict-files t
+ "*When non-`nil' ask whether to commit if conflict files are present.
+When `nil' commit anyway."
+:group 'xetla)
+
+(defun xetla-commit-find-conflict-files (dir)
+ "Searches for conflict files in the current working directory."
+ (when (file-readable-p dir)
+ (let* ((dirs (directory-files dir t "^[^.]+$" nil 'subdirs))
+ (cur (directory-files dir t "\\.rej"))
+ (sub (mapcar #'xetla-commit-find-conflict-files dirs)))
+ (setq cur (delete nil cur))
+ (setq sub (delete nil sub))
+ (if sub
+ (append cur sub)
+ cur))))
+
+(defun xetla-commit-seal (&optional force)
+ "Commit a `version-0' revision to seal a repo.
+
+This calls `tla commit --seal'. With optional argument FORCE, don't
+prompt for confirmation."
+ (interactive)
+ (when (or force
+ (y-or-n-p
+ (format "Do you really want to seal `%s'? "
+ (xetla-tree-version))))
+ (if (string-match "--version\\(-\\|fix-\\)+"
+ (xetla-get-current-revision default-directory))
+ (error "Revision already sealed, use `xetla-commit-fix' instead")
+ (xetla-commit
+ (lambda (output error status args)
+ (xetla-tips-popup-maybe))
+ 'seal))))
+
+(defun xetla-commit-fix (&optional force)
+ "Commit a `versionfix' revision.
+
+This calls `tla commit --fix'. With optional argument FORCE, don't
+prompt for confirmation."
+ (interactive)
+ (when (or force
+ (y-or-n-p
+ (format "Do you really want to versionfix `%s'? "
+ (xetla-tree-version))))
+ (if (not (string-match "--version\\(-\\|fix-\\)+"
+ (xetla-get-current-revision default-directory)))
+ (error "Revision not sealed")
+ (xetla-commit
+ (lambda (output error status args)
+ (xetla-tips-popup-maybe))
+ 'fix))))
+
;;;###autoload
-(defun xetla-commit (&optional handler)
- "Run tla commit."
+(defun xetla-commit (&optional handler version-flag)
+ "Run tla commit.
+
+Optional argument HANDLER is the process handler for the commit
+command.
+
+Optional argument VERSION-FLAG may be one of the symbols
+'seal to commit a sealed version
+'fix to commit a fix version
+If omitted it defaults to a normal commit.
+
+When the commit finishes successful, `tla-commit-done-hook' is called."
(interactive)
(with-current-buffer
(find-file-noselect (xetla-make-log))
@@ -2745,6 +2925,16 @@ correctly filled in."
(y-or-n-p
"Commit with unsaved changes is a bad idea. Continue anyway? ")
(error "Not committing"))
+ (and xetla-warn-about-conflict-files
+ ;; fsck it, actually we dont need all the .rej files (yet), so
+ ;; speed up would be to unwind the recursion after the first
+ ;; occurrence of a .rej
+ (xetla-commit-find-conflict-files ".")
+ (or (y-or-n-p
+ (concat
+ "Commit with unresolved conflicts is a bad idea. "
+ "Continue anyway? "))
+ (error "Not committing")))
(let* ((file-list (and (buffer-live-p xetla-buffer-source-buffer)
(with-current-buffer xetla-buffer-source-buffer
xetla-buffer-marked-file-list)))
@@ -2755,8 +2945,13 @@ correctly filled in."
(xetla-run-tla-async
(cons "commit"
(cons (when xetla-strict-commits "--strict")
- (when file-list (cons "--"
- file-list))))
+ (cons (cond
+ ((eq version-flag 'fix) "--fix")
+ ((eq version-flag 'seal) "--seal")
+ ((eq version-flag nil) nil)
+ (t (error "Wrong version flag: %s" version-flag)))
+ (when file-list (cons "--"
+ file-list)))))
:finished handler))))
(defun xetla-import ()
@@ -2782,16 +2977,23 @@ correctly filled in."
(xetla-run-tla-sync '("pristines")))
;;;###autoload
-(defun xetla-changelog ()
+(defun xetla-changelog (&optional version)
"Run \"tla changelog\".
-display the result in an improved ChangeLog mode."
- (interactive)
- (let ((default-directory (xetla-read-project-tree-maybe)))
- (xetla-run-tla-sync '("changelog")
+Display the result in an improved ChangeLog mode.
+With prefix arg, VERSION, display that version's changelog."
+ (interactive "p")
+ (let ((default-directory (xetla-read-project-tree-maybe))
+ (version (when current-prefix-arg
+ (xetla-name-construct
+ (xetla-name-read "ChangeLog for version: "
+ 'prompt 'prompt 'prompt 'prompt)))))
+ (xetla-run-tla-sync (list "changelog" version)
:finished 'xetla-null-handler)
(xetla-show-last-process-buffer 'changelog 'xetla-changelog-mode)
- (goto-char (point-min))))
+ (goto-char (point-min))
+ (view-mode nil (lambda (&rest args)
+ (xetla-buffer-quit)))))
;;;###autoload
(defun xetla-logs ()
@@ -2820,6 +3022,39 @@ display the result in an improved Change
(set (make-local-variable 'xetla-buffer-refresh-function)
'xetla-logs))))))
+(defun xetla-help-via-keyb ()
+ (interactive)
+ (let ((ext (extent-string (extent-at (point)))))
+ (xetla-help ext)))
+
+(defun xetla-help-via-mouse (event)
+ (interactive "e")
+ (goto-char (event-point event))
+ (let ((ext (extent-string (extent-at (point)))))
+ (xetla-help ext)))
+
+(defconst xetla-help-extent-map
+ (let* ((map (make-sparse-keymap 'xetla-help-extent-map)))
+ (define-key map [button2] 'xetla-help-via-mouse)
+ (define-key map [return] 'xetla-help-via-keyb)
+ map)
+ "A keymap for the extents in output from `tla help'.")
+
+(defun xetla-display-global-help (buffer &rest args)
+ (switch-to-buffer buffer)
+ (xetla-process-buffer-mode)
+ (goto-char (point-min))
+ (save-excursion
+ (while (re-search-forward "\\(\\w+.*\\) : " nil t)
+ (let ((extent (make-extent (match-beginning 1) (match-end 1)))
+ (echo "RET or button2 for help on this command."))
+ (set-extent-property extent 'face 'widget-button-face)
+ (set-extent-property extent 'mouse-face 'highlight)
+ (set-extent-property extent 'keymap xetla-help-extent-map)
+ (set-extent-property extent 'help-echo echo)
+ (set-extent-property extent 'balloon-help echo)
+ (set-extent-property extent 'duplicable t)))))
+
;;;###autoload
(defun xetla-help (command)
"Run tla COMMAND -H."
@@ -2839,7 +3074,11 @@ display the result in an improved Change
(cons (list (match-string 1))
listcmd)))
listcmd)))))))
- (xetla-run-tla-sync (list command "-H")))
+ (if (string= command "")
+ (xetla-run-tla-sync
+ '("help")
+:finished 'xetla-display-global-help)
+ (xetla-run-tla-sync (list command "-H"))))
(defun xetla-tree-version-list-tla ()
"Return the tree version, or nil if not in a project tree."
@@ -3155,6 +3394,10 @@ Limit to CATEGORY-BRANCH-VERSION. If FRO
(defun xetla-star-merge (from &optional to-tree)
"Star merge from version/revision FROM to local tree TO-TREE."
+ (interactive (list (xetla-name-construct
+ (xetla-name-read "Star merge from (version or revision): "
+ 'prompt 'prompt 'prompt 'prompt 'maybe))
+ (read-directory-name "In tree: ")))
(let ((to-tree (when to-tree (expand-file-name to-tree))))
(or (xetla-save-some-buffers (or to-tree default-directory))
(y-or-n-p
@@ -3320,35 +3563,14 @@ Can be
(defvar xetla-bookmarks-marked-list nil
"A list of marked bookmarks.")
-(defun xetla-bookmarks-load-from-file-OBSOLETE (&optional force)
- "Load bookmarks from the bookmarks file.
-If FORCE is non-nil, reload the file even if it was loaded before."
- (when (or force (not xetla-bookmarks-loaded))
- (let ((file (xetla-config-file-full-path xetla-bookmarks-file-name t)))
- (save-excursion
- (unless (file-exists-p file)
- (with-temp-buffer
- (insert "()")
- (write-file file)))
- (unless (file-readable-p file)
- (error "Xetla bookmark file not readable"))
- (with-temp-buffer
- (insert-file-contents file)
- (setq xetla-bookmarks-alist (read (current-buffer))
- xetla-bookmarks-loaded t))))))
-
(defun xetla-bookmarks-load-from-file (&optional force)
"Load bookmarks from the file `xetla-bookmarks-file-name'.
If FORCE is non-nil, reload the file even if it was loaded before."
- ;; TODO remove condition case (after some time)
- (condition-case nil
- (when (or force (not xetla-bookmarks-loaded))
- (xetla-load-state (xetla-config-file-full-path
- xetla-bookmarks-file-name t))
- (setq xetla-bookmarks-loaded t))
- (error (progn
- (xetla-bookmarks-load-from-file-OBSOLETE force)))))
+ (when (or force (not xetla-bookmarks-loaded))
+ (xetla-load-state (xetla-config-file-full-path
+ xetla-bookmarks-file-name t))
+ (setq xetla-bookmarks-loaded t)))
(defun xetla-bookmarks-save-to-file ()
"Save `xetla-bookmarks-alist' to the file `xetla-bookmarks-file-name'."
@@ -3479,8 +3701,8 @@ If prefix argument ARG is specified, the
if already set in the bookmarks."
(interactive "P")
(unless xetla-bookmarks-cookie
- (error "Please, run this command from the bookmarks buffer%s"
- " (M-x xetla-bookmarks RET)"))
+ (error "Wrong buffer, run: `%s' and try again"
+ (substitute-command-keys "\\[xetla-bookmarks]")))
(let ((list (or xetla-bookmarks-marked-list
(list (ewoc-data (ewoc-locate
xetla-bookmarks-cookie))))))
@@ -3873,17 +4095,30 @@ parsed."
local-tree)))))))
(defun xetla-bookmarks-open-tree ()
- "Open a local tree in a dired buffer."
+ "Open a local tree in a dired buffer.
+
+With a prefix arg, prompt for a local tree to use."
(interactive)
- (dired-other-window (xetla-bookmarks-read-local-tree)))
+ (let ((x-dired (if (eq xetla-switch-to-buffer-mode 'single-window)
+ 'dired
+ 'dired-other-window))
+ (open (if current-prefix-arg
+ (xetla-bookmarks-read-local-tree nil 'ask)
+ (xetla-bookmarks-read-local-tree))))
+ (funcall x-dired open)))
(defun xetla-bookmarks-find-file ()
"Find a file starting from the local tree of the current bookmark.
+
This way, you can type C-x C-f in the bookmarks buffer to open a file
-of a bookmarked project."
+of a bookmarked project.
+
+With a prefix arg, prompt for the local tree to use."
(interactive)
(let ((default-directory (xetla-uniquify-file-name
- (xetla-bookmarks-read-local-tree))))
+ (if current-prefix-arg
+ (xetla-bookmarks-read-local-tree nil 'ask)
+ (xetla-bookmarks-read-local-tree)))))
(call-interactively 'find-file)))
(defun xetla-bookmarks-tag (arg)
@@ -3894,8 +4129,8 @@ prefix argument ARG is given, explicitly
from."
(interactive "P")
(unless xetla-bookmarks-cookie
- (error "Please, run this command from the bookmarks buffer%s"
- " (M-x xetla-bookmarks RET)"))
+ (error "Not in bookmarks buffer, run: `%s' and try again"
+ (substitute-command-keys "\\[xetla-bookmarks]")))
(let ((list (or xetla-bookmarks-marked-list
(list (ewoc-data (ewoc-locate xetla-bookmarks-cookie))))))
(let ((tags (mapcar
@@ -3933,14 +4168,31 @@ from."
(defun xetla-bookmarks-inventory ()
"Run `tla inventory' on a local tree."
(interactive)
- (let ((default-directory (xetla-bookmarks-read-local-tree)))
- (xetla-inventory nil t)))
-
-(defun xetla-bookmarks-changes ()
- "Run `xetla-changes' on a local tree."
- (interactive)
- (let ((default-directory (xetla-bookmarks-read-local-tree)))
- (xetla-changes nil nil)))
+ (let ((default-directory (if current-prefix-arg
+ (xetla-bookmarks-read-local-tree nil 'ask)
+ (xetla-bookmarks-read-local-tree))))
+ (xetla-inventory nil
+ (unless (eq xetla-switch-to-buffer-mode 'single-window)
+ t))))
+
+(defun xetla-bookmarks-changes (arg)
+ "Run `xetla-changes' on a local tree.
+
+Prefix argument, ARG, determines whether or not to use a full format or
+summary format and if it should prompt for the local tree to use.
+
+ No prefix arg -- full format, default tree.
+ One prefix arg -- summary format, default tree.
+ Two prefix args -- full format, prompt for tree.
+ Three prefix args -- summary format, prompt for tree."
+ (interactive "p")
+ (let* ((arg (car current-prefix-arg))
+ (default-directory (if (or (eq arg 16) (eq arg 64))
+ (xetla-bookmarks-read-local-tree nil 'ask)
+ (xetla-bookmarks-read-local-tree))))
+ (if (or (eq arg 4) (eq arg 64))
+ (xetla-changes t)
+ (xetla-changes))))
(defmacro xetla-make-move-fn (ewoc-direction function cookie
&optional only-unmerged)
@@ -3993,11 +4245,14 @@ merged by another revision in the same l
;;;###autoload
(defun xetla-bookmarks (&optional arg)
- "Display xetla bookmarks in a buffer.
+ "Display XEtla bookmarks in a buffer.
+
With prefix argument ARG, reload the bookmarks file from disk."
(interactive "P")
(xetla-bookmarks-load-from-file arg)
- (pop-to-buffer "*xetla-bookmarks*")
+ (if (eq xetla-switch-to-buffer-mode 'single-window)
+ (switch-to-buffer (get-buffer-create "*xetla-bookmarks*"))
+ (pop-to-buffer (get-buffer-create "*xetla-bookmarks*")))
(let ((pos (point)))
(toggle-read-only -1)
(erase-buffer)
@@ -4015,11 +4270,7 @@ With prefix argument ARG, reload the boo
(defun xetla-bookmarks-mode ()
- "Major mode to show xetla bookmarks.
-
-You can add a bookmark with '\\<xetla-bookmarks-mode-map>\\[xetla-bookmarks-add]', and remove one with '\\[xetla-bookmarks-delete]'. After
-marking a set of files with '\\[xetla-bookmarks-mark]', make them partners with '\\[xetla-bookmarks-marked-are-partners]', and
-you will then be able to use '\\[xetla-bookmarks-missing]' to view the missing patches.
+ "Major mode to show XEtla bookmarks.
Commands:
\\{xetla-bookmarks-mode-map}"
@@ -5237,6 +5488,20 @@ Sets the archive location to LOCATION."
" ***")
'xetla-separator) "\n")))))))
+(defun xetla-get-current-revision (&optional directory)
+ "Return the current revision in DIRECTORY."
+ (interactive)
+ (let* ((directory (or directory
+ (xetla-read-project-tree-maybe
+ "Get current revision in: ")))
+ (revision (shell-command-to-string
+ (concat "tla revisions --full "
+ (xetla-tree-version directory)
+ "|tail -n1"))))
+ (if (interactive-p)
+ (message revision)
+ revision)))
+
(defun xetla-tree-revisions ()
"Call `xetla-revisions' in the current tree."
(interactive)
@@ -5521,7 +5786,7 @@ Otherwise, run dired."
;;
;; Add
;;
-(defun xetla-add (id &rest files)
+(defun xetla-add-id (id &rest files)
"Using ID, add FILES to this tree."
(interactive (let ((name
(read-file-name "Add file as source: "
@@ -5533,11 +5798,19 @@ Otherwise, run dired."
(if (and id (string= id ""))
(setq id nil))
(setq files (mapcar 'expand-file-name files))
- (if id
- (xetla-run-tla-sync `("add" "--id" ,id . ,files)
-:finished 'xetla-null-handler)
- (xetla-run-tla-sync `("add" . ,files)
-:finished 'xetla-null-handler)))
+ (let* ((arch-ver (or xetla-arch-version-number
+ (xetla-arch-version-number)))
+ (add-id-string
+ (cond ((> 2 (or (cdr-safe (assoc 'minor arch-ver)) 0))
+ "add")
+ (t "add-id"))))
+ (if id
+ (xetla-run-tla-sync `(,add-id-string "--id" ,id . ,files)
+:finished 'xetla-null-handler)
+ (xetla-run-tla-sync `(,add-id-string . ,files)
+:finished 'xetla-null-handler))))
+
+(defalias 'xetla-add 'xetla-add-id)
;;
;; Remove
@@ -5880,7 +6153,7 @@ If INSERT-CHANGELOG is non-nil, insert a
(list (read-file-name "Add file: " default-directory
nil nil
(xetla-get-file-info-at-point))))))
- (apply 'xetla-add nil files)
+ (apply 'xetla-add-id nil files)
(xetla-inventory))
(defun xetla-inventory-remove-files (files id-only)
@@ -6466,7 +6739,7 @@ When the list has been filled in, CALLBA
(point-at-bol) (point)))))
(if (and in-field
(string-match "^[A-Z][A-Za-z]*: $"
- (buffer-substring
+