[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vc commit clears undo history
From: |
Dan Nicolaescu |
Subject: |
Re: vc commit clears undo history |
Date: |
Mon, 03 Dec 2007 13:26:14 -0800 |
Sam Steingold <address@hidden> writes:
> David Kastrup wrote:
> > "Sam Steingold" <address@hidden> writes:
> >
> >> GNU Emacs 23.0.50.29 (x86_64-unknown-linux-gnu, GTK+ Version 2.8.20)
> >> of 2007-12-03 on nyc-qws-005
> >> '-with-gtk' '-with-gif=no'
> >>
> >> a long-standing bug (bad feature?) is that when a file is committed
> >> using vc (C-x v v) or pcvs (c in *cvs* buffer), it buffer's undo history
> >> is discarder.
I have a patch that tries to avoid discarding the undo by looking at the
md5 checksum of the buffer contents and the file on disk. But I am not
100% confident that it is entirely correct....
> > I think the rationale for that might be that in order to have the files
> > identifiable as unmodified, some version control systems might do a
> > recheckout on them, and replace strings like $Id: whatever$ with
> > different information. In any case, a revert-buffer is done on the file
> > after checking it in, I believe.
> >
> > It might not be easy to get consistent undo information in this case.
>
> fwiw, "other vc interfaces", such as dvc (which interfaces to
> distributed VCs (haz/hg/git &c), do not discard the undo information
> after a commit.
How does it deal with the case when the file contains keywords that are
expanded on commit?
BTW VC interfaces with distributed VCs just fine.