28.1.2 Version Control and the Mode Line
When you visit a file that is under version control, Emacs indicates this on the mode line. For example, âBzr-1223
â says that Bazaar is used for that file, and the current revision ID is 1223.
The character between the back-end name and the revision ID indicates the version control status of the work file. In a merge-based version control system, a â-
â character indicates that the work file is unmodified, and â:
â indicates that it has been modified. â!
â indicates that the file contains conflicts as result of a recent merge operation (see Merging), or that the file was removed from the version control. Finally, â?
â means that the file is under version control, but is missing from the working tree.
In a lock-based system, â-
â indicates an unlocked file, and â:
â a locked file; if the file is locked by another user (for instance, âjim
â), that is displayed as âRCS:jim:1.3
â. â@
â means that the file was locally added, but not yet committed to the master repository.
On a graphical display, you can move the mouse over this mode line indicator to pop up a tool-tip, which displays a more verbose description of the version control status. Pressing mouse-1
over the indicator pops up a menu of VC commands, identical to âTools / Version Control
â on the menu bar.
When Auto Revert mode (see Reverting) reverts a buffer that is under version control, it updates the version control information in the mode line. However, Auto Revert mode may not properly update this information if the version control status changes without changes to the work file, from outside the current Emacs session. If you set auto-revert-check-vc-info
to t
, Auto Revert mode updates the version control status information every auto-revert-interval
seconds, even if the work file itself is unchanged. The resulting CPU usage depends on the version control system, but is usually not excessive.