aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Távora2013-10-10 10:59:09 -0400
committerAlp Aker2013-10-10 10:59:09 -0400
commitdb1386987b5c2ccbfa28d4638b822afc5a8eedbb (patch)
tree3c88b733298bc1760edf3efe24cfeed881e8bee2
parent2f6e161e3e7d2b6dd6f3b96dc69207e607b11181 (diff)
downloademacs-db1386987b5c2ccbfa28d4638b822afc5a8eedbb.tar.gz
emacs-db1386987b5c2ccbfa28d4638b822afc5a8eedbb.zip
* 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)
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/vc/vc.el5
2 files changed, 8 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8f9450f0db8..bb675ce5088 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12013-10-10 João Távora <joaotavora@gmail.com>
2
3 * vc/vc.el (vc-diff-build-argument-list-internal): If the file is
4 not locked, use last revision and current source as
5 defaults. (Bug#15569)
6
12013-10-10 Masatake YAMATO <yamato@redhat.com> 72013-10-10 Masatake YAMATO <yamato@redhat.com>
2 8
3 * menu-bar.el (menu-bar-open): Don't use popup-menu if 9 * menu-bar.el (menu-bar-open): Don't use popup-menu if
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 13f0d836f91..585b6d48d45 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -1739,13 +1739,12 @@ Return t if the buffer had changes, nil otherwise."
1739 ;; if the file is not up-to-date, use working revision as older revision 1739 ;; if the file is not up-to-date, use working revision as older revision
1740 ((not (vc-up-to-date-p first)) 1740 ((not (vc-up-to-date-p first))
1741 (setq rev1-default (vc-working-revision first))) 1741 (setq rev1-default (vc-working-revision first)))
1742 ;; if the file is not locked, use last and previous revisions as defaults 1742 ;; if the file is not locked, use last revision and current source as defaults
1743 (t 1743 (t
1744 (setq rev1-default (ignore-errors ;If `previous-revision' doesn't work. 1744 (setq rev1-default (ignore-errors ;If `previous-revision' doesn't work.
1745 (vc-call-backend backend 'previous-revision first 1745 (vc-call-backend backend 'previous-revision first
1746 (vc-working-revision first)))) 1746 (vc-working-revision first))))
1747 (when (string= rev1-default "") (setq rev1-default nil)) 1747 (when (string= rev1-default "") (setq rev1-default nil))))
1748 (setq rev2-default (vc-working-revision first))))
1749 ;; construct argument list 1748 ;; construct argument list
1750 (let* ((rev1-prompt (if rev1-default 1749 (let* ((rev1-prompt (if rev1-default
1751 (concat "Older revision (default " 1750 (concat "Older revision (default "