diff options
| author | Thien-Thi Nguyen | 2006-02-06 15:58:38 +0000 |
|---|---|---|
| committer | Thien-Thi Nguyen | 2006-02-06 15:58:38 +0000 |
| commit | cbbd2cd318d1b4ba9803650c2ef8ac2bba00f562 (patch) | |
| tree | 075794d50b354585b52eff2773dace746abc0c82 /lisp | |
| parent | c9586d40aa11dc0d03c7a14c673e049b6d8888a1 (diff) | |
| download | emacs-cbbd2cd318d1b4ba9803650c2ef8ac2bba00f562.tar.gz emacs-cbbd2cd318d1b4ba9803650c2ef8ac2bba00f562.zip | |
(vc-svn-previous-version, vc-svn-next-version): New funcs.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/vc-svn.el | 17 |
2 files changed, 22 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a074aad691b..c2d92160448 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,4 +1,8 @@ | |||
| 1 | 2006-02-06 Lars Hansen <larsh@soem.dk> | 1 | 2006-02-06 Thien-Thi Nguyen <ttn@gnu.org> |
| 2 | |||
| 3 | * vc-svn.el (vc-svn-previous-version, vc-svn-next-version): New funcs. | ||
| 4 | |||
| 5 | 2006-02-06 Lars Hansen <larsh@soem.dk> | ||
| 2 | 6 | ||
| 3 | * generic-x.el (etc-fstab-generic-mode): Add file system types | 7 | * generic-x.el (etc-fstab-generic-mode): Add file system types |
| 4 | cifs and usbdevfs. Allow special chars in file names. | 8 | cifs and usbdevfs. Allow special chars in file names. |
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 | |||
| 176 | ((eq svn-state 'needs-patch) "(patch)") | 176 | ((eq svn-state 'needs-patch) "(patch)") |
| 177 | ((eq svn-state 'needs-merge) "(merge)")))) | 177 | ((eq svn-state 'needs-merge) "(merge)")))) |
| 178 | 178 | ||
| 179 | (defun vc-svn-previous-version (file rev) | ||
| 180 | (let ((newrev (1- (string-to-number rev)))) | ||
| 181 | (when (< 0 newrev) | ||
| 182 | (number-to-string newrev)))) | ||
| 183 | |||
| 184 | (defun vc-svn-next-version (file rev) | ||
| 185 | (let ((newrev (1+ (string-to-number rev)))) | ||
| 186 | ;; The "workfile version" is an uneasy conceptual fit under Subversion; | ||
| 187 | ;; we use it as the upper bound until a better idea comes along. If the | ||
| 188 | ;; workfile version W coincides with the tree's latest revision R, then | ||
| 189 | ;; this check prevents a "no such revision: R+1" error. Otherwise, it | ||
| 190 | ;; inhibits showing of W+1 through R, which could be considered anywhere | ||
| 191 | ;; from gracious to impolite. | ||
| 192 | (unless (< (string-to-number (vc-file-getprop file 'vc-workfile-version)) | ||
| 193 | newrev) | ||
| 194 | (number-to-string newrev)))) | ||
| 195 | |||
| 179 | 196 | ||
| 180 | ;;; | 197 | ;;; |
| 181 | ;;; State-changing functions | 198 | ;;; State-changing functions |