rcsvi - a versioning wrapper script around vi
Description
rcsvi is a simple wrapper for vi that puts edited files under revision control. It does not support any vi flags. It only takes one file argument and an optional revision number for reverting to previous versions.
Although this may not sound a big deal, it can be extremely useful for system administrators. This wrapper is meant to edit system configuration files and track their changes. The script uses RCS. For complex development purposes, consider using CVS or SVN instead.
You may check the script [1]here.
Installation
Unpack the [2]tar file in /tmp. Locate your original vi. (typically it is in /usr/bin , some systems use /bin ). Rename original vi to vi.SAVE . Move /tmp/vi to the directory where the original vi was. Add execute permissions.
Usage
" vi filename " commits any possible changes to the file not using vi transparently, edits the file, and then commits the changes to the repository, then checks out the file for writing.
If the file was edited previously by someone else, the script offers to break the lock created by that user. If you choose to break the lock you need to state a reason why you did so. The reason will be sent to the previous locker.
" vi -r rev filename " does the same, but first it reverts the file to version rev .
Bugs
The script may contain bugs. It may not handle all cases properly. Please report any bugs [3]here.
Todo
- Documentation with explanation of design considerations.
- Save and restore permissions correctly.
- Support for vi flags
Author
[4]Müller Miklós <mmuller@lbcons.net>
Credits
[5]Radics Péter <mitch@lbcons.net> : Shell programming tips
Links
- [6]GNU RCS Home Page
- [7]An RCS tutorial
- [8]Subversion Home Page
- [9]CVS Home Page
- [10]Check what google directory has about concurrent version systems
- [11]Check what google directory has about revision control systems
References
- file://localhost/usr/home/mmuller/src/rcsvi/vi.txt
- file://localhost/usr/home/mmuller/src/rcsvi/vi.tar
- mailto:mmuller@lbcons.net?Subject=ViWrapperBug
- file://localhost/usr/home/mmuller/src/
- http://lbcons.net/~mitch/
- http://www.gnu.org/software/rcs/rcs.html
- http://www.csc.calpoly.edu/~dbutler/tutorials/winter96/rcs/
- http://subversion.tigris.org/
- http://www.cvshome.org/
- http://directory.google.com/Top/Computers/Software/Configuration_Management/Tools/Concurrent_Versions_System/
- http://directory.google.com/Top/Computers/Software/Configuration_Management/Tools/Revision_Control_System/
