tkrev(1)
โจ tkrev(1) โจ
okay bestie so this is a page from the General Commands Manual and the command is literally called tkrev ๐ it's a whole vibe, let's get into it
๐ธ NAME ๐ธ
tkrev โ a Tk/Tcl Graphical Interface to CVS, Subversion and Git ๐
๐ฆ SYNOPSIS ๐ฆ
tkrev [-dir directory] [-root cvsroot] [-win workdir|module|merge]
tkrev [-log|blame file]
tkrev file - same as tkrev -log file
๐ DESCRIPTION ๐
TkRev is a Tcl/Tk-based graphical interface to the CVS, Subversion and Git configuration management systems. It shows you the status of all the files in your current working directory, and it hands you buttons and menus so you can run configuration-management commands on whatever files you've selected. ๐ซถ
Limited RCS functionality is also present, and โ not to be dramatic โ Git functionality is new in version 9. โจ TkDiff is bundled in for browsing and merging your changes, which is genuinely so helpful of it.
TkRev also helps you browse the repository. For Subversion, the repository tree looks like an ordinary file tree (cute, intuitive, we love). For CVS, the CVSROOT/modules file gets read. And TkRev extends CVS with a method to produce a browsable, "user friendly" listing of modules โ but that requires special comments in the CVSROOT/modules file. See the CVS Modules File section for more guidance. ๐
๐ OPTIONS ๐
TkRev accepts the following options, no cap:
-d,--dirdirectory โ start TkRev in the directory you specify ๐๏ธ-h,--helpโ print a usage message-l,--logfile โ invoke a log browser for the file you name-b,--blamefile โ invoke a blame (annotation) browser for the file you name ๐-v,--vcscvs|svn|git|rcsโ use the version control system you specify-r,--rootcvsroot โ use the repository root you specify-w,--winworkdir|module|mergeโ start by displaying the directory browser (this is the default), the module browser, or the directory-merge tool
โ ๏ธ heads up bestie:-winand-logare mutually exclusive. pick a lane ๐
๐ Examples ๐
Browse the modules located in CVSROOT /jaz/repository:
% tkrev --win module --root /jaz/repository
View the log of the file tstheap.c:
% tkrev ---log tstheap.c
(yes, that's three dashes in the second one, we're keeping it exactly as it is, iykyk ๐)
๐ Current Directory Browser ๐
The working directory browser shows the files in your local working copy, or "sandbox." It shows the status of the files at a glance and provides tools to help with most of the common version control operations you might do. it's giving personal assistant energy honestly ๐
At the top of the browser you will find:
- The name of the current directory. You can change directories by typing in this field. Recently visited directories are saved in the picklist. ๐ง
- The relative path of the current directory in the repository. If it is not contained in the repository you may import it using the menu or toolbar button.
- A Directory Tag name, if the directory is contained in the repository and it has been checked out against a particular branch or tag. In Subversion, the branch or tag is inferred from the URL based on the conventional trunk-branches-tags repository organization. ๐ฟ
- The repository location of the current directory โ
CVSROOTif it's under CVS control, the URL of the Subversion repository if it's under Subversion control, or the origin if it's controlled by Git. If not a version-controlled directory, it may default to the value of the$CVSROOTenvironment variable. ๐
The main part of the working directory browser is a list of the files in the current directory with an icon next to each showing its status. You select a file by clicking on its name or icon once with the left mouse button. Holding the Control key while clicking will add the file to the group of those already selected. You can select a contiguous group of files by holding the Shift key while clicking. You can also select a group of files by dragging the mouse with the middle or right button pressed to select an area. Selecting an item that's already selected de-selects that item. To unselect all files, click the left mouse button in an empty area of the file list. ๐ฑ๏ธโจ
- The Date column (can be hidden) shows the modification time of the file. The format of the date column may be specified with
cvscfg(dateformat). The default format was chosen because it sorts the same way alphabetically as chronologically. ๐ฐ๏ธ - If the directory belongs to a revision system, other columns are present.
- The revision column shows which revision of the file is checked out, and whether it's on the trunk or on a branch.
- The status column (can be hidden) shows the revision of the file spelled out in text. This information is mostly redundant to the icon in the file column.
- The Editor/Author/Locker column (can be hidden) varies according to revision system. In Subversion, the author of the most recent checkin is shown. In CVS, it shows a list of people editing the files if your site uses
cvs watchand/orcvs edit. Otherwise, it will be empty. In RCS, it shows who, if anyone, has the file locked. ๐
The optional columns can be displayed or hidden using the Options menu.
You can move into a directory by double-clicking on it. ๐๐
Double clicking on a file will load the file into a suitable editor so you can change it. A different editor can be used for different file types (see Configuration Files).
๐ธ File Status ๐ธ
When you are in a directory that is under CVS, Subversion, or Git control, the file status will be shown by an icon next to each file. Checking the "Status Column" option causes the status to be displayed in text in its own column. Some possible statuses are:
- Up-to-date โ The file is up to date with respect to the repository. โ
- Locally Modified โ The file has been modified in the current directory since being checked out of the repository.
- Locally Added โ The file has been added to the repository. This file will become permanent in the repository once a commit is made. ๐
- Locally Removed โ You have removed the file with
remove, and not yet committed your changes. - Needs Checkout โ Someone else has committed a newer revision to the repository. The name is slightly misleading; you will ordinarily use
updaterather thancheckoutto get that newer revision. ๐ญ - Needs Patch โ Like Needs Checkout, but the CVS server will send a patch rather than the entire file. Sending a patch or sending an entire file accomplishes the same thing.
- Needs Merge โ Someone else has committed a newer revision to the repository, and you have also made modifications to the file. ๐ซ
- Unresolved Conflict โ This is like Locally Modified, except that a previous
updatecommand gave a conflict. You need to resolve the conflict before checking in. ?โ The file is not contained in the repository. You may need to add the file to the repository by pressing the "Add" button.[directory:CVS]โ A directory which has been checked out from a CVS repository.[directory:SVN]โ A directory which has been checked out from a Subversion repository. In Subversion, directories are themselves versioned objects.[directory:RCS]โ A directory which contains an RCS sub-directory or some files with the,vsuffix, presumably containing some files that are under RCS revision control.[directory:GIT]โ A directory which has been cloned from a Git repository.[directory]โ A directory not controlled by one of the supported revision control systems. ๐
๐ฆ File Filters ๐ฆ
- Clean โ You can specify file matching patterns to instruct TkRev which files you wish to see. You can also specify patterns telling it which files to remove when you press the "Clean" button or select the File -> Cleanup menu item. ๐งน
- Hide โ "Hide" works exactly the way a
.cvsignorefile works. That is, it causes non-CVS files with the pattern to be ignored. It's meant for hiding.ofiles and such. Any file under CVS control will be listed anyway. ๐ - Show โ "Show" is the inverse. It hides non-CVS files except for those with the pattern.
๐ Buttons ๐
- Module Browser: The big button at the upper right opens the module browser โ it opens a module browser window which will enable you to explore items in the repository even if they're not checked out. In CVS, this requires that there be entries in the
CVSROOT/modulesfile. Browsing can be improved by using TkRev-specific comments inCVSROOT/modules. ๐ - Go Up: The button to the left of the entry that shows the current directory. Press it and you go up one level. โฌ๏ธ
There are a number of buttons at the bottom of the window. Pressing on one of these causes the following actions:
- Delete: Press this button to delete the selected files. The files will not be removed from the repository. To remove the files from the repository as well as delete them, press the "Remove" button instead. โ ๏ธ
- Edit: Press this button to load the selected files in to an appropriate editor. โ๏ธ
- View: Press this button to view the selected files in a Tk text window. This can be a lot faster then Edit, in case your preferred editor is xemacs or something of that magnitude. ๐ฎ๐จ
- Refresh: Press this button to re-read the current directory, in case the status of some files may have changed. ๐
- Status Check: Shows, in a searchable text window, the status of all the files. By default, it is recursive and lists unknown (
?) files. These can be changed in the Options menu. - Directory Branch Browser: For merging the entire directory. In Subversion, it opens the Branch Browser for
"."In CVS, it chooses a "representative" file in the current directory and opens a graphical tool for directory merges. ๐ณ - Log (Branch) Browse: This button will bring up the log browser window for each of the selected files in the window. See the Branch Diagram Browser section.
- Annotate: This displays a window in which the selected file is shown with the lines highlighted according to when and by whom they were last revised. In Subversion, it's also called "blame." ๐
- Diff: This compares the selected files with the equivalent files in the repository. A separate program called "TkDiff" (also supplied with TkRev) is used to do this. For more information on TkDiff, see TkDiff's help menu. ๐
- Merge Conflict: If a file's status says "Needs Merge", "Conflict", or is marked with a "
C" in CVS Check, there was a difference which CVS needs help to reconcile. This button invokes TkDiff with the-conflictoption, opening a merge window to help you merge the differences. ๐ค - Check In โ bestie, this is the moment ๐
this button commits all your changes to the repository, and yes that includes adding new files and removing deleted files. The second you press it, a dialog pops up asking you for the version number of the files you want to commit, plus a comment. You only need to type a version number if you want to bump the files in the repository up to the next major version number. Example time: if a file is version
1.10and you don't enter a version number, it gets checked in as version1.11. But if you enter the version number3, it gets checked in as version3.0instead. Honestly? It is usually better to use symbolic tags for that purpose. And heads up: if you usercsinfoto supply a template for the comment, you must use an external editor. Setcvscfg(use_cvseditor)to do this. For checking in to RCS, an external editor is always used. - Update โ this one refreshes your sandbox directory with any changes that other developers have committed to the repository. Not me refreshing my feed, refreshing my sandbox ๐ฆ
- Update with Options โ lets you update from a different branch, with a tag, with empty directories, and so on. โจ options on options, we love to see it.
- Add Files โ press this when you want to add new files to the repository. โ ๏ธ Important: you must create the file before adding it to the repository, no manifesting it into existence. To add some files, select them and press the Add Files button. The files you've added to the repository will be committed next time you press the Check In button. It is not recursive. Use the menu
CVS -> Add Recursivelyfor that. - Remove Files โ this button will remove files. To remove files, select them and press the Remove button. The files will disappear from the directory, and will be removed from the repository next time you press the Check In button. Also not recursive! Use the menu
CVS -> Remove Recursivelyfor that. - Tag โ this button will tag the selected files. In CVS, the
-F(force) option will move the tag if it already exists on the file. Periodt. - Branch Tag โ this button will tag the selected files, creating a branch. In CVS, the
-F(force) option will move the tag if it already exists on the file. Same energy, branch edition ๐ - Lock (CVS and RCS) โ lock an RCS file for editing. If
cvscfg(cvslock)is set, lock a CVS file. Use of locking is philosophically discouraged in CVS since it's against the "concurrent" part of Concurrent Versioning System, but locking policy is nevertheless used at some sites. One size doesn't fit all, fr fr. ๐ - Unlock (CVS and RCS) โ unlock an RCS file. If
cvscfg(cvslock)is set, unlock a CVS file. - Set Edit Flag (CVS) โ this button sets the edit flag on the selected files, enabling other developers to see that you are currently editing those files (See
"cvs edit"in the CVS documentation). ๐ - Reset Edit Flag (CVS) โ this button resets the edit flag on the selected files, enabling other developers to see that you are no longer editing those files (See
"cvs edit"in the CVS documentation). Now the messy part, and I need you to pay attention bestie: as the current version ofcvswaits on a prompt for"cvs unedit"if changes have been made to the file in question (to ask if you want to revert the changes to the current revision), the current action of TkRev is to abort the unedit (by piping in nothing to stdin). Therefore, to lose the changes and revert to the current revision, it is necessary to delete the file and do an update (this will also clear the edit flag). To keep the changes, make a copy of the file, delete the original, update, and then move the saved copy back to the original filename. ๐ญ it's giving "do a little dance to preserve your work" but that's genuinely the documented way. - Close โ press this button to close the Working Directory Browser. If no other windows are open, TkRev exits. ๐
๐ฆโจ Repository Browser โจ๐ฆ
Operations that are performed on the repository instead of in a checked-out working directory are done with the Module Browser. The most common of these operations is checking out or exporting from the repository. The Module Browser can be started from the command line (tkrev -win module) or started from the main window by pressing the big button. ๐ฅ
Subversion repositories can be browsed like a file tree, and that is exactly what you will see in the Module Browser. CVS repositories aren't directly browsable, but if the CVSROOT/modules file is maintained appropriately, TkRev can display the modules and infer tree structures if they are present. See the CVS Modules File section. ๐ธ
Using the module browser window, you can select a module to check out. When you check out a module, a new directory is created in the current working directory with the same name as the module.
๐ท๏ธ Tagging and Branching (cvs rtag)
You can tag particular versions of a module or file in the repository, with plain or branch tags, without having the module checked out. Not me tagging things I don't even have on my machine ๐ iconic behaviour actually.
๐ฆ Exporting
Once a software release has been tagged, you can use a special type of checkout called an export. This allows you to cleanly check out files from the repository, without all of the administrivia that CVS needs to have while working on the files. It is useful for delivery of a software release to a customer. ๐
๐ฅ Importing
TkRev contains a special dialog to allow users to import new files into the repository. In CVS, new modules can be assigned places within the repository, as well as descriptive names (so that other people know what they are for). ๐ซถ
When the Module Browser displays a CVS repository, the first column is a tree showing the module codes and directory names of all of the items in the repository. The icon shows whether the item is a directory (which may contain other directories or modules), or whether it is a module (which may be checked out from TkRev). It is possible for an item to be both a module and a directory โ multitasking main character energy. ๐ If it has a red ball on it, you can check it out. If it shows a plain folder icon, you have to open the folder to get to the items that you can check out.
To select a module, click on it with the left mouse button. The right mouse button will perform a secondary selection, which is used only for Subversion diff and patch. To clear the selection, click on the item again or click in an empty area of the module column. There can only be one primary and one secondary selection. No greedy selecting, bestie ๐
๐ Repository Browser Buttons ๐
The module browser contains the following buttons:
- Who โ CVS only. Shows which modules are checked out by whom. ๐ detective mode activated.
- Import โ this item will import the contents of the current directory (the one shown in the Working Directory Browser) into the repository as a module. See the section titled Importing for more information.
- File Browse โ displays a list of the selected module's files. From the file list, you can view the file, browse its revision history, or see a list of its tags. โจ
- Check Out โ checks out the current version of a module. A dialog allows you to specify a tag, change the destination, and so on.
- Export โ exports the current version of a module. A dialog allows you to specify a tag, change the destination, and so on. Export is similar to check-out, except exported directories do not contain the
CVSor administrative directories, and are therefore cleaner (but cannot be used for checking files back in to the repository). โ ๏ธ You must supply a tag name when you are exporting a module to make sure you can reproduce the exported files at a later date. No tag, no reproducibility, no cap. - Tag โ this button tags an entire module.
- Branch Tag โ this creates a branch of a module by giving it a branch tag. ๐ฟ
- Patch Summary โ this item displays a short summary of the differences between two versions of a module.
- Create Patch File โ this item creates a Larry Wall format
patch(1)file of the module selected. ๐ง - Close โ this button closes the Repository Browser. If no other windows are open, TkRev exits. ๐
๐ Branch Diagram Browser ๐
The <b>TkRev Log Browser</b> window is literally the main character here โ it lets you look at a graphical display of the revision log of a file, including all previous versions and any branched versions. Obsessed. ๐
You can get to the log browser window in three ways, bestie, pick your fighter:
- Invoking it directly with
tkrev [-log] filename - Selecting a file in the main window of TkRev and pressing the Log Browse button
- Selecting a file in a list invoked from the module browser and pressing the Log Browse button
If the Log Browser is examining a checked-out file, the buttons for performing merge operations are enabled. โจ
๐ Log Browser Window ๐
The log browser window has three components, no cap:
- The file name and version information section at the top
- The log display in the middle
- A row of buttons along the bottom
๐ฆ Log Display ๐ฆ
The main log display is fairly self explanatory, fr fr. It shows a group of boxes connected by lines indicating the main trunk of the file development (on the left hand side) and any branches that the file has (which spread out to the right of the main trunk). It's giving family tree but make it code. ๐ณ
Each box contains the version number, author of the version, and other information determined by the menu Diagram -> Revision Layout.
Constructing the branch diagram from Subversion is inefficient, so the Log Browser counts the tags when doing a Subversion diagram and pops up a dialog giving you a chance to skip the tag step if there are too many tags (where "many" arbitrarily equals 10.)
๐ Version Numbers ๐
Once a file is loaded into the log browser, one or two version numbers may be selected. Iconic behaviour, honestly.
- The primary version (Selection A) is selected by clicking the <b>left mouse button</b> on a version box in the main log display.
- The secondary version (Selection B) is selected by clicking the <b>right mouse button</b> on a version box in the main log display.
Operations such as "View" and "Annotate" operate only on the primary version selected.
Operations such as "Diff" and "Merge Changes to Current" require two versions to be selected.
๐ Searching the Diagram ๐
You can search the canvas for tags, revisions, authors, and dates. The following special characters are used in the search pattern:
*โ Matches any sequence of characters in string, including a null string.?โ Matches any single character in string.[chars]โ Matches any character in the set given by chars. If a sequence of the formx-yappears in chars, then any character between x and y, inclusive, will match.\xโ Matches the single character x. This provides a way of avoiding interpretation of the special characters in a pattern.
If you only enter "foo" (without the quotes) in the entry box, it searches the exact string "foo". If you want to search all strings starting with "foo", you have to put "foo*". For all strings containing "foo", you must put "*foo*". iykyk ๐
โจ Log Browser Buttons โจ
The log browser contains the following buttons:
Refreshโ Re-reads the revision history of the fileViewโ Pressing this button displays a Tk text window containing the version of the file at Selection A.Annotateโ This displays a window in which the file is shown with its lines highlighted according to when and by whom they were last revised. In Subversion, it's also called "blame." ๐Diffโ Pressing this button runs the"tkdiff"program to display the differences between version A and version B.Mergeโ To use this button, select a branch version of the file, other than the branch you are currently on, as the primary version (Selection A). The changes made along the branch up to that version will be merged into the current version, and stored in the current directory. Optionally, select another version (Selection B) and the changes will be from that point rather than from the base of the branch. The version of the file in the current directory will be merged, but no commit will occur. Then you inspect the merged files, correct any conflicts which may occur, and commit when you are satisfied. Optionally, TkRev will tag the version that the merge is from. It suggests a tag of the form"mergefrom_rev_date."If you use this auto-tagging function, another dialog containing a suggested tag for the merged-to version will appear. It's suggested to leave the dialog up until you are finished, then copy-and-paste the suggested tag into the"Tag"dialog. It is always a good practice to tag when doing merges, and if you use tags of the suggested form, the Branch Browser can diagram them. (Auto-tagging is not implemented in Subversion because, despite the fact that tags are "cheap," it's somewhat impractical to auto-tag single files. You can do the tagging manually, however.)View Tagsโ This button lists all the tags applied to the file in a searchable text window.Closeโ This button closes the Log Browser. If no other windows are open, TkRev exits.
๐ง The Diagram Menu ๐ง
The Diagram Menu allows you to control what you see in the branch diagram. You can choose how much information to show in the boxes, whether to show empty revisions, and whether to show tags. You can even control the size of the boxes. If you are using Subversion, you may wish to turn the display of tags off. If they aren't asked for they won't be read from the repository, which can save a lot of time. ๐
๐ Directory Merge Tool for CVS ๐
The Directory Merge Tool chooses a "representative" file in the current directory and diagrams the branch tags. It tries to pick the "bushiest" file, or failing that, the most-revised file. If you disagree with its choice, you can type the name of another file in the top entry and press <b>Return</b> to diagram that file instead.
The main purpose of this tool is to do merges (cvs update -j rev [-j rev]) on the whole directory. For merging one file at a time, you should use the Log Browser. You can only merge to the line (trunk or branch) that you are currently on. Select a branch to merge from by clicking on it. Then press either the "Merge" or "Merge Changes" button.
The version of the file in the current directory will be over-written, but it will not be committed to the repository. You do that after you've reconciled conflicts and decided if it's what you really want. ๐ญ
Merge Branch to Current:
The changes made on the branch since its beginning will be merged into the current version.
Merge Changes to Current:
Instead of merging from the base of the branch, this button merges the changes that were made since a particular version on the branch. It pops up a dialog in which you fill in the version. It should usually be the version that was last merged.
๐ Importing New Modules ๐
Before importing a new module, first check to make sure that you have write permission to the repository. Also you'll have to make sure the module name is not already in use.
To import a module you first need a directory where the module is located. Make sure that there is nothing in this directory except the files that you want to import.
Press the big "Repository Browser" button in the top part of the tkrev UI, or use CVS -> Import WD into Repository from the menu bar.
In the module browser, press the Import button on the bottom, the one that shows a folder and an up arrow. ๐โฌ๏ธ
In the dialog that pops up, fill in a descriptive title for the module. This will be what you see in the right side of the module browser.
OK the dialog. Several things happen now. The directory is imported, the CVSROOT/module file is updated, your original directory is saved as directory.orig, and the newly created module is checked out.
When it finishes, you should find the original Working Directory Browser showing the files in the newly created, checked out module. Slay. โจ
Here is a more detailed description of the fields in the Import Dialog.
Module Name:
A name for the module. This name must not already exist in the repository. Your organization could settle on a single unambiguous code for modules. One possibility is something like:
[project code]-[subsystem code]-[module code]
Module Path:
The location in the repository tree where your new module will go.
Descriptive Title:
A one-line descriptive title for your module. This will be displayed in the right-hand column of the browser.
Version Number:
The current version number of the module. This should be a number of the form X.Y.Z where .Y and .Z are optional. You can leave this blank, in which case 1 will be used as the first version number.
Importing a directory into Subversion is similar but not so complicated. You use the SVN -> Import CWD into Repository menu. You need supply only the path in the repository where you want the directory to go.
The repository must be prepared and the path must exist, however.
๐ Importing to an Existing Module ๐
Before importing to an existing module, first check to make sure that you have write permission to the repository.
To import to an existing module you first need a directory where the code is located. Make sure that there is nothing in this directory (including no CVS directory) except the files that you want to import.
Open up the Repository Browser by selecting File -> Browse Modules from the menu bar.
In the Repository Browser, select File -> Import To An Existing Module from the menu bar.
In the dialog that pops up, press the Browse button and select the name of an existing module. Press the OK to close this dialog box. Enter the version number of the code to be imported.
OK the dialog. Several things happen now. The directory is imported, your original directory is saved as directory.orig, and the newly created module is checked out.
When it finishes, you will find the original Working Directory Browser showing the original code. If you press the "Re-read the current directory" button you will see the results of the checked out code.
Here is a more detailed description of the fields in the Import Dialog.
Module Name:
A name for the existing module. Filled in by the use of the the Browse button
Module Path:
The location in the repository tree where the existing module is. Filled in by the use of the Browse button.
Version Number:
The current version number of the module to be imported. This should be a number of the form X.Y.Z where .Y and .Z are optional. You can leave this blank, in which case 1 will be used as the first version number.
๐ Vendor Merge for CVS ๐
okay so sometimes your whole software thing is built off a source distribution that came from a vendor or some third-party distributor, right? and once you've built your own local version of that distribution, you're gonna wanna merge or track the vendor's future releases into your local copy. that's literally what the vendor merge command is for, bestie.
The vendor merge command assumes that a separate module has already been defined for the vendor or third-party distribution with the use of the "Import To A New Module" and "Import To An Existing Module" commands. It also assumes that a separate module has already been defined for the local code for which the vendor merge operation is to be applied to. (so like, two modules gotta exist first, no skipping steps ๐ )
Here's the vibe, step by step:
- Start from an empty directory and invoke
tkrev. Open up the Repository Browser by selecting File -> Browse Modules from the menu bar. - Checkout the module of the local code to be merged with changes from the vendor module. (Use the red icon with the down arrow ๐ซถ)
- In the Repository Browser, after verifying that the Module entry box still has the name the module of the local code to which the vendor code is to be merged into, select File/Vendor Merge from the menu bar.
- In the Module Level Merge With Vendor Code window, press the Browse button to select the module to be used as the vendor module.
- OK the dialog. All revisions from the vendor module will be shown in the two scroll lists. Fill in the From and To entry boxes by clicking in the appropriate scroll lists.
- Ok the dialog. Several things happens now. Several screens will appear showing the output from
cvscommands for (1)checking out temp files, (2)cvs merge, and (3)cvs rdiff. Information in these screens will tell you what routines will have merge conflicts and what files are new or deleted. After perusing the files, close each screen. (In the preceding dialog box, there was an option to save outputs from the merge and rdiff operations to filesCVSmerge.outandCVSrdiff.out.)
The checked out local code will now contain changes from a merge between two revisions of the vendor modules. This code will not be checked into the repository. You can do that after you've reconciled conflicts and decide if that is what you really want. (not me letting you commit chaos without checking first ๐)
A detailed example on how to use the vendor merge operation is provided in the PDF file vendor5readme.pdf. ๐
๐ธ FILES ๐ธ
There are two configuration files for TkRev. The first is stored in the directory in which the *.tcl files for TkRev are installed. This is called tkrev_def.tcl. You can put a file called site_def in that directory, too. That's a good place for site-specific things like tagcolours. Unlike tkrev_def.tcl, it will not be overwritten when you install a newer version of TkRev. (iconic, honestly)
Values in the site configuration files can be over-ridden at the user level by placing a .tkrev file in your home directory. Commands in either of these files should use Tcl syntax. In other words, to set a variable name, you should have the following command in your .tkrev file:
set variablename value
for example:
set cvscfg(editor) "gvim"
The following variables are supported by TkRev:
โจ Startup โจ
cvscfg(startwindow)โ Which window you want to see on startup. (workdir or module)cvscfg(vcspref)โ When more than one revision control system is present in a directory, this specifies an order of precedence. The default order is{cvs svn git rcs}
๐ GUI ๐
tk scalingโ In case your display resolution is unusual, you can scale all the text to make the UI larger or smaller. For exampletk scaling 1.9would make it almost double size. (big mode ON)cvscfg(large_icons)โ If not zero, the UI icons will be displayed at double sizecvscfg(match_desktop)โ If true, tkrev will attempt to detect colors set by the desktop environment, whether gtk or CDE. It's turned off by default, because it's experimental, except for CDE which has been there since CDE was in general use. (experimental = proceed with vibes, not certainty ๐)
๐ฆ CVS ๐ฆ
cvscfg(cvsroot)โ If set, it overrides theCVSROOTenvironment variable.
๐ Subversion ๐
If your SVN repository has a structure similar to trunk, branches, and tags but with different names, you can tell TkRev about it by setting variables in tkrev_def.tcl:
set cvscfg(svn_trunkdir) "elephants"
set cvscfg(svn_branchdir) "dogs"
set cvscfg(svn_tagdir) "ducklings"
The branch browser depends on the convention of having a trunk, branches, and tags structure to draw the diagram. These variables may give you a little more flexibility. (custom names? we love that for you ๐๐๐ฆ)
โญ GIT โญ
cvscfg(gitdetail)โ Set to true or false. If it's false (off) an individual Git log call to each file will be suppressed to save time. You won't see the hashtag or committer in that case.cvscfg(gitmaxhist)โ For the branch visualizer. Tells how far back into the history to go. Default is 250 commits.cvscfg(picklist_items)โ Maximum number of visited directories and repositories to save in the picklist history
๐ Log browser ๐
cvscfg(colourA),cvscfg(colourB)โ Hilight colours for revision-log boxescvscfg(tagdepth)โ Number of tags you want to see for each revision on the branching diagram before it says"more..."and offers a pop-up to show the restcvscfg(toomany_tags)โ Maximum number of tags in a Subversion repository to process and displaycvscfg(tagcolour,tagstring)โ Colors for marking tags. For example:set cvscfg(tagcolour,tkcvs_r6) Purple
๐ Module browser ๐
cvscfg(aliasfolder)โ In the CVS module browser, if true this will cause the alias modules to be grouped in one folder. Cleans up clutter if there are a lot of aliases. (declutter era โจ)
๐ซถ User preferences ๐ซถ
cvscfg(allfiles)โ Set this to false to see normal files only in the directory browser. Set it to true to see all files including hidden files.cvscfg(auto_status)โ Set the default for automatic status-refresh of a version-controlled directory. Automatic updates are done when a directory is entered and after some operations.cvscfg(auto_tag)โ Whether to tag the merged-from revision when using TkRev to merge different revisions of files by default. A dialog still lets you change your mind, regardless of the default.cvscfg(confirm_prompt)โ Ask for confirmation before performing an operation(true or false)cvscfg(dateformat)โ Format for the date string shown in the"Date"column, for example"%Y/%m/%d %H:%M"cvscfg(cvslock)โ Set to true to turn on the ability to use cvs-admin locking from the GUI.cvscfg(econtrol)โ Set this to true to turn on the ability to use CVS Edit and Unedit, if your site is configured to allow the feature.cvscfg(editor)โ Preferred default editorcvscfg(editors)โ String pairs giving the editor-command and string-match-pattern, for deciding which editor to usecvscfg(editorargs)โ Command-line arguments to send to the default editing program.cvscfg(mergetoformat),cvscfg(mergefromformat)โ Format for mergeto- and mergefrom- tags. The_BRANCH_part must be left as-is, but you can change the prefix and the date format, for example"mergeto_BRANCH_%d%b%y". The date format must be the same for both. CVS rule: a tag must not contain the characters`$,.:;@'(fr, do NOT put those in a tag, that's a whole rule)cvscfg(recurse)โ Whether reports are recursive (true or false)cvscfg(savelines)โ How many lines to keep in the trace windowcvscfg(status_filter)โ Filter out unknown files (status"?") from CVS Check and CVS Update reports.cvscfg(use_cvseditor)โ Let CVS invoke an editor for commit log messages rather than having tkrev use its own input box. By doing this, your site's commit template (rcsinfo) can be used.
๐ File filters ๐
cvscfg(show_file_filter)โ Pattern for which files to list. Empty string is equivalent to the entire directory (minus hidden files)cvscfg(ignore_file_filter)โ Pattern used in the workdir filter for files to be ignoredcvscfg(clean_these)โ Pattern to be used for cleaning a directory (removing unwanted files)
๐ System ๐
cvscfg(print_cmd)โ System command used for printing.lpr,enscript -Ghr, etc)cvscfg(shell)โ What you want to happen when you ask for a shellcvscfg(terminal)โ Command prefix to use to run something in a terminal window
๐ง Portability ๐ง
cvscfg(aster)โ File mask for all files (*for Unix,*.*for windows)cvscfg(null)โ The null device./dev/nullfor Unix,nulfor windowscvscfg(tkdiff)โ How to start tkdiff. Examplesh /usr/local/bin/tkdiffcvscfg(tmpdir)โ Directory in which to do behind-the-scenes checkouts. Usually/tmpor/var/tmp)
๐ฅ Debugging ๐ฅ
cvscfg(log_classes)โ Types of debug output in the trace window:C=commands,E=command stderr,S=command stdout,T=Function entry/exit,D=Debugging,F=File creation/deletioncvscfg(logging)โ Logging (debugging) on or off
๐ USER DEFINED MENU ๐
Okay bestie, you can literally grow your own menu. You can extend the TkRev menu by inserting additional commands into the .tkrev or tkrev_def.tcl files. These extensions show up on a whole extra menu, sitting to the right of the TkRev Options menu. Main character energy, honestly. ๐
To create new menu entries on the user-defined menu, set these variables:
cvsmenu(command)โ set a variable with this name to a value like"commandname", and the CVS commandcvs commandnamegets run when you select that menu option. For example, this line:
set cvsmenu(update_A) "update -A"
adds a new menu option titled update_A to the user defined menu, and activating it runs the command cvs update -A on the selected files. Slay. โจ
Heads up: for versions of CVS later than 1.3, that example command forces an update to the head version of a file, ignoring any sticky tags or versions attached to the file. No cap.
usermenu(command)โ set a variable with this name to a value like"commandname", and the commandcommandnamegets run when you select that menu option. For example, this line:
set usermenu(view) "cat"
adds a new menu option titled view to the User defined menu, and activating it runs the command cat on the selected files. ๐ฑ
Any user-defined commands get passed a list of file names as arguments โ the ones matching the files selected in the directory listing on the main menu. Like, they know which files you meant. ๐ซถ
And the output of the user defined commands? It shows up in a window when the command is finished. Iconic.
๐ธ CVS MODULES FILE ๐ธ
If you haven't put anything in your CVSROOT/modules file โ bestie, please do. Go peek at the "Administrative Files" section of the CVS manual. Then you can add comments that TkRev can use to title the modules and to display them in a tree structure. ๐ฆ
The simplest use of TkRev's #D directive is to display a meaningful title for the module:
#D softproj Software Development Projects
softproj softproj
A fancier use is organizing the modules into a tree that will mimic their directory nesting in the repository when they appear in the module browser. Say we have a directory called chocolate organized like this:
chocolate/
truffle/
cocoa3/
biter/
sniffer/
snuffler/
To display its hierarchy, and also make the deepest directories more accessible by giving them module names, we could put this in the modules file:
#D chocolate Top Chocolate
#D chocolate/truffle Cocoa Level 2
#D chocolate/truffle/cocoa3 Cocoa Level 3
#D sniffer Chocolate Sniffer
sniffer chocolate/truffle/cocoa3/sniffer
#D snuff Chocolate Snuffler
snuff chocolate/truffle/cocoa3/snuffler
#D biter Chocolate Biter
biter chocolate/truffle/cocoa3/biter
When you are installing TkRev, you may like to add these additional lines to the modules file โ just remember to check out the modules module from the repository, and then commit it again when you have finished the edits. Do not forget the commit, I am begging. ๐
These extension lines commence with a # character, so CVS interprets them as comments. They can be safely left in the file whether you are using TkRev or not. ๐
"#M" is equivalent to "#D". The two had different functions in previous versions of TkRev, but now both are parsed the same way. Glow up. ๐
ENVIRONMENT
If you use CVS, you can set the CVSROOT environment variable to point to the location of your default CVS repository.
The Module Browser will look for SVNROOT and GITROOT as well, although those have no meaning to SVN or Git respectively. (It's giving "we tried".) ๐
If you like to set some color preferences in .Xdefaults or .Xresources, these can be used:
tkrev*background: gray80
tkrev*foreground: black
tkrev*Menu.background: gray65
tkrev*Menu.foreground: white
tkrev*Button.background: gray75
tkrev*Button.foreground: black
tkrev*Canvas.background: gray90
tkrev*Canvas.foreground: black
tkrev*Text.background: gray90
tkrev*Text.foreground: black
tkrev*Text.selectBackground: slateblue
tkrev*Text.selectForeground: white
tkrev*Menu.font: {Serif 12}
tkrev*Button.font: {Serif 11}
tkrev*Label.font: {Cantarell 10}
tkrev*List.font: {Cantarell 10}
tkrev*Text.font: {DejaVu Sans Mono 10}
๐ SEE ALSO ๐
tkdiffonline helpcvssvngit
and that's a wrap on the whole tkrev(1) page, bestie ๐ โ this was the tkrev(1) manual page, dated and versioned as its footer says. Go forth and version-control like the main character you are. ๐
๐ฆ where this page comes from
- nixos 26.05: tkrev 9.6.1
- nixpkgs unstable: tkrev 9.6.2
- ubuntu resolute: tkrev 9.6.1-3
- ubuntu stonking: tkrev 9.6.2-1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms