Name: | Version Control |
Version: | 0.5 |
Last update: | 2019-11-27 14:13:07 |
This help file describes the Version Control package.
Introduction
The core AlphaTcl library incorporates the rudiments of a general version
control package. This allows you to use Alpha to open, check out, check in,
diff, merge,... files with respect to some local or remote file repository.
The version control support is designed to allow you to use many different
version control packages (Subversion, Git, Mercurial, Bazaar, Cvs etc) at
the same time.
The package named Version Control is always turned on.
Several packages are provided to plug in to the general vc system.
Currently the following packages are available:
Currently, the Subversion package is undergoing substantial development
(since the AlphaTcl library itself is stored in a subversion repository),
and sports features not found in the other packages (and not yet fully
documented here). Conversely, not all the info found in this document is
applicable to Subversion.
The VCS Menu
Each document window has a version control popup-menu, in the top control bar. The
icon of this menu is a padlock because it also lets you lock/unlock the
current file.
The VCS menu can also be accessed via the package Contextual Menu. Just adjust your Contextual Menu preferences by
checking the box which is next to VCS Menu. See the Contextual Menu Preferences panel. This Contextual Menu menu is simply a mirror of
the one found in each window's control bar.
This popup menu generally contains 4 groups of commands:
- an informative text indicating the version control system detected
for the current file.
- a set of commands that apply to the entire project.
- a set of commands that apply to the current window.
- some commands providing access to the console (if any), to the
preferences and to online documentation.
VC consoles
Most of the VC modules available in Alpha execute their commands by
interacting with the corresponding process via a console. This is the case
in particular of
Bazaar
Fossil
Git
Mercurial
Monotone and
Svn.
The console can also be used to execute any commands supported by the VC
client, as you would execute from a terminal window. The console windows
display in the bottom message bar the current project root, that is to say
the root of the current project.
You can bring up the console by selecting the menu item Open XXX
Console (where XXX is the name of the version control system)
found in the VCS popup menu. The console is also displayed each time you
execute a command like add, commit, etc.
Filesets and VC Systems
The VC code needs to know what version control system to use for a given
file. A particular version control package is associated with a given set
of files, so any one file must of course only be under one kind of version
control. For Subversion, CVS, Git, Mercurial, Bazaar, Fossil and Monotone,
it is automatically detected if a file belongs to a working copy (from the
presence of a directory named CVS or .svn etc.).
For other systems, the way you associate files with a specific VC
tool in Alpha is via the package Filesets. If you
don't already have a fileset which includes the files you want to use a
version control system on, you need to create one. If you'd like the files
to be in the Fileset Menu, you probably should use a From Hierarchy
or From Directory fileset. You can also create a simpler Recurse In fileset, which will allow Alpha to know about the fileset
(behind the scenes, as it were), though other fileset actions might
not then be available. See Filesets Help for more
information.
For fileset based VC systems, the VCS pop-up menu always includes an
Edit Fileset item in the bottom section which will open the
settings for the fileset associated with the current window.
Version Control Preferences
There are two types of preferences that you might need to set in order to
properly use this feature.
Global Preferences
The first type of preferences are global ones associated with this
package, use the Alpha ↣ Preferences ↣ Package Preferences ↣ Version Control dialog pane to inspect/change them.
This dialog is also available by selecting the pop-up menu item
VCS Menu ↣ Version Control Prefs.
See the Version Control Preferences panel.
Some of these preferences are for the location of your CVS/Perforce
applications.
Other global preferences are:
- Add Name Of System To Popup
- If this is set, then the name of the current VC tool is listed in the VC
pop-up menu as a quick reminder -- this is mainly useful only if you use
different VC tools for different filesets.
- Log Entries Limit
- This preference sets a maximum number of entris to be displayed by the
history commands (like log, info). The default value is 15.
Fileset Preferences
The second type of preferences are associated with the fileset of the
current window. Each fileset you define can have various additional pieces
of information attached to it. One of these is the version control system.
After activating the Version Control feature, you need to use the
menu item Filesets ↣ Utilities ↣ Edit A Fileset and take a look at the popup menu from which you can select one of the
VC tools such as Cvs, Perforce, Voodoo etc. Click here to edit a fileset.
The preferences dialog is also available by selecting the VCS Menu ↣ Fileset Prefs menu item in the VCS
pop-up menu.
Depending on the VC tool that you have selected, you might need to set
additional information -- see these package help file hyperlinks for more
information:
Once you have a fileset associated with a given file, Alpha automatically
places relevant version control actions in the VCS pop-up menu that will be
specific to each window and each system.
VC operations
Currently you may carry out some of the following operations (depending on
the VC tool's capacities):
- add
- check in
- check out
- fetch read only
- make writable
- refetch read only
- show differences
- undo checkout
The specific items in the menu will usually reflect the terminology used by
the VCS tool.
For subversion, the commands are not exactly those listed above. If
a particular command is not directly available there is a generic command
Svn Console which will give you a command-line interface (a small
Alpha window) where any svn command can be executed.
to be continued...
VC Limitations
Most of the current plug-ins cannot be used to setup a particular version
control system; they rely on a pre-existing configuration. For example, the
CVS version control tool might need a server, password, etc. Hence you will
probably have to use a cvs client, subversion client etc to configure the
system before Alpha will be able to use it effectively.
Known problems
Please report any problem or bug you encounter to
Alpha's Bug Tracker.
License and Disclaimer
See the source files for the various VC tools for their copyright info.
Copyright (c) 2OOO-2019, Jonathan Guyer.
All rights reserved.
The versionControl package is free software and distributed under
the terms of the new BSD license:
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
- Neither the name of Jonathan Guyer nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JONATHAN GUYER BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
This document has been placed in the public domain.