CVS update by scop packages/unsupported/scop/vc, vc-hooks.el ...

xemacs-cvs at xemacs.org xemacs-cvs at xemacs.org
Sun Jun 24 17:04:24 EDT 2007


  User: scop    
  Date: 07/06/24 23:04:24

  Modified:    packages/unsupported/scop/vc ChangeLog mercurial.el
                        vc-hooks.el vc-xemacs.el vc.el
Log:
Sync vc with upstreams, pull in mercurial.el on demand only.

Revision  Changes    Path
1.87      +1 -1      XEmacs/packages/unsupported/scop/STATUS

Index: STATUS
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/STATUS,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -p -r1.86 -r1.87
--- STATUS	2007/06/16 12:57:24	1.86
+++ STATUS	2007/06/24 21:04:14	1.87
@@ -17,6 +17,6 @@ generic-modes: generic.el and generic-x.
 - Compiles, seems to work, auto-mode-alist and autoloads may need spanking.
 
 vc: vc*.el and a few other related files from GNU Emacs, vc-git.el from git
-- Up to date with GNU Emacs CVS HEAD, hg, git upstream as of 2007-06-16.
+- Up to date with GNU Emacs CVS HEAD, hg, git upstream as of 2007-06-24.
 - Approaching usable state.
 - smerge-mode.el needs work.



1.77      +7 -0      XEmacs/packages/unsupported/scop/vc/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/ChangeLog,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -p -r1.76 -r1.77
--- ChangeLog	2007/06/16 12:57:25	1.76
+++ ChangeLog	2007/06/24 21:04:20	1.77
@@ -1,3 +1,10 @@
+2007-06-24  Ville Skyttä  <scop at xemacs.org>
+
+	* vc.el, mercurial.el: Sync with upstream.
+
+	* mercurial.el, vc-hooks.el, vc-xemacs.el: Pull in mercurial.el
+	on demand only, like other vc-* modes.
+
 2007-06-16  Ville Skyttä  <scop at xemacs.org>
 
 	* vc-arch.el: Sync with upstream.



1.2       +11 -15    XEmacs/packages/unsupported/scop/vc/mercurial.el

