WorkBench-1.8.2/ 000755 000765 000024 00000000000 13221441402 013657 5 ustar 00barry staff 000000 000000 WorkBench-1.8.2/INSTALL.html 000644 000765 000024 00000002754 12204114361 015664 0 ustar 00barry staff 000000 000000
Note: These steps are only necessary if you checked out the sources from the pysvn subversion repository. The Source kits have already had these steps run.
In the Source
folder:
python make_wb_version.py python make_wb_images.py
In the Source
folder:
python wb_main.py
Check the output from wb_main.py. You can prevent wb_main.py redirecting stdout by running as:
python wb_main.py --noredirect
Windows does not have a usable stdout instead look in "%TEMP%\workbench.tmp" for Python messages and errors.
WorkBench-1.8.2/configure 000755 000765 000024 00000001211 12566356017 015603 0 ustar 00barry staff 000000 000000 #!/bin/bash echo "Info: configure called with: $*" case $( uname -s ) in Darwin) echo "Use Mac application" exit 1 ;; Linux) CPE=$(cat /etc/system-release-cpe) case "$CPE" in cpe:/o:fedoraproject:fedora:*) echo "Info: Configuring for Fedora Linux system" rm -f Makefile ln -s Source/linux-rpmbuild.mak Makefile ;; *) echo "Error: no support for $CPE system. Please add support and contribute a patch to pysvn." exit 1 ;; esac ;; *) echo "Error: Unknown system $(uname -s). Please add support and contribute a patch to pysvn." exit 1 ;; esac WorkBench-1.8.2/Source/ 000755 000765 000024 00000000000 13221441402 015117 5 ustar 00barry staff 000000 000000 WorkBench-1.8.2/Tests/ 000755 000765 000024 00000000000 13221441402 014761 5 ustar 00barry staff 000000 000000 WorkBench-1.8.2/Kit/ 000755 000765 000024 00000000000 13221441402 014406 5 ustar 00barry staff 000000 000000 WorkBench-1.8.2/Docs/ 000755 000765 000024 00000000000 13221441402 014547 5 ustar 00barry staff 000000 000000 WorkBench-1.8.2/LICENSE.txt 000644 000765 000024 00000004315 11724430522 015514 0 ustar 00barry staff 000000 000000 ================================================================= Copyright (C) 2003-2012 Barry A. Scott. All rights reserved. ================================================================= The Apache Software License, Version 1.1 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. 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. 3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: "This product includes software developed by Barry A. Scott http://www.barrys-emacs.org." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. 4. The names "PySVN" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact barry@barrys-emacs.org. 5. Products derived from this software may not be called "PySVN", nor may "PySVN" appear in their name, without prior written permission of Barry Scott. THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS 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. ================================================================= WorkBench-1.8.2/Import/ 000755 000765 000024 00000000000 13221441402 015131 5 ustar 00barry staff 000000 000000 WorkBench-1.8.2/Builder/ 000755 000765 000024 00000000000 13221441402 015245 5 ustar 00barry staff 000000 000000 WorkBench-1.8.2/Builder/brand_version.py 000755 000765 000024 00000002730 13070503173 020465 0 ustar 00barry staff 000000 000000 import sys import os import re def main( argv ): version_details = argv[1] input_filename = argv[2] output_filename = input_filename[:-len('.template')] # create dictionary of branding strings branding_info = {} for line in open( version_details ): line = line.strip() if len(line) == 0: continue if line.startswith( '#' ): continue key, value = [s.strip() for s in line.split('=',1)] branding_info[ key ] = value if branding_info['BUILD'] == 'devel': wc_svnversion = os.environ.get( 'WC_SVNVERSION', 'svnversion' ) exported_from = os.environ.get( 'PYSVN_EXPORTED_FROM', '..' ) build_revision = os.popen( '%s -c "%s" 2>&1' % (wc_svnversion, exported_from), 'r' ).read().strip() # build_revision is either a range nnn:mmm or mmm # we only want the mmm build_revision = build_revision.split(':')[-1] else: build_revision = branding_info['BUILD'] print 'Info: revision %s' % build_revision revision, modifiers = re.compile( '(\d+)(.*)' ).search( build_revision ).groups() if modifiers: branding_info['BUILD'] = '0' else: branding_info['BUILD'] = revision # read all the input text text = open( input_filename, 'r' ).read() # and write of a branded version open( output_filename, 'w' ).write( text % branding_info ) return 0 if __name__ == '__main__': sys.exit( main( sys.argv ) ) WorkBench-1.8.2/Builder/version.info 000644 000765 000024 00000000044 13072422411 017610 0 ustar 00barry staff 000000 000000 MAJOR=1 MINOR=8 PATCH=2 BUILD=devel WorkBench-1.8.2/Builder/win32.mak 000644 000765 000024 00000000436 10016223602 016703 0 ustar 00barry staff 000000 000000 build: all test kit all: cd ..\Source && $(MAKE) -f win32.mak all clean: cd ..\Source && $(MAKE) -f win32.mak clean cd ..\kit\Win32 && $(MAKE) -f win32.mak clean kit: cd ..\kit\Win32 && $(MAKE) -f win32.mak all install: ..\kit\Win32\tmp\output\setup.exe test: WorkBench-1.8.2/Builder/linux.mak 000644 000765 000024 00000001261 11471243125 017105 0 ustar 00barry staff 000000 000000 build: all kit all: workbench workbench: meinc_installer cd ../Source && $(MAKE) -f linux.mak build_bin # build the launcher # but get ride of the config.dat that is created as it # prevent correct creation of a usable config.dat meinc_installer: cd ../Import/MEINC_Installer/source/linux && $(PYTHON) Make.py && $(MAKE) && rm -f ../../config.dat clean: find .. -name '*.pyc' -exec rm {} ';' cd ../Source && $(MAKE) -f linux.mak clean cd ../Kit/Linux && rm -rf tmp cd ../Import/MEINC_Installer/source/linux && $(MAKE) clean rm -f ../Import/MEINC_Installer/support/run* rm -f ../Import/MEINC_Installer/config.dat kit: cd ../Kit/Linux && $(PYTHON) make_rpm.py install: test: WorkBench-1.8.2/Builder/builder_custom_init.cmd 000644 000765 000024 00000003126 12701741704 022011 0 ustar 00barry staff 000000 000000 rem rem builder_custom_init.cmd rem if "%BUILDER_TOP_DIR%" == "" ( echo Error: BUILDER_TOP_DIR is not set exit /b 1 ) if not "%1" == "" set PYTHON_VER=%1 if "%PYTHON_VER%" == "" set PYTHON_VER=2.7 if not "%2" == "" set SVN_VER_MAJ_MIN=%2 if "%SVN_VER_MAJ_MIN%" == "" set /p SVN_VER_MAJ_MIN="Build against Subversion Version [maj.min]: " if "%SVN_VER_MAJ_MIN%" == "" goto :eof rem python2 does not work with cp65001 chcp 1252 rem Save CWD pushd . pushd ..\..\ReleaseEngineering\Windows call ..\..\ReleaseEngineering\Windows\build-config.cmd %PYTHON_VER% %SVN_VER_MAJ_MIN% win32 popd echo Info: In release engineering build mode TARGET %TARGET% set PYSVN_PYTHONPATH=%TARGET%\py-%PYTHON_VER%-pysvn\Source set PYTHONPATH=%TARGET%\py-%PYTHON_VER%-pysvn\Source;%BUILDER_TOP_DIR%\Source echo PYTHONPATH %PYTHONPATH% set MEINC_INSTALLER_DIR=%BUILDER_TOP_DIR%\Import\MEINC_Installer-%MEINC_INSTALLER_VER%-py%PYTHON_VER:.=%-win32 set INCLUDE=%MEINC_INSTALLER_DIR%;%INCLUDE% rem PATH rem must have %PYTHON% on the path as meinc installer uses the path to find python rem rem gettext etc from http://mlocati.github.io/gettext-iconv-windows/ rem installed into "c:\Program Files\gettext-iconv" rem rem the DLLs for the SVN we are building againstmust be on the path to allow rem the svn_version to be determined for /d %%X in (%PYTHON%) do PATH %%~dpX;c:\Program Files\gettext-iconv;%SVN_BIN%;%PATH% %PYTHON% -c "import sys;print 'Info: Python Version',sys.version" %PYTHON% -c "import pysvn;print 'Info: pysvn Version',pysvn.version,'svn version',pysvn.svn_version" popd WorkBench-1.8.2/Builder/builder_custom_init.sh 000755 000765 000024 00000002320 12575044130 021654 0 ustar 00barry staff 000000 000000 #!/bin/echo Usage: . $0 # default to highest version we can find if no value in $1 and $2 if [ ! -z "$1" ] then PREF_VER=$1.$2 else if [ "$(uname)" = "Darwin" ] then # default to 2.3 on Mac OS X PREF_VER=2.7 else PREF_VER= fi fi for PY_VER in ${PREF_VER} 2.7 do # used in pick python to use in Builder driver makefile export PYTHON=$( which python${PY_VER} ) if [ -e "${PYTHON}" ] then PYSVN_PY_VER=${PY_VER%.*}${PY_VER#*.} break fi done unset PREF_VER if [ "$WC_SVNVERSION" = "" ] then export WC_SVNVERSION=svnversion fi export MEINC_INSTALLER_DIR=${BUILDER_TOP_DIR}/Import/MEINC_Installer for _DIR in ${BUILDER_TOP_DIR}/../Extension/Source ${TARGET}/py${PYSVN_PY_VER}_pysvn_python_org/Source do if [ -e "${_DIR}" ] then export PYTHONPATH=$(cd ${_DIR};pwd) export PYSVNLIB=$(cd ${_DIR};pwd) fi done unset _DIR echo "Info: PYTHON ${PYTHON}" ${PYTHON} -c "import sys;print 'Info: Python Version %r' % sys.version" ${PYTHON} -c "import pysvn;print 'Info: pysvn module',pysvn" ${PYTHON} -c "import pysvn;print 'Info: pysvn Version',pysvn.version" ${PYTHON} -c "import pysvn;print 'Info: svn version',pysvn.svn_version" WorkBench-1.8.2/Builder/copy-meinc-installer.cmd 000644 000765 000024 00000000331 10543315465 022002 0 ustar 00barry staff 000000 000000 xcopy L:\wc\MEINC_Installer\Installer\* /s /e L:\wc\pysvn\trunk\pysvn\WorkBench\Import\MEINC_Installer /y /q xcopy L:\wc\MEINC_Installer\Common\* /s /e L:\wc\pysvn\trunk\pysvn\WorkBench\Import\MEINC_Installer /y /q WorkBench-1.8.2/Builder/make-devel-rpm-build.sh 000755 000765 000024 00000000111 12672507512 021516 0 ustar 00barry staff 000000 000000 #!/bin/bash cd ${BUILDER_TOP_DIR}/Kit/Linux ./make-devel-src-rpm.sh "$@" WorkBench-1.8.2/Builder/macosx.mak 000644 000765 000024 00000000234 12070136002 017226 0 ustar 00barry staff 000000 000000 build: cd ../Source && make -f macosx.mak all cd ../Kit/MacOSX && ./build.sh clean: cd ../Source && make -f macosx.mak clean rm -rf ../Kit/MacOSX/tmp WorkBench-1.8.2/Docs/WorkBench_files/ 000755 000765 000024 00000000000 13221441402 017613 5 ustar 00barry staff 000000 000000 WorkBench-1.8.2/Docs/WorkBench.html 000644 000765 000024 00000077454 12615677152 017363 0 ustar 00barry staff 000000 000000WorkBench requires you to create a Project for each of the subversion working copy that you wish to work on.
From the Project menu select Add... to start the Add Project Wizard.
After the Add project wizard has setup a new project for you checkout the sources.
Select the project on the tree control and then select the menu Actions Checkout.
The Action menu will list all the commands that apply to the selected item in the tree control or the list control. You can also Right-Click (Ctrl-Click on the Mac) to get a pop-up menu.
The WorkBench windows is split into three main areas. The top area is like a file and folder explorer.
Use the left hand tree control to change between projects and folders and use the right hand list control to work with files. You can change the information shown using the View menu. The number of columns and order of columns in the list can be changed in the Preferences.
The bottom panel is used to show messages. In the example below the result of an Update.
Use the toolbar to access frequently used commands.
The status bar will show the progress of long running operations like checkin and update commands.
The filename filter is used to focus in on a few files. Choose Name to filter on filenames and choose Author to filter on author's name. Type a part of the name into the text box to show only files that contain what you type in the name.
Click the X button to clear the filter string and show all files.
WorkBench can optionally add the names of TAGs to the history command output.
Note: WorkBench uses the revision of the TAG to work out where in the history list the TAG should be shown. This works very well if TAGs are created from the HEAD of trunk.
All of the menu items in WorkBench are described below. Click on the menu item to scroll to its description.
File | Edit | View | Actions | Reports | Bookmarks | Project | Help |
Enter the path to the editor program you want to use in the "Editor:" text box. The Browse button pops up a file picker dialog to help locate the editor program.
Any command line arguments can be entered in the "Editor Arguments:" text box.
Choose the "Terminal Program" you wish to use for the Command Shell command. The available choices depend on your operating system:
The optional "Terminal Init Command" will be run each time a new Command Shell is created.
Choose the "File Browser Program" you wish to use for the File Browser command. The available choices depend on your operating system:
The list on the right shows the columns that will be shown. The list on the left shows the available columns.
Use the "Include -->" and "<-- Exclude" buttons to include and exclude the selected column.Select a column name then use the "Move Up" and "Move Down" buttons to rearrange the order of the columns in the right hand list.
The width of each column can be set by selecting the column name in the right hand list and then type the width, in characters, into the text box in the middle and press ENTER to complete the change.
Quit WorkBench
Using the Copy, Cut and Paste commands you can copy or move files and folders. Normally subversion will not allow you to copy of move Added or Modified files, but WorkBench does know how to correctly copy and move Added and Modified files.
Copy the selected folder or files in prepation for using paste to make a copy.
Cut the selected folder or files in prepation for using paste to move the files.
Select a destination folder and use paste to copy files that where selected with the Copy command. If you paste a file into a folder that already has a file with the same name you will be prompted for a new name to use.
Select a destination folder and use paste to move files that where selected with the Cut command. If you paste a file into a folder that already has a file with the same name you will be prompted for a new name to use.
Clear the log messages windows.
Show Controlled files, files that are under the control of subversion, in the list panel.
Show Uncontrolled files, files that are not under the control of subversion, in the list panel.
Show Ignored files, files that subversion noramally ignores, in the list panel. Ignored files are configured in the subversion config file.
Show files in sub-folders as well as the currently selected folder.
Warning: It can take a long time for WorkBench to get all the information about a large number of files from Subversion.
Refresh the tree and list panels with the current state of files.
Normally WorkBench will automatically refresh the tree and list panels. Turn off automatic refresh if you find that refreshing is very slow. This can happen if you have a large number of shown in the list panel.
Start a command shell which has the selected folder as its current working directory.
The Preferences allow you to customise how the Command Shell command works.
Start a file browser at the selected folder.
The Preferences allow you to customise how the File Browser command works.
Edit the selected file using the editor configured in the Preferences.
Open the selected file using the stanard operating system method (Windows and Mac OS X only).
Show the differences between the selected files and the checked out BASE version. In other words show the work you have done.
The differences windows shows changed lines and changes within a line.
By default the diff window has collapsed the folds to hide unmodified text.
Use the + and - buttons to toggle the collapsing.
The a.b button toggles the showing of white-space. Useful when looking for changes in TAB and SPACE characters.
The up and down arrow buttons move you backwards and forwards through each change in the diff window.
Show the differences between the selected files and the current version in the repository. In other words show the work other people have checked in against your version.
Show the differences between the selected files and their versions at the point this branch was made.
In other words show the work that has been done in this branch.
An error message is displayed if the active project is not associated with a branch.
Show the differences between the selected files and their latest versions in the main line of development this branch was copied from.
An error message is displayed if the active project is not associated with a branch.
The Conflict menu items help you work with a file has conflicts between your edits and the version updated from the repository.
Diff between the Old version of the file and your current working copy version.
Diff between your current working copy version and the New version of the file.
Diff between the Old version of the file and the New version of the file.
Tell Subversion that you have resolved the conflict.
Show an annotated listing of the selected file showing the origin of each line in the file. For each line the author, date and revision is listed.
Use this command to discover when a line of interest was introduced into a file.
List the log history of the selected files or folder. You can choose to show all the log messages, the last few messages or the messages since a particular date.
The Log History window shows an abbreviated listing of all the log messages. Select a log message to display the full log message and the changed paths.
By selecting a single revision you can click the Diff button to view the differences between your copy of the file and the choosen revision.
By selecting two revisions you can click the Diff button to view the differences between the pair of selected revisitions.
Show information about the selected files or folder. The information about the entry, any lock held and working copy details.
Show the Subversion properties of the selected files or folder.
In the dialog box you can change the properties. The known Subversion properties are all listed and any user defined. Change the check boxes to add or remove a property. Fill in the bottom pair of text boxes to define your own property and value.
In the example above a user defined proptery named "foo" has been added with the value "bar".
Update the selected files or folder from the Subversion repository. The update will proceed in the background allowing you to do something else in Work Bench.
The status bar will show the progress of the update.
Checkout files and folders from the repository to populate the working copy.
Search the selected files or folder for changes to checkin and display the results in a Checkin Window.
This is the same Checkin window is described that the Report Changes command creates.
Take out a lock against the selected files. The dialog box allows a lock comment to be entered. If the lock is already held by another user and you wish to override the other users lock check the Force option.
Revoke a lock against the selected files. The dialog box allows you to confirm that you wish to unlock the file. You can unlock a file that is locked by another user by checking the Force option.
Pop up a dialog that allows you to name a new file and choose a template to initialised it from.
The new file is scheduler for addition to the repository.
Pop up a dialog that allows you to name a new directory.
The new directory is scheduler for addition to the repository.
Schedule the selected files or folder to be added to the repository.
When adding a folder a dialog pops up that allows you to set the force option. Use force to override some of the checks Subversion makes and allow the addition to proceed.
The Rename command can work on controlled and uncontrolled files.
Pop up a dialog that allows you to change the name of the selected files and folders.
Work Bench can rename controlled files that have been added or modified.
The Delete command can work on controlled and uncontrolled files.
Uncontrolled files are deleted. Controlled files are scheduled for deletion for the repository.
A dialog pops up to confirm the deletion.
The Revert command allows you to undo additions and modification to files.
Added files are left as uncontrolled files. Edits to modified files are lost after a Revert.
A dialog pops up to confirm the revertion.
If Work Bench or a Subversion command did not complete it is possible to leave the working copy in a locked state (state L).
Use the Clean Up command to clean up the working copy, removing locks and resuming unfinished operations.
Create a tag of the current folder in the project's tags folder.
The tags folder can be configured via the Projects menu Update project... dialog.
Create a branch of the current folder in the project's branches folder.
The branches folder can be configured via the Projects menu Update project... dialog.
Search the selected Working Copy folder and all its sub-folders for locks and display any found in a new window.
The Working Copy Lock Report window allows you to Lock and Unlock the files as well as a set of other useful commands. Use the toolbar buttons or Context-Menu to access commands.
Search the selected folder and all its sub-folders in the repository for locks and display any found in a new window.
The Repository Lock Report window allows you to Lock and Unlock the files as well as a set of other useful commands. Use the toolbar buttons or Context-Menu to access commands.
Search the selected Working Copy folder and all its sub-folders for changes and display any found in a new window.
The Check in window allows you to Check in the changes found to the repository.
You can also use commands from this window like Diff, Properties, Annotate and Log History to confirm that the changes are as you expect and help you write a suitable log message.
Work Bench remembers the last log message you entered and can insert it for you when you click the Insert Last Message button.
Use the exclude button to exclude a file from being checked in. Use the include button to reverse an exclusion.
Search the selected folder and all its sub-folders in the repository for changes and display any found in a new window.
By using the exclude and include buttons you can update a subset of the available changes.
Creates a list of all changes in and below the current folder that were made in the current branch.
An error message is displayed if the active project is not associated with a branch or if no
changes were made to that branch in or below the current folder.
Add the currently selected folder to the book marks.
Use Bookmarks » Manage to edit the properties of the book marks.
Pop up a dialog that allows you to edit the properties of any bookmark.
The dialog lists the book marks in the same order that they will be displayed in the Bookmarks menu.
Select a book mark and click the Properties button to edit the properties.
You can change the name of the bookmark and put it into a folder (sub-menu).
Your book marks appear here at the bottom of the Bookmarks menu.
The Add Project wizard guides you to add an existing working copy to Work Bench or create a new working copy.
To use a existing working copy click the corresponding radio button and click Next.
Enter the path to the working copy. Use the Browse button to choose using a folder picker dialog.
The repository URL will be shown when you have entered the path to a working copy.
Click Next to proceed.
Enter the name that you want Work Bench to use for this project.
Click Finish to complete adding the project.
To create a new working copy click the corresponding radio button and click Next.
Enter the URL of the Subversion repository. The URL is typically publish by the Subversion repository administrators.
You may be prompted for any username and password required to access the repository.
Enter the path of the new working copy. Use the Browse button to choose using a folder picker dialog.
Click Next to proceed.
Enter the name that you want Work Bench to use for this project.
Click Finish to complete adding the project.
Pop up a dialog to confirm the deletion of the selected project.
This does not delete the working copy files, it only removes the project from Work Bench.
Pop up a dialog that shows the version of WorkBench, Subversion, wxPython and Python.
WorkBench-1.8.2/Docs/developer-guide.html 000644 000765 000024 00000015656 10404567254 020550 0 ustar 00barry staff 000000 000000This is the source of information for developers working on WorkBench.
The contents will be enhanced and extended based in feed back sent to dev@pysvn.tigris.org.
Workbench uses two threads.
The foreground thread operates the GUI and only fast operations should be performed in event handlers otherwise the responsiveness of the UI will suffer.
Slow operations are performed on a background thread. The background thread processes work that is added to a work queue.
No GUI operations are allowed to be performed on the background thread. This is because on some platforms the GUI will crash.
An event handler typcially needs to do some work on the foreground thread and some on the background thread.
Arranging to move between threads can involve a lot of code in the event handlers. However Workbench has greatly simplified the coding of event handlers by using using python generators.
The threading and event helper code is in wb_app.py and wb_background_thread.py.
To understand the code you will need to be familier with the __call__()
special
method, how to call a function with arbitary args and keywords and python generators
and the yield keyword.
Any event handler that needs access to the background thread is wrapped via the eventWrapper() function. An example from wb_frame.py:
wx.EVT_MENU( self, wb_ids.id_SP_History, self.app.eventWrapper( self.OnSpHistory ) )
The eventWrapper
function wraps the self.OnSpHistory
function
inside an EventScheduling
object.
Inside the event handler move to the background by:
yield self.app.backgroundProcess
And move to the foreground by:
yield self.app.foregroundProcess
The project_info object has two pysvn client objects, client_fg
for use on the foreground thread and client_bg
for use on the background thread.
You must use the client object that matches the thread the code is running on
otherwise pysvn will raise an exception that the it is already in use.
In this example from wb_subversion_list_handler_common.py
you can see
that the function yields to the background before calling annotate using the client_bg
object.
Then after annotate has completed the function yields to the foreground to do GUI operations,
creating the AnnotateFrame
.
Notice the use of the ok
variable that carries status until the
function is back in the foreground where it can react by calling appropiate GUI operations.
def Cmd_File_Annotate( self, all_rows ): for filename in [self.getFilename( row ) for row in all_rows]: self.app.setProgress( 'Annotating %(count)d', 0 ) self.app.setAction( 'Annotate %s...' % filename ) yield self.app.backgroundProcess ok = False try: annotation = self.project_info.client_bg.annotate( filename ) ok = True except pysvn.ClientError, e: self.app.log_client_error( e ) yield self.app.foregroundProcess if not ok: break h_frame = wb_subversion_annotate.AnnotateFrame( self.app, self.project_info, filename, annotation ) h_frame.Show( True ) self.app.clearProgress() self.app.setAction( 'Ready' )
If you wish to contribute code to WorkBench please keep the style inline with the existing code.
Element | Style | Example |
---|---|---|
module name | Lower case with underscore (_) to seperate words. | wb_app.py |
class | Camel case with initial uppercase letter. | class WbApp |
def | Camel case with initial lowercase letter. | def setAction(): |
variables | Lower case with underscore (_) to seperate words. | current_file = 'a.txt' |
plural variable names | Use the all_ prefix for plural variables, do not
append s , its to easy to confuse singluar with plural. |
all_files = [] |
Compare to None |
Always use is or is not to test a
for None . Use of == can trigger
unexpected calls to __eq__ and __cmp__ class methods. |
if status.entry is None: |
In the Sources
folder run one of the make files to create
the generated source files (wb_version.py and wb_images.py).
Unless you are trying to create binary images of WorkBench use:
make -f wb_common.mak wb_version.py wb_images.py
Now you can run WorkBench using one of the helper scripts.
Platform | Command |
---|---|
Windows | run_wb.cmd |
Unix | wb.sh |
Mac OS X | run_wb.sh |
WorkBench has a number of features to aid debugging: