[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

23.8.7.1 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 (voir la section Backup Files). But they follow a similar naming convention.

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 (voir la section Options specific for CVS).

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 ~ (voir la section Examining And Comparing 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 backup.

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.


[ < ] [ > ]   [ << ] [Plus haut] [ >> ]         [Top] [Table des matières] [Index] [ ? ]

Ce document a été généré par Eric Reinbold le 23 Février 2009 en utilisant texi2html 1.78.