Next: , Previous: Using Watches In Development, Up: Watches (CVS As Telephone)

Ending An Editing Session

If you don't want to commit but want to explicitly end an editing session, you can do so by running cvs unedit:

     paste$ cvs unedit hello.c

But beware! This does more than just notify all watchers that you're done editing – it also offers to revert any uncommitted changes that you've made to the file:

     paste$ cvs unedit hello.c
     hello.c has been modified; revert changes? y

If you answer y, CVS undoes all your changes and notifies watchers that you're not editing the file anymore. If you answer n, CVS keeps your changes and also keeps you registered as an editor of the file (so no notification goes out – in fact, it's as if you never ran cvs unedit at all). The possibility of CVS undoing all of your changes at a single keystroke is a bit scary, but the rationale is easy to understand: If you declare to the world that you're ending an editing session, then any changes you haven't committed are probably changes you don't mean to keep. At least, that's the way CVS sees it. Needless to say, be careful!

Karl Fogel wrote this book. Buy a printed copy via his homepage at

copyright  ©  May 24 2019 sean dreilinger url: