Class ::tycho::RevControl


Inherits: ::tycho::Dialog - Source File - Contents: itk_option - public methods - public procs - protected methods - protected procs - protected variables
Base class for revision control objects. The main entry point is is the procedure setup, which will create a revision control window of the appropriate type. The list of revision control types is given by the option "revisionControlTypes", which lists them in order of preference (e.g. "SCCS RCS", which is the default value). It is assumed that for each type listed, there is a class defined called RevControl$type, where $type is the type, and that this class is derived from RevControl.

Itk_option

-object
Specify the File object under version control. If the specified object is not a ::tycho::File object, or does not exist, then trigger an error.

Public constructs

Public Methods

checkInAndUpdate
Check in the file, update the state of the control buttons, and update the history information, if it is being viewed.
checkOutAndUpdate
Check out the file, update the state of the control buttons, and update the history information, if it is being viewed.
initializeRevControl
Put the file under revision control.
unedit
Query the user for confirmation, then unedit the file, reverting to the previously checked in version. This base class method only does the query. If the user does not confirm, exit with a silent error.
viewHistory
View the version control history.

Public Procs

checkIn object
Check in the file associated with the specified File object.
checkOut object
Check out the file associated with the specified File object.
isUnderRevControl file
Return 1 if the given file is under revision control, 0 otherwise.
makeRev type editorWin editorObj
Make a revision control object of the specified type. The first argument is the type (SCCS, RCS, ...), the second argument is the window name for the editor, and the third argument is the editor object, which must be an instance of ::tycho::File or a class derived from that.
setup editorWin editorObj
Setup revision control for an editor. The arguments are the name of the top-level editor window and the name of the editor object, which must be an instance of ::tycho::File or a class derived from that.
whichRevClass obj
Return the name of a suitable revision control class if the given object is under revision control. Otherwise, return an empty string. The object must be a ::tycho::File object.

Protected constructs

Protected Methods

enableButton button
Enable one of "checkin" or "checkout" buttons and make it the default. The argument must be one of "checkin" or "checkout". The other button is disabled.
isCheckedOut
Return 1 if the file is checked out, 0 otherwise.
preference mode args
Access the preferences associated with this widget. This method overrides the default method in ::tycho::TWidget to access the "revcontrol" preferences.
updateHistory
Update the history information, if it is on display. This does nothing in the base class.

Protected Procs

cdDir dir
Change to the given directory with appropriate error checks.
getComments
Open a dialog box to query the user for comments.

Protected Variables

textobject
The text widget object that we are associated with.
object
Specify the File object under version control. If the specified object is not a ::tycho::File object, or does not exist, then trigger an error.
file
The file that we are associated with.

Index of classes



Author: Joel King and Edward A. Lee
Version: @(#)RevControl.itcl 1.31 %G
Copyright: (c) 1995-1996 The Regents of the University of California.