User: scop
Date: 06/02/11 00:25:46
Modified: packages/unsupported/scop/vc ChangeLog Makefile log-edit.el
vc-arch.el vc-cvs.el vc-hooks.el vc-mcvs.el
vc-rcs.el vc-sccs.el vc-svn.el vc.el
Log:
Sync vc with upstream.
Revision Changes Path
1.55 +1 -1 XEmacs/packages/unsupported/scop/STATUS
Index: STATUS
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/STATUS,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -p -r1.54 -r1.55
--- STATUS 2005/12/31 08:38:10 1.54
+++ STATUS 2006/02/10 23:25:38 1.55
@@ -17,5 +17,5 @@ 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
-- Up to date with GNU Emacs CVS HEAD as of 2005-12-31.
+- Up to date with GNU Emacs CVS HEAD as of 2006-02-11.
- Compiles, something even works.
1.41 +5 -0 XEmacs/packages/unsupported/scop/vc/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/ChangeLog,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -p -r1.40 -r1.41
--- ChangeLog 2005/12/31 08:38:13 1.40
+++ ChangeLog 2006/02/10 23:25:42 1.41
@@ -1,3 +1,8 @@
+2006-02-11 Ville Skyttä <scop(a)xemacs.org>
+
+ * *.el: Sync with upstream.
+ * Makefile (REQUIRES): Add tramp.
+
2005-12-31 Ville Skyttä <scop(a)xemacs.org>
* vc.el: Sync with upstream.
1.5 +1 -1 XEmacs/packages/unsupported/scop/vc/Makefile
Index: Makefile
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- Makefile 2005/12/05 11:26:28 1.4
+++ Makefile 2006/02/10 23:25:42 1.5
@@ -22,7 +22,7 @@ AUTHOR_VERSION =
MAINTAINER = Ville Skyttä <scop(a)xemacs.org>
PACKAGE = vc
PKG_TYPE = regular
-REQUIRES = dired xemacs-base vc mail-lib ediff sh-script pcl-cvs
+REQUIRES = dired xemacs-base vc mail-lib ediff sh-script pcl-cvs tramp
CATEGORY = unsupported
ELCS = vc-hooks.elc vc.elc vc-arch.elc vc-cvs.elc vc-mcvs.elc vc-rcs.elc \
1.10 +1 -1 XEmacs/packages/unsupported/scop/vc/log-edit.el
Index: log-edit.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/log-edit.el,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- log-edit.el 2005/12/05 11:26:28 1.9
+++ log-edit.el 2006/02/10 23:25:42 1.10
@@ -1,7 +1,7 @@
;;; log-edit.el --- Major mode for editing CVS commit messages
;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
-;; 2005 Free Software Foundation, Inc.
+;; 2005, 2006 Free Software Foundation, Inc.
;; Author: Stefan Monnier <monnier(a)cs.yale.edu>
;; Keywords: pcl-cvs cvs commit log
1.14 +1 -1 XEmacs/packages/unsupported/scop/vc/vc-arch.el
Index: vc-arch.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/vc-arch.el,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- vc-arch.el 2005/08/16 18:38:13 1.13
+++ vc-arch.el 2006/02/10 23:25:42 1.14
@@ -1,6 +1,6 @@
;;; vc-arch.el --- VC backend for the Arch version-control system
-;; Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Stefan Monnier <monnier(a)gnu.org>
1.14 +1 -1 XEmacs/packages/unsupported/scop/vc/vc-cvs.el
Index: vc-cvs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/vc-cvs.el,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- vc-cvs.el 2005/11/02 19:03:11 1.13
+++ vc-cvs.el 2006/02/10 23:25:42 1.14
@@ -1,7 +1,7 @@
;;; vc-cvs.el --- non-resident support for CVS version-control
;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003,
-;; 2004, 2005 Free Software Foundation, Inc.
+;; 2004, 2005, 2006 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel(a)gnu.org>
1.10 +17 -9 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.9
retrieving revision 1.10
diff -u -p -r1.9 -r1.10
--- vc-hooks.el 2005/08/16 18:38:13 1.9
+++ vc-hooks.el 2006/02/10 23:25:42 1.10
@@ -1,7 +1,7 @@
;;; vc-hooks.el --- resident support for version-control
;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2002,
-;; 2003, 2004, 2005 Free Software Foundation, Inc.
+;; 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel(a)gnu.org>
@@ -421,14 +421,22 @@ For registered files, the possible value
(vc-file-setprop file 'vc-checkout-model
(vc-call checkout-model file)))))
-(defun vc-user-login-name (&optional uid)
- "Return the name under which the user is logged in, as a string.
-\(With optional argument UID, return the name of that user.)
-This function does the same as function `user-login-name', but unlike
-that, it never returns nil. If a UID cannot be resolved, that
-UID is returned as a string."
- (or (user-login-name uid)
- (number-to-string (or uid (user-uid)))))
+(defun vc-user-login-name (file)
+ "Return the name under which the user accesses the given FILE."
+ (or (and (eq (string-match tramp-file-name-regexp file) 0)
+ ;; tramp case: execute "whoami" via tramp
+ (let ((default-directory (file-name-directory file)))
+ (with-temp-buffer
+ (if (not (zerop (process-file "whoami" nil t)))
+ ;; fall through if "whoami" didn't work
+ nil
+ ;; remove trailing newline
+ (delete-region (1- (point-max)) (point-max))
+ (buffer-string)))))
+ ;; normal case
+ (user-login-name)
+ ;; if user-login-name is nil, return the UID as a string
+ (number-to-string (user-uid))))
(defun vc-state (file)
"Return the version control state of FILE.
1.11 +1 -1 XEmacs/packages/unsupported/scop/vc/vc-mcvs.el
Index: vc-mcvs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/vc-mcvs.el,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -p -r1.10 -r1.11
--- vc-mcvs.el 2005/12/26 10:50:26 1.10
+++ vc-mcvs.el 2006/02/10 23:25:42 1.11
@@ -1,6 +1,6 @@
;;; vc-mcvs.el --- VC backend for the Meta-CVS version-control system
-;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Stefan Monnier <monnier(a)gnu.org>
1.9 +8 -4 XEmacs/packages/unsupported/scop/vc/vc-rcs.el
Index: vc-rcs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/vc-rcs.el,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -p -r1.8 -r1.9
--- vc-rcs.el 2005/08/16 18:38:13 1.8
+++ vc-rcs.el 2006/02/10 23:25:42 1.9
@@ -1,7 +1,7 @@
;;; vc-rcs.el --- support for RCS version-control
;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-;; 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel(a)gnu.org>
@@ -153,8 +153,11 @@ For a description of possible values, se
(vc-file-setprop file 'vc-checkout-model 'locking))))
state)
(if (not (vc-mistrust-permissions file))
+ ;; XEmacs change: no 2nd arg to `file-attributes'
(let* ((attributes (file-attributes file))
(owner-uid (nth 2 attributes))
+ (owner-name (or (user-login-name owner-uid)
+ (number-to-string owner-uid)))
(permissions (nth 8 attributes)))
(cond ((string-match ".r-..-..-." permissions)
(vc-file-setprop file 'vc-checkout-model 'locking)
@@ -163,7 +166,7 @@ For a description of possible values, se
(if (eq (vc-checkout-model file) 'locking)
(if (file-ownership-preserved-p file)
'edited
- (vc-user-login-name owner-uid))
+ owner-name)
(if (vc-rcs-workfile-is-newer file)
'edited
'up-to-date)))
@@ -819,7 +822,7 @@ file."
'needs-patch))
;; locked by the calling user
((and (stringp locking-user)
- (string= locking-user (vc-user-login-name)))
+ (string= locking-user (vc-user-login-name file)))
(if (or (eq (vc-checkout-model file) 'locking)
workfile-is-latest
(vc-rcs-latest-on-branch-p file workfile-version))
@@ -908,7 +911,8 @@ Returns: nil if no headers we
(vc-file-setprop file 'vc-state
(cond
((eq locking-user 'none) 'up-to-date)
- ((string= locking-user (vc-user-login-name)) 'edited)
+ ((string= locking-user (vc-user-login-name file))
+ 'edited)
(t locking-user)))
;; If the file has headers, we don't want to query the
;; master file, because that would eliminate all the
1.6 +8 -5 XEmacs/packages/unsupported/scop/vc/vc-sccs.el
Index: vc-sccs.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/vc-sccs.el,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -p -r1.5 -r1.6
--- vc-sccs.el 2005/11/02 19:03:11 1.5
+++ vc-sccs.el 2006/02/10 23:25:42 1.6
@@ -1,7 +1,7 @@
;;; vc-sccs.el --- support for SCCS version-control
;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-;; 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Andre Spiegel <spiegel(a)gnu.org>
@@ -108,7 +108,7 @@ For a description of possible values, se
(if (vc-workfile-unchanged-p file)
'up-to-date
'unlocked-changes)
- (if (string= locking-user (vc-user-login-name))
+ (if (string= locking-user (vc-user-login-name file))
'edited
locking-user)))
'up-to-date)))
@@ -122,15 +122,18 @@ For a description of possible values, se
;; We have to be careful not to exclude files with execute bits on;
;; scripts can be under version control too. Also, we must ignore the
;; group-read and other-read bits, since paranoid users turn them off.
- (let* ((attributes (file-attributes file))
- (owner-uid (nth 2 attributes))
+ ;; XEmacs change: no 2nd arg to `file-attributes'
+ (let* ((attributes (file-attributes file))
+ (owner-uid (nth 2 attributes))
+ (owner-name (or (user-login-name owner-uid)
+ (number-to-string owner-uid)))
(permissions (nth 8 attributes)))
(if (string-match ".r-..-..-." permissions)
'up-to-date
(if (string-match ".rw..-..-." permissions)
(if (file-ownership-preserved-p file)
'edited
- (vc-user-login-name owner-uid))
+ owner-name)
;; Strange permissions.
;; Fall through to real state computation.
(vc-sccs-state file))))
1.14 +24 -3 XEmacs/packages/unsupported/scop/vc/vc-svn.el
Index: vc-svn.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/unsupported/scop/vc/vc-svn.el,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -p -r1.13 -r1.14
--- vc-svn.el 2005/12/26 10:50:26 1.13
+++ vc-svn.el 2006/02/10 23:25:43 1.14
@@ -1,6 +1,6 @@
;;; vc-svn.el --- non-resident support for Subversion version-control
-;; Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+;; Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
;; Maintainer: Stefan Monnier <monnier(a)gnu.org>
@@ -115,7 +115,7 @@ This is only meaningful if you don't use
(file-name-directory file)))
(with-temp-buffer
(cd (file-name-directory file))
- (let ((status
+ (let ((status
(condition-case nil
;; Ignore all errors.
(vc-svn-command t t file "status" "-v")
@@ -177,7 +177,24 @@ This is only meaningful if you don't use
((eq svn-state 'needs-patch) "(patch)")
((eq svn-state 'needs-merge) "(merge)"))))
+(defun vc-svn-previous-version (file rev)
+ (let ((newrev (1- (string-to-number rev))))
+ (when (< 0 newrev)
+ (number-to-string newrev))))
+
+(defun vc-svn-next-version (file rev)
+ (let ((newrev (1+ (string-to-number rev))))
+ ;; The "workfile version" is an uneasy conceptual fit under Subversion;
+ ;; we use it as the upper bound until a better idea comes along. If the
+ ;; workfile version W coincides with the tree's latest revision R, then
+ ;; this check prevents a "no such revision: R+1" error. Otherwise, it
+ ;; inhibits showing of W+1 through R, which could be considered anywhere
+ ;; from gracious to impolite.
+ (unless (< (string-to-number (vc-file-getprop file 'vc-workfile-version))
+ newrev)
+ (number-to-string newrev))))
+
;;;
;;; State-changing functions
;;;
@@ -356,7 +373,11 @@ The changes are between FIRST-VERSION an
(vc-svn-command
buffer
(if (and (vc-stay-local-p file) (fboundp 'start-process)) 'async 0)
- file "log")))
+ file "log"
+ ;; By default Subversion only shows the log upto the working version,
+ ;; whereas we also want the log of the subsequent commits. At least
+ ;; that's what the vc-cvs.el code does.
+ "-rHEAD:0")))
(defun vc-svn-diff (file &optional oldvers newvers buffer)
"Get a difference report using SVN between two versions of FILE."
1.23 +7 -9 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.22
retrieving revision 1.23
diff -u -p -r1.22 -r1.23
--- vc.el 2005/12/31 08:38:13 1.22
+++ vc.el 2006/02/10 23:25:43 1.23
@@ -1,7 +1,7 @@
;;; vc.el --- drive a version-control system from within Emacs
;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
-;; 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+;; 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
;; Author: FSF (see below for full credits)
;; Maintainer: Andre Spiegel <spiegel(a)gnu.org>
@@ -2135,7 +2135,7 @@ There is a special command, `*l', to mar
(let ((state (vc-state file)))
(cond
((stringp state) (concat "(" state ")"))
- ((eq state 'edited) (concat "(" (vc-user-login-name) ")"))
+ ((eq state 'edited) (concat "(" (vc-user-login-name file)
")"))
((eq state 'needs-merge) "(merge)")
((eq state 'needs-patch) "(patch)")
((eq state 'unlocked-changes) "(stale)"))))
@@ -2817,9 +2817,6 @@ backend to NEW-BACKEND, and unregister F
(vc-mode-line new)
(set-buffer-modified-p nil)))))
-;; Only defined in very recent Emacsen
-(defvar small-temporary-file-directory nil)
-
;;;###autoload
(defun vc-update-change-log (&rest args)
"Find change log file and add entries from recent version control logs.
@@ -2866,9 +2863,10 @@ Uses `rcs2log' which only works for RCS
(changelog (find-change-log))
;; Presumably not portable to non-Unixy systems, along with rcs2log:
(tempfile (make-temp-file
- (expand-file-name "vc"
- (or small-temporary-file-directory
- temporary-file-directory))))
+ ;; XEmacs change: no `small-temporary-file-directory'
+ (expand-file-name "vc" temporary-file-directory)))
+ (login-name (or user-login-name
+ (format "uid%d" (number-to-string (user-uid)))))
(full-name (or add-log-full-name
(user-full-name)
(user-login-name)
@@ -2891,7 +2889,7 @@ Uses `rcs2log' which only works for RCS
exec-directory)
nil (list t tempfile) nil
"-c" changelog
- "-u" (concat (vc-user-login-name)
+ "-u" (concat login-name
"\t" full-name
"\t" mailing-address)
(mapcar