Mercurial > emacs
changeset 68653:61cc95860e05
(vc-svn-previous-version, vc-svn-next-version): New funcs.
author | Thien-Thi Nguyen <ttn@gnuvola.org> |
---|---|
date | Mon, 06 Feb 2006 15:56:17 +0000 |
parents | 2c98a2211785 |
children | 1f94e3d57be6 |
files | lisp/vc-svn.el |
diffstat | 1 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/vc-svn.el Mon Feb 06 15:28:38 2006 +0000 +++ b/lisp/vc-svn.el Mon Feb 06 15:56:17 2006 +0000 @@ -176,6 +176,23 @@ ((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