* vc-p4.el (vc-p4-diff): Fix Perforce file headers.
[git-p4: depot-paths = "//guest/Ben_Key/vc-p4/,//guest/jonathan_kamens/vc-p4/,//guest/magnus_henoch/vc-p4/": change = 7485]
This commit is contained in:
parent
4667f79c0a
commit
2e8b1f0015
1 changed files with 11 additions and 1 deletions
12
vc-p4.el
12
vc-p4.el
|
@ -553,7 +553,17 @@ files under the default directory otherwise."
|
|||
((and rev1 (not rev2))
|
||||
(p4-lowlevel-diff file rev1))))
|
||||
(insert-buffer-substring temp-buffer)
|
||||
(kill-buffer temp-buffer))))))))
|
||||
(kill-buffer temp-buffer))))))
|
||||
|
||||
;; Emacs doesn't understand Perforce's file headers, so we add
|
||||
;; them ourselves.
|
||||
(with-current-buffer buffer
|
||||
(goto-char (point-min))
|
||||
(while (re-search-forward "^==== \\(.+#[0-9]+\\) - \\(.+\\) ====$" nil t)
|
||||
(let ((depot-name (match-string 1))
|
||||
(filename (match-string 2)))
|
||||
(insert "\n--- " depot-name
|
||||
"\n+++ " filename))))))
|
||||
|
||||
(defun vc-p4-annotate-command (file buffer &optional version)
|
||||
"Annotate FILE into BUFFER file using `vc-p4-annotate-command'.
|
||||
|
|
Loading…
Reference in a new issue