SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

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

  1. file://localhost/usr/home/mmuller/src/rcsvi/vi.txt
  2. file://localhost/usr/home/mmuller/src/rcsvi/vi.tar
  3. mailto:mmuller@lbcons.net?Subject=ViWrapperBug
  4. file://localhost/usr/home/mmuller/src/
  5. http://lbcons.net/~mitch/
  6. http://www.gnu.org/software/rcs/rcs.html
  7. http://www.csc.calpoly.edu/~dbutler/tutorials/winter96/rcs/
  8. http://subversion.tigris.org/
  9. http://www.cvshome.org/
  10. http://directory.google.com/Top/Computers/Software/Configuration_Management/Tools/Concurrent_Versions_System/
  11. http://directory.google.com/Top/Computers/Software/Configuration_Management/Tools/Revision_Control_System/


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.