From 60618b6ef49fb0478bb1885be794e4c773604158 Mon Sep 17 00:00:00 2001 From: Jonathan Kamens Date: Sun, 6 Jan 2002 16:38:16 -0800 Subject: [PATCH] When doing an annotation, if the user called the annotate function with a prefix argument, then prompt for the starting date for the annotation. Note that this requires a version of p4pr.perl that supports the --after option. [git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 1225] --- vc-p4.el | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/vc-p4.el b/vc-p4.el index 4559ce8..387d336 100644 --- a/vc-p4.el +++ b/vc-p4.el @@ -259,7 +259,9 @@ to t." (defcustom vc-p4-annotate-command "p4pr" "*Specifies the name of a command to call to annotate Perforce files. I recommend //guest/jonathan_kamens/p4pr.perl in the Perforce -repository public.perforce.com:1666." +repository public.perforce.com:1666. Note that you need a version of +this script which accept `--after=date' to tell it how far back to +trace." :type 'string :group 'vc) @@ -602,12 +604,14 @@ Annotate version VERSION if it's specified." (concat file (p4-lowlevel-canonicalize-revision version)) file)) - log-buffer times) - (call-process vc-p4-annotate-command - nil - buffer - nil - full-file) + (starting-date (if current-prefix-arg + (read-string "Starting date: (default none) "))) + log-buffer times args) + (setq args (append (list vc-p4-annotate-command nil buffer nil) + (if starting-date + (list "--after" starting-date)) + (list full-file))) + (apply 'call-process args) ; Calculate the date of each revision, for later (setq log-buffer (p4-lowlevel-filelog file nil nil t)) (set-buffer log-buffer)