360 likes | 498 Views
PxPlus Version Control System Using TortoiseSVN Presented by: Jane Raymond. Presentation Outline. Overview of Source Control Basic installation and setup Checking in an application first time Checking out an application first time Making changes to programs/panels Committing changes
E N D
PxPlus Version Control System Using TortoiseSVN Presented by: Jane Raymond
Presentation Outline Overview of Source Control Basic installation and setup Checking in an application first time Checking out an application first time Making changes to programs/panels Committing changes Additions and Deletions Applying updates from other users SVN Command Line Program
Overview Program code/panels/data files/resource files maintained in a central repository Each programmer maintains their own copy – their ‘sandbox’ The programmer make changes in their sandbox Once they are happy with changes they commit them System merges changes made by other users Conflicts are reported to the programmer who must correct Leaves actual conflict resolution up to the programmer All changes are tracked by when, by whom, and why Tools allow for the rollback/comparisons of versions
Initial Setup TortoiseSVN is a Subversion Windows client Install TortoiseSVN on your Windows client Available on-line at http://tortoisesvn.net
Initial Setup TortoiseSVN interfaces through Windows Explorer right-click menu
Initial Setup Next you need to create a repository This is a database where the versions will reside It keeps all the source and updates safe Once created make sure you back it up You may also assign permissions
Initial Setup Create the repository Unix/Linux uses the svnadmin command to create You can use SSH to interact with the repository Alternatively use svnserve as a background daemon TortoiseSVN allows you to create one on Windows For the demo we will use a Windows repository
Overview of Source Control Initial check in of application Initial check-in Application Directory Tokenized Programs Screen libraries Datafiles Other files
Initial check-in Overview of Source Control Initial check in of application Extract to text Application Directory Tokenized Programs Screen libraries Datafiles Other files Source DirectorySandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files
Initial check-in Overview of Source Control Initial check in of application Extract to text Application Directory Tokenized Programs Screen libraries Datafiles Other files Source Directorysandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files
Initial check-in Overview of Source Control Initial check in of application Extract to text Import to Repository Application Directory Tokenized Programs Screen libraries Datafiles Other files Source Directorysandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files
Initial check-in Overview of Source Control Initial check in of application Extract to text Application Directory Tokenized Programs Screen libraries Datafiles Other files Source DirectorySandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files
Initial check-in Overview of Source Control Initial check in of application Extract to text Import to Repository Application Directory Tokenized Programs Screen libraries Datafiles Other files Source DirectorySandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files Repository Database with programs, panels, and data file changes along with version information
Initial check-in Overview of Source Control Initial check in of application Extract to text Import to Repository Application Directory Tokenized Programs Screen libraries Datafiles Other files Source Directorysandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files Repository Database with programs, panels, and data file changes along with version information
Initial check-in Overview of Source Control Initial check in of application Extract to text Import to Repository Application Directory Tokenized Programs Screen libraries Datafiles Other files Source DirectorySandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files Repository Database with programs, panels, and data file changes along with version information
Developer checkout Overview of Source Control For each developer to get their copy Repository Database with programs, panels, and data file changes along with version information
Developer checkout Overview of Source Control For each developer to get their copy Checkout from the repository Repository Database with programs, panels, and data file changes along with version information Source DirectorySandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files
Developer checkout Overview of Source Control For each developer to get their copy Checkout from the repository Repository Database with programs, panels, and data file changes along with version information Source Directorysandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files
Developer checkout Overview of Source Control For each developer to get their copy Checkout from the repository Repository Database with programs, panels, and data file changes along with version information Source Directorysandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files
Developer checkout Overview of Source Control For each developer to get their copy Checkout from the repository Repository Database with programs, panels, and data file changes along with version information Source Directorysandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files
Developer checkout Overview of Source Control For each developer to get their copy Checkout from the repository Repository Database with programs, panels, and data file changes along with version information Source DirectorySandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files
Developer checkout Overview of Source Control For each developer to get their copy Checkout from the repository Update application directory Repository Database with programs, panels, and data file changes along with version information Source DirectorySandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files Application Directory Tokenized Programs Screen libraries Datafiles Other files
Developer checkout Overview of Source Control For each developer to get their copy Checkout from the repository Update application directory Repository Database with programs, panels, and data file changes along with version information Source Directorysandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files Application Directory Tokenized Programs Screen libraries Datafiles Other files
Developer checkout Overview of Source Control For each developer to get their copy Checkout from the repository Update application directory Repository Database with programs, panels, and data file changes along with version information Source Directorysandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files Application Directory Tokenized Programs Screen libraries Datafiles Other files
Developer checkout Overview of Source Control For each developer to get their copy Checkout from the repository Update application directory Repository Database with programs, panels, and data file changes along with version information Source DirectorySandbox Text Programs Screen directories with text panels Datafiles Other files SVN control files Application Directory Tokenized Programs Screen libraries Datafiles Other files
Case Considerations • Incompatible case settings can make a diff in your repository • Parameters and IT settings affect how programs are saved • ‘MC’, ‘LC’, ‘LD’, ‘NL’, etc. • ‘V+’ parameter controls how the text programs are saved into the source directory • Value is a mask consisting of: 0 - Source will use lower case variables and directives and suppress LET (default) 1 - Source will use upper case variables and directives and suppress LET 2 - Source will use the 'LD', 'LC' and 'NL' parameters in effect +4 - Adding 4 to the value of 0, 1 or 2 will force the format of a SAVE to a serial file to match that of a standard SAVE. • ‘MC’=1 will override the case settings for variables
Making changes Program changes are automatically tracked PxPlus SAVE command checks for .pluscvs link The .pluscvs file points from ‘application’ to ‘sandbox’ Programs automatically converted to text and copied to sandbox NOMADS designer also updates sandbox Panels and library settings updated All other files you refresh to sandbox manually The SVN REFRESH command can update existing file/directory SVN REFRESHALL updates existing directory and sub-directories Includes resource files (data files, images, config files, etc.)
Making changes TortoiseSVN tracks source sandbox directories in Windows Explorer Directories and files in source sandbox are marked with special icons indicating their status Current, changed, added, ignored, etc. Right-click to access TortoiseSVN menu
Committing Changes When tested and working you should commit Windows Explorer will show what was changed Use the SVN COMMIT or SVN UCOMMIT commands Also commit from PxPlus Utility Menu, IT, or TortoiseSVN menu UCOMMIT refreshes existing file/directory before committing Repository only as good as the programmers using it Only check in working/workable programs People hate checking out broken logic ALWAYScomment your changes
Additions and Deletions • Adding new programs, panel libraries, files, and directories • Use SVN ADD command line program • Updates source directory and adds & commits to the repository • Deleting programs, files, directories • Two part process: • Delete from the source using TortoiseSVN menu • Commit the parent directory • File or sub-directory is removed from repository. • Application directory is updated.
Applying updates Check for updates regularly Issue an SVN UPDATE to get updates System will check with repository and merge changes Correct any conflicts that are reported Conflicts will be tagged in source Integrated Toolkit provides Auto-update Will check with server whenever loading a program Helps to assure you are working on current source
SVN Command Line • PxPlus/TSVN integrated tasks: • setup • import • checkout • add • commit • ucommit • update • revert • PxPlus-specific tasks: • extract • refresh • refreshall • appupdate • register • target • (No option) • help • SVN Command Line options:
Version Control Enhancements Version 10 Features • Improved error handling • Extract / Update summary screens • SVN UCOMMIT option • Bug fixes
Tools Tortoise SVN provides numerous logs/tools Who changed what, when, and why Blame list Line-by-line who changed which line of code Recall of prior version Other good tools to invest in Get a good compare program such Araxis, Ultra-compare, Windiff Web based project management / bug-tracking tools We are using Redmine for issues tracking
Documentation • Documentation available at: • http://wiki.pvxplus.com General Topics PxPlus Version Control Using TortoiseSVN • For information on TortoiseSVN visit: • http://tortoisesvn.net
Thank you The End