unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* vc commit clears undo history
@ 2007-12-03 20:07 Sam Steingold
  2007-12-03 20:26 ` David Kastrup
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Steingold @ 2007-12-03 20:07 UTC (permalink / raw)
  To: emacs-devel

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.

-- 
Sam Steingold (http://sds.podval.org/) on Fedora Core release 5 (Bordeaux)
http://palestinefacts.org http://thereligionofpeace.com http://truepeace.org
http://ffii.org http://iris.org.il http://honestreporting.com
I don't have an attitude problem. You have a perception problem.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: vc commit clears undo history
  2007-12-03 20:07 vc commit clears undo history Sam Steingold
@ 2007-12-03 20:26 ` David Kastrup
  2007-12-03 20:48   ` Sam Steingold
  0 siblings, 1 reply; 4+ messages in thread
From: David Kastrup @ 2007-12-03 20:26 UTC (permalink / raw)
  To: emacs-devel

"Sam Steingold" <ssteingold@janestcapital.com> 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 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.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: vc commit clears undo history
  2007-12-03 20:26 ` David Kastrup
@ 2007-12-03 20:48   ` Sam Steingold
  2007-12-03 21:26     ` Dan Nicolaescu
  0 siblings, 1 reply; 4+ messages in thread
From: Sam Steingold @ 2007-12-03 20:48 UTC (permalink / raw)
  To: David Kastrup; +Cc: emacs-devel

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Kastrup wrote:
> "Sam Steingold" <ssteingold@janestcapital.com> 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 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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHVGu7Pp1Qsf2qnMcRAvg3AJ9NhgEuV/Hd57OoiuBV6Wd1J4Ch9QCeMiBS
pWPh5yPidKRjkWQUoOUr1YM=
=Zsp3
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: vc commit clears undo history
  2007-12-03 20:48   ` Sam Steingold
@ 2007-12-03 21:26     ` Dan Nicolaescu
  0 siblings, 0 replies; 4+ messages in thread
From: Dan Nicolaescu @ 2007-12-03 21:26 UTC (permalink / raw)
  To: emacs-devel

Sam Steingold <sds@gnu.org> writes:

  > David Kastrup wrote:
  > > "Sam Steingold" <ssteingold@janestcapital.com> 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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-12-03 21:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-03 20:07 vc commit clears undo history Sam Steingold
2007-12-03 20:26 ` David Kastrup
2007-12-03 20:48   ` Sam Steingold
2007-12-03 21:26     ` Dan Nicolaescu

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).