[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Error when applying hunk in Diff buffer
From: |
Marshall, Simon |
Subject: |
RE: Error when applying hunk in Diff buffer |
Date: |
Thu, 20 Jul 2006 13:51:40 +0100 |
> > To reproduce:
> >
> > C-x C-f ChangeLog RET
> > C-x v v
> > Remove a line
> > C-x v = SPC
>
> C-x v = runs vc-diff (no SPC)
It prompts you to save the file - you just removed a line. I am a pedant.
> > For me, the *vc-diff* buffer contains:
> >
> > *** ChangeLog.~1.481.~ Mon Jul 17 09:47:44 2006
> > --- ChangeLog Thu Jul 20 11:59:52 2006
> > ***************
>
> With vc-diff I get:
>
> *** ChangeLog 15 Jul 2006 10:13:39 +1200 1.481
> --- ChangeLog 20 Jul 2006 23:16:33 +1200
> ***************
> ...
>
> With dired-diff I get something like you:
>
> *** /home/nickrob/emacs/ChangeLog.~1.481.~ 2006-07-15
> 10:13:39.000000000 +1200
> --- /home/nickrob/emacs/ChangeLog 2006-07-20
> 23:16:33.000000000 +1200
> ***************
> ...
>
> Then C-c C-a gives a read-only error because
> ChangeLog.~1.481.~ _is_ read only and diff-apply-hunk changes
> the first file to the second. So that seems right to me.
Not really. In any case, earlier emacs would detect that that part of the
patch was already applied and offer to reverse it. A very useful feature
indeed.
That code still appears to be in diff-apply-hunk, but it presumably doesn't
get a chance because of the bug. I included the contents of *vc-diff* in
case it is related to a recent problem with vc-diff-internal when diff
doesn't support -L. You imply, but don't say, that the bug doesn't appear
for you with C-x v =. If that is the case, the fact that your *vc-diff*
buffer does not contain different ChangeLog file names suggests my guess
might be correct.
Simon.
- Error when applying hunk in Diff buffer, Marshall, Simon, 2006/07/20
- RE: Error when applying hunk in Diff buffer,
Marshall, Simon <=
- RE: Error when applying hunk in Diff buffer, Marshall, Simon, 2006/07/20
- RE: Error when applying hunk in Diff buffer, Marshall, Simon, 2006/07/21
- RE: Error when applying hunk in Diff buffer, Marshall, Simon, 2006/07/24