Index: mercurial.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/mercurial.el,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -p -r1.1 -r1.2
--- mercurial.el	2007/05/21 16:33:26	1.1
+++ mercurial.el	2007/06/24 21:04:20	1.2
@@ -756,21 +756,19 @@ Push changes                          G 
     (set (make-local-variable 'backup-inhibited) t))
   (run-hooks 'hg-mode-hook))
 
-;; XEmacs change: add autoload cookie
-;;;###autoload
 (defun hg-find-file-hook ()
   (ignore-errors
     (when (hg-mode-line)
       (hg-mode))))
 
-;; XEmacs: autoload cookie not added, pulled in in vc-hooks.el as usual
 (add-hook 'find-file-hooks 'hg-find-file-hook)
 
 (defun hg-after-save-hook ()
-  (let ((old-status hg-status))
-    (hg-mode-line)
-    (if (and (not old-status) hg-status)
-	(hg-mode))))
+  (ignore-errors
+    (let ((old-status hg-status))
+      (hg-mode-line)
+      (if (and (not old-status) hg-status)
+	  (hg-mode)))))
 
 (add-hook 'after-save-hook 'hg-after-save-hook)
 
@@ -1086,20 +1084,19 @@ With a prefix argument, prompt for the p
   "Display the revision history of PATH.
 History is displayed between REV1 and REV2.
 Number of displayed changesets is limited to LOG-LIMIT.
-REV1 defaults to the tip, while
-REV2 defaults to `hg-rev-completion-limit' changes from the tip revision.
+REV1 defaults to the tip, while REV2 defaults to 0.
 LOG-LIMIT defaults to `hg-log-limit'.
 With a prefix argument, prompt for each parameter."
   (interactive (list (hg-read-file-name " to log")
                      (hg-read-rev " to start with"
                                   "tip")
                      (hg-read-rev " to end with"
-                                  (format "%d" (- hg-rev-completion-limit)))
+				  "0")
                      (hg-read-number "Output limited to: "
                                      hg-log-limit)))
   (let ((a-path (hg-abbrev-file-name path))
-        (r1 (or rev1 (format "-%d" hg-rev-completion-limit)))
-        (r2 (or rev2 rev1 "tip"))
+        (r1 (or rev1 "tip"))
+        (r2 (or rev2 "0"))
         (limit (format "%d" (or log-limit hg-log-limit))))
     (hg-view-output ((if (equal r1 r2)
                          (format "Mercurial: Log of rev %s of %s" rev1 a-path)
@@ -1120,15 +1117,14 @@ With a prefix argument, prompt for each 
   "Display the revision history of the repository containing PATH.
 History is displayed between REV1 and REV2.
 Number of displayed changesets is limited to LOG-LIMIT,
-REV1 defaults to the tip, while
-REV2 defaults to `hg-rev-completion-limit' changes from the tip revision.
+REV1 defaults to the tip, while REV2 defaults to 0.
 LOG-LIMIT defaults to `hg-log-limit'.
 With a prefix argument, prompt for each parameter."
   (interactive (list (hg-read-file-name " to log")
                      (hg-read-rev " to start with"
                                   "tip")
                      (hg-read-rev " to end with" 
-                                  (format "%d" (- hg-rev-completion-limit)))
+				  "0")
                      (hg-read-number "Output limited to: "
                                      hg-log-limit)))
   (hg-log (hg-root path) rev1 rev2 log-limit))



1.21      +0 -5      XEmacs/packages/unsupported/scop/vc/vc-hooks.el

Index: vc-hooks.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/vc-hooks.el,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -p -r1.20 -r1.21
--- vc-hooks.el	2007/06/16 12:57:26	1.20
+++ vc-hooks.el	2007/06/24 21:04:20	1.21
@@ -859,11 +859,6 @@ current, and kill the buffer that visits
 
 (add-hook 'find-file-hook 'vc-find-file-hook)
 
-;; XEmacs addition: better placed here than autoloaded in mercurial.el for
-;;                  consistency with other included vc related modes.
-;; XEmacs TODO: fix this up to not always pull in mercurial.el.
-(add-hook 'find-file-hook 'hg-find-file-hook)
-
 ;; more hooks, this time for file-not-found
 (defun vc-file-not-found-hook ()
   "When file is not found, try to check it out from version control.



1.8       +11 -0     XEmacs/packages/unsupported/scop/vc/vc-xemacs.el

Index: vc-xemacs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/vc-xemacs.el,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- vc-xemacs.el	2006/07/04 20:08:46	1.7
+++ vc-xemacs.el	2007/06/24 21:04:21	1.8
@@ -19,6 +19,17 @@
 
 ;;; Code:
 
+(defun vc-xemacs-hg-find-file-hook ()
+  (if (and (not (member 'hg-find-file-hook find-file-hooks))
+           (vc-find-root buffer-file-name ".hg"))
+      (progn
+        (load "mercurial") ; adds hg-find-file-hook to find-file-hooks
+        (remove-hook 'find-file-hooks 'vc-xemacs-hg-find-file-hook)
+        (hg-find-file-hook))))
+(add-hook 'find-file-hooks 'vc-xemacs-hg-find-file-hook)
+
+;; Compatibility
+
 (unless (boundp 'temporary-file-directory)
   (defvar temporary-file-directory (temp-directory)))
 



1.40      +11 -2     XEmacs/packages/unsupported/scop/vc/vc.el

Index: vc.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/vc.el,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -p -r1.39 -r1.40
--- vc.el	2007/06/16 12:57:26	1.39
+++ vc.el	2007/06/24 21:04:21	1.40
@@ -105,7 +105,9 @@
 ;;
 ;; * registered (file)
 ;;
-;;   Return non-nil if FILE is registered in this backend.
+;;   Return non-nil if FILE is registered in this backend.  Both this
+;;   function as well as `state' should be careful to fail gracefully in the
+;;   event that the backend executable is absent.
 ;;
 ;; * state (file)
 ;;
@@ -270,6 +272,12 @@
 ;;   Insert the revision log of FILE into BUFFER, or the *vc* buffer
 ;;   if BUFFER is nil.
 ;;
+;; - log-view-mode ()
+;;
+;;   Mode to use for the output of print-log.  This defaults to
+;;   `log-view-mode' and is expected to be changed (if at all) to a derived
+;;   mode of `log-view-mode'.
+;;
 ;; - show-log-entry (version)
 ;;
 ;;   If provided, search the log entry for VERSION in the current buffer,
@@ -2472,7 +2480,7 @@ If FOCUS-REV is non-nil, leave the point
     (vc-exec-after
      `(let ((inhibit-read-only t))
 	;; XEmacs: we don't have log-view-mode (yet?), so ignore-errors for now
-	(ignore-errors (log-view-mode))
+	(ignore-errors (vc-call-backend ',(vc-backend file) 'log-view-mode))
 	(goto-char (point-max)) (forward-line -1)
 	(while (looking-at "=*\n")
 	  (delete-char (- (match-end 0) (match-beginning 0)))
@@ -2487,6 +2495,7 @@ If FOCUS-REV is non-nil, leave the point
 			 ',focus-rev)
         (set-buffer-modified-p nil)))))
 
+(defun vc-default-log-view-mode (backend) (log-view-mode))
 (defun vc-default-show-log-entry (backend rev)
   (with-no-warnings
    ;; XEmacs: we don't have log-view-mode (yet?), so let's try at least





More information about the XEmacs-CVS mailing list