diff options
| author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2006-02-06 15:58:38 +0000 |
|---|---|---|
| committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2006-02-06 15:58:38 +0000 |
| commit | cbbd2cd318d1b4ba9803650c2ef8ac2bba00f562 (patch) | |
| tree | 075794d50b354585b52eff2773dace746abc0c82 /lisp/vc-svn.el | |
| parent | c9586d40aa11dc0d03c7a14c673e049b6d8888a1 (diff) | |
| download | emacs-cbbd2cd318d1b4ba9803650c2ef8ac2bba00f562.tar.gz | |
(vc-svn-previous-version, vc-svn-next-version): New funcs.
Diffstat (limited to 'lisp/vc-svn.el')
| -rw-r--r-- | lisp/vc-svn.el | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index 966f5d2c9c9..82942f78358 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el @@ -176,6 +176,23 @@ This is only meaningful if you don't use the implicit checkout model ((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 |
