[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Commit litters directories with tilde files
Mark D. Baushke
Re: Commit litters directories with tilde files
Sun, 06 Feb 2005 07:47:16 -0800
-----BEGIN PGP SIGNED MESSAGE-----
Greetings Geoff Kuenning,
CVS never creates *~ files unless they are part of
your CVS repository and are being checked out.
You would do well to try removing your *~ files,
edit a file and THEN do a 'ls *~' to see if the
backup files are present or not. That is try
If you see *~ files here, then they are under CVS
control and are not temporary backup files of any
kind. A "grep '~' CVS/Entries" should show you
what is happening as any entry there reflects a
file that is under CVS control.
<edit a random file>
If you see *~ files here, then that is not under
CVS control and CVS knows and cares nothing about
The behavior your describe sounds like one that
GNU Emacs may be configured to maintain for you
and not one that CVS performs. I suggest that you
consider altering the configuration of your editor
rather than casting blame on CVS.
Adding the line:
(setq vc-cvs-stay-local nil)
to your ~/.emacs file will probably fix your
problem going forward if that is what you really
wish to do.
Here is the 'info' page for GNU Emacs 21.3 to help you further:
| Version Backups
| When VC sees that the CVS repository for a file is on a remote
| machine, it automatically makes local backups of unmodified versions of
| the file--"automatic version backups". This means that you can compare
| the file to the repository version (`C-x v ='), or revert to that
| version (`C-x v u'), without any network interactions.
| The local copy of the unmodified file is called a "version backup"
| to indicate that it corresponds exactly to a version that is stored in
| the repository. Note that version backups are not the same as ordinary
| Emacs backup files (*note Backup::). But they follow a similar naming
| For a file that comes from a remote CVS repository, VC makes a
| version backup whenever you save the first changes to the file, and
| removes it after you have committed your modified version to the
| repository. You can disable the making of automatic version backups by
| setting `vc-cvs-stay-local' to `nil' (*note CVS Options::).
| The name of the automatic version backup for version VERSION of file
| FILE is `FILE.~VERSION.~'. This is almost the same as the name used by
| `C-x v ~' (*note Old Versions::), the only difference being the
| additional dot (`.') after the version number. This similarity is
| intentional, because both kinds of files store the same kind of
| information. The file made by `C-x v ~' acts as a "manual version
| All the VC commands that operate on old versions of a file can use
| both kinds of version backups. For instance, `C-x v ~' uses either an
| automatic or a manual version backup, if possible, to get the contents
| of the version you request. Likewise, `C-x v =' and `C-x v u' use
| either an automatic or a manual version backup, if one of them exists,
| to get the contents of a version to compare or revert to. If you
| changed a file outside of Emacs, so that no automatic version backup
| was created for the previous text, you can create a manual backup of
| that version using `C-x v ~', and thus obtain the benefit of the local
| copy for Emacs commands.
| The only difference in Emacs's handling of manual and automatic
| version backups, once they exist, is that Emacs deletes automatic
| version backups when you commit to the repository. By contrast, manual
| version backups remain until you delete them.
If you are an XEmacs user instead of a GNU Emacs
user, there may be slight differences in this kind
of behavior and then you might be using the
pcl-cvs package which does take more control over
your CVS files as well and for which you could use
Emacs commands to do the commit.
PS: Feel free to open an issue with cvshome.org,
but be advised that it does not use GNATS as the
defect tracking system at this time.
> >Submitter-Id: net
> >Originator: Geoff Kuenning
> >Confidential: no
> >Synopsis: Commit leaves unnecessary tilde files in directories
> >Severity: non-critical
> >Priority: medium
> >Category: cvs
> >Class: sw-bug
> >Release: 1.12.9
> System: Linux bow 2.6.8-24.5-default #1 Wed Nov 17 11:10:06 UTC 2004 i686
> i686 i386 GNU/Linux
> Architecture: i686
> Commit checks out earlier versions of the files during the commit
> process, naming them with a trailing revision number and tilde.
No, cvs commit does not do this.
> However, it does not clean up these files when the commit is finished,
> even though they are of no practical value to the user. The result is
> that one must constantly look through the CVS directories for
> trailing-tilde files and remove them.
This is almost certainly an artifact of your
> (Note: I'm using remote CVS, if that's a factor.)
> cvs checkout
> <edit a random file>
> cvs commit
> ls *~
> Commit should remove its temporary files when finished.
Commit does remove the only temporary files it
creates on the server. CVS does not create any
'temporary' files outside of the CVS subdirectory.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
-----END PGP SIGNATURE-----