From 6c3758972c5acee309f71cd38b6a242b7e26a199 Mon Sep 17 00:00:00 2001 From: Magnus Henoch Date: Wed, 13 Jan 2010 09:01:58 -0800 Subject: [PATCH] * vc-p4.el (vc-p4-previous-revision): New function, shamelessly copied from vc-svn. [git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7546] --- vc-p4.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/vc-p4.el b/vc-p4.el index 17881b8..9d0b479 100644 --- a/vc-p4.el +++ b/vc-p4.el @@ -188,6 +188,11 @@ compare non-open files to the depot version." (vc-p4-state file) (vc-file-getprop file 'vc-workfile-version)) +(defun vc-p4-previous-revision (file rev) + (let ((newrev (1- (string-to-number rev)))) + (when (< 0 newrev) + (number-to-string newrev)))) + (defun vc-p4-latest-on-branch-p (file) "Returns non-nil if the Perforce version of FILE is the head revision."