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]
This commit is contained in:
parent
3b5d63dd57
commit
60618b6ef4
1 changed files with 11 additions and 7 deletions
18
vc-p4.el
18
vc-p4.el
|
@ -259,7 +259,9 @@ to t."
|
||||||
(defcustom vc-p4-annotate-command "p4pr"
|
(defcustom vc-p4-annotate-command "p4pr"
|
||||||
"*Specifies the name of a command to call to annotate Perforce
|
"*Specifies the name of a command to call to annotate Perforce
|
||||||
files. I recommend //guest/jonathan_kamens/p4pr.perl in the 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
|
:type 'string
|
||||||
:group 'vc)
|
:group 'vc)
|
||||||
|
|
||||||
|
@ -602,12 +604,14 @@ Annotate version VERSION if it's specified."
|
||||||
(concat file
|
(concat file
|
||||||
(p4-lowlevel-canonicalize-revision version))
|
(p4-lowlevel-canonicalize-revision version))
|
||||||
file))
|
file))
|
||||||
log-buffer times)
|
(starting-date (if current-prefix-arg
|
||||||
(call-process vc-p4-annotate-command
|
(read-string "Starting date: (default none) ")))
|
||||||
nil
|
log-buffer times args)
|
||||||
buffer
|
(setq args (append (list vc-p4-annotate-command nil buffer nil)
|
||||||
nil
|
(if starting-date
|
||||||
full-file)
|
(list "--after" starting-date))
|
||||||
|
(list full-file)))
|
||||||
|
(apply 'call-process args)
|
||||||
; Calculate the date of each revision, for later
|
; Calculate the date of each revision, for later
|
||||||
(setq log-buffer (p4-lowlevel-filelog file nil nil t))
|
(setq log-buffer (p4-lowlevel-filelog file nil nil t))
|
||||||
(set-buffer log-buffer)
|
(set-buffer log-buffer)
|
||||||
|
|
Loading…
Reference in a new issue