|
WikiDoc |
AlphaTcl SVN CommandsDevelopment.AlphaTclSvnCommands HistoryHide minor edits - Show changes to markup October 29, 2007, at 07:51 PM
by - Minor fixes
Deleted line 0:
Added line 4:
Added line 10:
Changed lines 27-28 from:
http://alphatcl.svn.sourceforge.net/viewvc/alphatcl/ [http://alphatcl.svn.sourceforge.net/viewvc/alphatcl/] to:
http://alphatcl.svn.sourceforge.net/viewvc/alphatcl/ Changed lines 50-51 from:
(see SVN Access [http://sourceforge.net/svn/?group_id=16416]) to:
(see SVN Access [http://sourceforge.net/svn/?group_id=16416]) October 29, 2007, at 06:18 PM
by - New "AlphaTcl SVN Commands" page
Added lines 1-211:
(:title AlphaTcl SVN Commands:) This page explains the basic commands to deal with the AlphaTcl Subversion repository at SourceForge. The development of the AlphaTcl library is placed under version control. Since 2007-10-29, the version control system is Subversion [http://subversion.tigris.org/]: the old CVS repository has been converted in order to preserve the history of all the source files. The AlphaTcl library is hosted by SourceForge and one can browse the Subversion repository on line at the following address: http://alphatcl.svn.sourceforge.net/viewvc/alphatcl/ [http://alphatcl.svn.sourceforge.net/viewvc/alphatcl/] This page gives the main Subversion commands used to communicate with the repository:
This is not a tutorial about Subversion. To learn more about it, see the Subversion Book [svnbook.red-bean.com/en/1.2/index.html]. All the commands below suppose that you have an svn client installed on your machine. Execute the following instruction to see if it is the case:
which svn
If the command does not report anything, you'll have to install svn. Under Mac OS X, there is an easy to install binary package at metissian.com [metissian.com/projects/macosx/subversion/]. The URL of the AlphaTcl repository at SourceForge is:
https://alphatcl.svn.sourceforge.net/svnroot/alphatcl
(see SVN Access [http://sourceforge.net/svn/?group_id=16416]) Commands from the terminalThe svn command can be executed from any terminal (for instance Terminal.app on Mac OS X). Location of the libraryThe AlphaTcl library contains several subdirectories: ''Tcl, Examples, Help, Tools'' (and sometimes also Developer). The location of the AlphaTcl library depends on which version of Alpha you are running. Older versions (like 8.0.1, 8.0.2) installed these subdirectories at the same level as the executable itself, like for instance:
--- 8.0.2
|--- AlphaX.app
|--- Cache
|--- Developer
|--- Examples
|--- Help
|--- Tcl
|--- Tclextensions
|--- Tools
More recent versions of AlphaX store the AlphaTcl library inside the application's bundle. To open up the bundle, select the application in the Finder and execute a control-click on its icon: this displays a contextual menu in which you select the Open Package command. The library is in Contents/Resources/Scripts. For instance
--- Contents
|--- Resources
|--- Scripts
|--- AlphaTcl
|--- Examples
|--- Help
|--- Tcl
|--- Tclextensions
|--- Tools
Exporting the libraryExporting means extracting a clean tree of the AlphaTcl source files, without any Subversion administrative files containing the data related to version control. This is meant for users who just want a fresh copy of the files and do not need to place them under version control. First change directory to the folder where you want the export to be executed, then execute the svn export command. For instance, if the library is located inside the application bundle:
cd /Applications/AlphaX.app/Contents/Resources/Scripts
svn export https://alphatcl.svn.sourceforge.net/svnroot/alphatcl/trunk AlphaTcl
This last command will extract the code from the main branch of the repository (aka the trunk). In order to export a particular branch, for instance the branch-8_2a1d branch, use the following command:
cd /Applications/AlphaX.app/Contents/Resources/Scripts
svn export https://alphatcl.svn.sourceforge.net/svnroot/alphatcl/branches/branch-8_2a1d AlphaTcl
The branch-8_2a1d branch contains the AlphaTcl library going with the AlphaX 8.2 binary (under development). Checking out the libraryChecking out means extracting a clean tree of the AlphaTcl source files, with all the Subversion administrative files containing the data related to version control. This is meant for developers who make modifications in the AlphaTcl library and want the files to be under Subversion control. First change directory to the folder where you want the export to be executed, then execute the svn checkout command. Extracting the trunk
cd /Applications/AlphaX.app/Contents/Resources/Scripts
svn checkout https://alphatcl.svn.sourceforge.net/svnroot/alphatcl/trunk AlphaTcl
Extracting a branch
cd /Applications/AlphaX.app/Contents/Resources/Scripts
svn checkout https://alphatcl.svn.sourceforge.net/svnroot/alphatcl/branches/branch-8_2a1d AlphaTcl
You only have to execute a checkout once: next time you want to retrieve the most recent modifications, you will use the update command instead, as explained in the next section. The file tree retrieved via the checkout command is usually called the working copy. Updating the libraryThe update retrieves only the files which have been modified in the repository since the last checkout. The AlphaTcl library must be under SVN control which means that the svn checkout command has already been executed once. Change directory to where your working copy has been extracted and just execute the following command:
cd /Applications/AlphaX.app/Contents/Resources/Scripts/AlphaTcl
svn update
You do not have to specify the URL of the repository or the branch: this information is contained in the invisible administrative files which were created during the checkout. Commit a fileYou must have write permission on the repository in order to commit modifications you made in a file. Change directory to where your file is located and then execute the following command with an appropriate message:
svn commit -m "some appropriate message"
This command will commit all the files modified in the folder where you are positioned and in any subfolder. In order to commit only one particular file, add it at the end of the previous command:
svn commit -m "some appropriate message" theFile
A relative path is relative to the current working directory. For instance, if you modified /Applications/Alpha/Tcl/Menus/colorsMenu.tcl, the following commands are equivalent:
cd /Applications/Alpha
svn commit -m "some appropriate message" Tcl/Menus/colorsMenu.tcl
or
cd /Applications/Alpha/Tcl/Menus/
svn commit -m "some appropriate message" colorsMenu.tcl
The -m option is required: you must type a message with every commit command. Add a fileAdding a file is a two-step process:
For instance:
cd /Applications/Alpha/Tcl/Menus/
svn add myNewMenu.tcl
svn commit -m "added new menu" myNewMenu.tcl
You do not have to specify the -m option with svn add. Delete a fileAdding a file is a three-step process:
For instance:
cd /Applications/Alpha/Tcl/Menus/
rm theObsoleteFile
svn delete theObsoleteFile
svn commit -m "removed obsolete file" theObsoleteFile
You do not have to specify the -m option with svn delete. Alpha interfaceA much easier way to upgrade the AlphaTcl library is to use the AlphaTcl SVN submenu of the Alpha Developer menu. It contains menu items which let you perform the export, checkout, update and commit commands in a single mouse click, without worrying about the destination folder or typing command lines. See the Updating AlphaTcl page on this wiki for more information. (add your comments here...) Last updated 2007-10-29 19:09:20 |
|
Edit -
History -
Print -
Recent Changes -
Search
Page last modified on October 29, 2007, at 07:51 PM
|
Hosted on
|