* vc/vc.el (vc-diff-build-argument-list-internal): If the file is

not locked, use last revision and current source as
defaults.  (Bug#15569)
This commit is contained in:
João Távora
2013-10-10 10:59:09 -04:00
committed by Alp Aker
parent 2f6e161e3e
commit db1386987b
2 changed files with 8 additions and 3 deletions

View File

@@ -1,3 +1,9 @@
2013-10-10 João Távora <joaotavora@gmail.com>
* vc/vc.el (vc-diff-build-argument-list-internal): If the file is
not locked, use last revision and current source as
defaults. (Bug#15569)
2013-10-10 Masatake YAMATO <yamato@redhat.com>
* menu-bar.el (menu-bar-open): Don't use popup-menu if

View File

@@ -1739,13 +1739,12 @@ Return t if the buffer had changes, nil otherwise."
;; if the file is not up-to-date, use working revision as older revision
((not (vc-up-to-date-p first))
(setq rev1-default (vc-working-revision first)))
;; if the file is not locked, use last and previous revisions as defaults
;; if the file is not locked, use last revision and current source as defaults
(t
(setq rev1-default (ignore-errors ;If `previous-revision' doesn't work.
(vc-call-backend backend 'previous-revision first
(vc-working-revision first))))
(when (string= rev1-default "") (setq rev1-default nil))
(setq rev2-default (vc-working-revision first))))
(when (string= rev1-default "") (setq rev1-default nil))))
;; construct argument list
(let* ((rev1-prompt (if rev1-default
(concat "Older revision (default "