emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#15569: closed (24.3.50; vc-ediff with prefix argum


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#15569: closed (24.3.50; vc-ediff with prefix argument could be slightly better)
Date: Thu, 10 Oct 2013 15:02:02 +0000

Your message dated Thu, 10 Oct 2013 11:01:08 -0400
with message-id <address@hidden>
and subject line Re: bug#15569: 24.3.50; vc-ediff with prefix argument could be 
slightly better
has caused the debbugs.gnu.org bug report #15569,
regarding 24.3.50; vc-ediff with prefix argument could be slightly better
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
15569: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15569
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: 24.3.50; vc-ediff with prefix argument could be slightly better Date: Wed, 09 Oct 2013 10:06:57 +0100 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (windows-nt)
Hello maintainters,

I noticed that, in a git repository, using C-u M-x vc-ediff on a single
file (a very useful command) could use a slight improvement.

You see, using C-u prompts the users for two revisions. I mostly choose
to use an ancient revision for A and the "current revision" for B. And
thats the default, which is fine.

But there is a catch. If I've not yet touched the file I'm vc-ediff'ing,
then buffer B will not be the actual buffer I'm working on, but a
read-only copy of it, which is not good for copying content over from A
to B using the ediff keys "A" and "B".

The workaround I and my colleagues currently use is to add some random
change to the file to make sure vc-ediff suggests "current source" as
the revision for B. But this is kinda akward.

I've found that the following patch fixes this behaviour, and still
makes sense to me.

João

z:/Vendor/cygwin/bin/diff.exe -c "--label" 
"z:/Vendor/emacs-24.3.5/share/emacs/24.3.50/lisp/vc/vc.el" "--label" "#<buffer 
vc.el>" "z:/Vendor/emacs-24.3.5/share/emacs/24.3.50/lisp/vc/vc.el" 
"c:/temp/buffer-content-5840WVj"
*** z:/Vendor/emacs-24.3.5/share/emacs/24.3.50/lisp/vc/vc.el
--- #<buffer vc.el>
***************
*** 1735,1747 ****
       ;; 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
       (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))))
      ;; construct argument list
      (let* ((rev1-prompt (if rev1-default
                              (concat "Older revision (default "
--- 1735,1746 ----
       ;; 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 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))))
      ;; construct argument list
      (let* ((rev1-prompt (if rev1-default
                              (concat "Older revision (default "

Diff finished.  Wed Oct  9 10:03:04 2013



--- End Message ---
--- Begin Message --- Subject: Re: bug#15569: 24.3.50; vc-ediff with prefix argument could be slightly better Date: Thu, 10 Oct 2013 11:01:08 -0400
Installed as r114612.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]