[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vc-svn-{previous,next}-version
From: |
Stefan Monnier |
Subject: |
Re: vc-svn-{previous,next}-version |
Date: |
Sun, 05 Feb 2006 23:41:52 -0500 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
> two funcs in the patch below make C-x v g (followed by P or N) work,
> for files under the Subversion version control system. any objections?
Looks OK to me, except that you should add a comment explaining why you need
the `workfile-version' upper bound (i.e. what would break if you returned
a version greater).
Stefan
> ___________________________________________________________
> diff -B -w -c -r1.24 vc-svn.el
> *** vc-svn.el 13 Dec 2005 22:25:24 -0000 1.24
> --- vc-svn.el 5 Feb 2006 21:36:41 -0000
> ***************
> *** 176,181 ****
> --- 176,194 ----
> ((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.
> + (unless (< (string-to-number (vc-file-getprop file
> 'vc-workfile-version))
> + newrev)
> + (number-to-string newrev))))
> +
> ;;;
> ;;; State-changing functions
> _______________________________________________
> Emacs-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/emacs-devel