Go to the first, previous, next, last section, table of contents.

Check-Out

When you want to modify a file maintained with version control, type C-x C-q (vc-toggle-read-only). This checks out the file, and tells RCS or SCCS to lock the file. This means making the file writable for you (but not for anyone else).

If you specify a prefix argument (C-u C-x C-q) for checkout, Emacs asks you for a version number, and checks out that version unlocked. This lets you move to old versions, or existing branches of the file (see section Multiple Branches of a File). You can then start editing the selected version by typing C-x C-q again. (If you edit an old version of a file this way, checking it in again creates a new branch.)

Under CVS, you normally don't need to check out files explicitly. CVS does not have locking; multiple users can edit their copies of a file whenever they want. (If two users make conflicting changes, they need to reconcile their changes when checking them in.) We therefore say that an implicit check-out happens when you make the first change in the file.

CVS has an alternative mode in which explicit check-out is required. And RCS has an alternative mode called non-strict locking in which explicit check-out is not required. Selecting these modes is done outside of VC, but once you have selected them, VC obeys them. With RCS, you can select non-strict locking for a particular file using the `rcs -U' command. See section Using VC with CVS, for an explanation of how to do this with CVS.


Go to the first, previous, next, last section, table of contents.