comparison lisp/vc/vc-annotate.el @ 109409:ff42e5c5f789

Merge from mainline.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Wed, 16 Jun 2010 22:49:55 +0000
parents e93288477c43 6c39bda25895
children a9586dc942d5
comparison
equal deleted inserted replaced
109408:4eded71f4215 109409:ff42e5c5f789
314 (t (error "No such display mode: %s" 314 (t (error "No such display mode: %s"
315 vc-annotate-display-mode)))) 315 vc-annotate-display-mode))))
316 316
317 ;;;###autoload 317 ;;;###autoload
318 (defun vc-annotate (file rev &optional display-mode buf move-point-to) 318 (defun vc-annotate (file rev &optional display-mode buf move-point-to)
319 "Display the edit history of the current file using colors. 319 "Display the edit history of the current FILE using colors.
320 320
321 This command creates a buffer that shows, for each line of the current 321 This command creates a buffer that shows, for each line of the current
322 file, when it was last edited and by whom. Additionally, colors are 322 file, when it was last edited and by whom. Additionally, colors are
323 used to show the age of each line--blue means oldest, red means 323 used to show the age of each line--blue means oldest, red means
324 youngest, and intermediate colors indicate intermediate ages. By 324 youngest, and intermediate colors indicate intermediate ages. By
325 default, the time scale stretches back one year into the past; 325 default, the time scale stretches back one year into the past;
326 everything that is older than that is shown in blue. 326 everything that is older than that is shown in blue.
327 327
328 With a prefix argument, this command asks two questions in the 328 With a prefix argument, this command asks two questions in the
329 minibuffer. First, you may enter a revision number; then the buffer 329 minibuffer. First, you may enter a revision number REV; then the buffer
330 displays and annotates that revision instead of the working revision 330 displays and annotates that revision instead of the working revision
331 \(type RET in the minibuffer to leave that default unchanged). Then, 331 \(type RET in the minibuffer to leave that default unchanged). Then,
332 you are prompted for the time span in days which the color range 332 you are prompted for the time span in days which the color range
333 should cover. For example, a time span of 20 days means that changes 333 should cover. For example, a time span of 20 days means that changes
334 over the past 20 days are shown in red to blue, according to their 334 over the past 20 days are shown in red to blue, according to their
346 (save-current-buffer 346 (save-current-buffer
347 (vc-ensure-vc-buffer) 347 (vc-ensure-vc-buffer)
348 (list buffer-file-name 348 (list buffer-file-name
349 (let ((def (vc-working-revision buffer-file-name))) 349 (let ((def (vc-working-revision buffer-file-name)))
350 (if (null current-prefix-arg) def 350 (if (null current-prefix-arg) def
351 (read-string 351 (vc-read-revision
352 (format "Annotate from revision (default %s): " def) 352 (format "Annotate from revision (default %s): " def)
353 nil nil def))) 353 (list buffer-file-name) nil def)))
354 (if (null current-prefix-arg) 354 (if (null current-prefix-arg)
355 vc-annotate-display-mode 355 vc-annotate-display-mode
356 (float (string-to-number 356 (float (string-to-number
357 (read-string "Annotate span days (default 20): " 357 (read-string "Annotate span days (default 20): "
358 nil nil "20"))))))) 358 nil nil "20")))))))