Mercurial > emacs
comparison lisp/vc-svn.el @ 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 | 3bd95f4f2941 |
children | 0e55eddfde77 c5406394f567 |
comparison
equal
deleted
inserted
replaced
68652:2c98a2211785 | 68653:61cc95860e05 |
---|---|
173 (cond ((eq svn-state 'edited) | 173 (cond ((eq svn-state 'edited) |
174 (if (equal (vc-workfile-version file) "0") | 174 (if (equal (vc-workfile-version file) "0") |
175 "(added)" "(modified)")) | 175 "(added)" "(modified)")) |
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 | |
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)))) | |
178 | 195 |
179 | 196 |
180 ;;; | 197 ;;; |
181 ;;; State-changing functions | 198 ;;; State-changing functions |
182 ;;; | 199 ;;; |