[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc-svn.el
From: |
Thien-Thi Nguyen |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc-svn.el |
Date: |
Mon, 06 Feb 2006 15:56:17 +0000 |
Index: emacs/lisp/vc-svn.el
diff -u emacs/lisp/vc-svn.el:1.25 emacs/lisp/vc-svn.el:1.26
--- emacs/lisp/vc-svn.el:1.25 Mon Feb 6 14:33:35 2006
+++ emacs/lisp/vc-svn.el Mon Feb 6 15:56:17 2006
@@ -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