Upload
dina-hines
View
215
Download
0
Tags:
Embed Size (px)
Citation preview
DireXions+ 2011 – Your Tool Box just got Bigger
PxPlus Version Control SystemUsing TortoiseSVN
Presented by:
Jane Raymond
DireXions+ 2011 – Your Tool Box just got Bigger
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
DireXions+ 2011 – Your Tool Box just got Bigger
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
DireXions+ 2011 – Your Tool Box just got Bigger
Initial Setup• TortoiseSVN is a Subversion Windows client• Install TortoiseSVN on your Windows client• Available on-line at http://tortoisesvn.net
DireXions+ 2011 – Your Tool Box just got Bigger
Initial Setup• TortoiseSVN
interfaces through Windows Explorer right-click menu
DireXions+ 2011 – Your Tool Box just got Bigger
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
DireXions+ 2011 – Your Tool Box just got Bigger
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
DireXions+ 2011 – Your Tool Box just got Bigger
• Overview of Source Control• Initial check in of application
Application DirectoryTokenized ProgramsScreen librariesData filesOther files
Initial check-in
DireXions+ 2011 – Your Tool Box just got Bigger
Initial check-in• Overview of Source Control• Initial check in of application
• Extract to text
Application DirectoryTokenized ProgramsScreen librariesData filesOther files
Source DirectorySandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
DireXions+ 2011 – Your Tool Box just got Bigger
Initial check-in• Overview of Source Control• Initial check in of application
• Extract to text
Application DirectoryTokenized ProgramsScreen librariesData filesOther files
Source DirectorysandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
DireXions+ 2011 – Your Tool Box just got Bigger
Initial check-in• Overview of Source Control• Initial check in of application
• Extract to text• Import to Repository
Application DirectoryTokenized ProgramsScreen librariesData filesOther files
Source DirectorysandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
DireXions+ 2011 – Your Tool Box just got Bigger
Initial check-in• Overview of Source Control• Initial check in of application
• Extract to text
Application DirectoryTokenized ProgramsScreen librariesData filesOther files
Source DirectorySandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
DireXions+ 2011 – Your Tool Box just got Bigger
Initial check-in• Overview of Source Control• Initial check in of application
• Extract to text• Import to Repository
Application DirectoryTokenized ProgramsScreen librariesData filesOther files
Source DirectorySandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
RepositoryDatabase with programs, panels, and data file changes along with version information
DireXions+ 2011 – Your Tool Box just got Bigger
Initial check-in• Overview of Source Control• Initial check in of application
• Extract to text• Import to Repository
Application DirectoryTokenized ProgramsScreen librariesData filesOther files
Source DirectorysandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
RepositoryDatabase with programs, panels, and data file changes along with version information
DireXions+ 2011 – Your Tool Box just got Bigger
Initial check-in• Overview of Source Control• Initial check in of application
• Extract to text• Import to Repository
Application DirectoryTokenized ProgramsScreen librariesData filesOther files
Source DirectorySandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
RepositoryDatabase with programs, panels, and data file changes along with version information
DireXions+ 2011 – Your Tool Box just got Bigger
Developer checkout• Overview of Source Control• For each developer to get their copy
RepositoryDatabase with programs, panels, and data file changes along with version information
DireXions+ 2011 – Your Tool Box just got Bigger
Developer checkout• Overview of Source Control• For each developer to get their copy
• Checkout from the repository
Source DirectorySandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
RepositoryDatabase with programs, panels, and data file changes along with version information
DireXions+ 2011 – Your Tool Box just got Bigger
RepositoryDatabase 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
Source DirectorysandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
DireXions+ 2011 – Your Tool Box just got Bigger
Developer checkout• Overview of Source Control• For each developer to get their copy
• Checkout from the repository
Source DirectorysandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
RepositoryDatabase with programs, panels, and data file changes along with version information
DireXions+ 2011 – Your Tool Box just got Bigger
Developer checkout• Overview of Source Control• For each developer to get their copy
• Checkout from the repository
Source DirectorysandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
RepositoryDatabase with programs, panels, and data file changes along with version information
DireXions+ 2011 – Your Tool Box just got Bigger
Developer checkout• Overview of Source Control• For each developer to get their copy
• Checkout from the repository
Source DirectorySandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
RepositoryDatabase with programs, panels, and data file changes along with version information
DireXions+ 2011 – Your Tool Box just got Bigger
Developer checkout• Overview of Source Control• For each developer to get their copy
• Checkout from the repository• Update application directory
Application DirectoryTokenized ProgramsScreen librariesData filesOther files
Source DirectorySandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
RepositoryDatabase with programs, panels, and data file changes along with version information
DireXions+ 2011 – Your Tool Box just got Bigger
Developer checkout• Overview of Source Control• For each developer to get their copy
• Checkout from the repository• Update application directory
Application DirectoryTokenized ProgramsScreen librariesData filesOther files
Source DirectorysandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
RepositoryDatabase with programs, panels, and data file changes along with version information
DireXions+ 2011 – Your Tool Box just got Bigger
Developer checkout• Overview of Source Control• For each developer to get their copy
• Checkout from the repository• Update application directory
Application DirectoryTokenized ProgramsScreen librariesData filesOther files
Source DirectorysandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
RepositoryDatabase with programs, panels, and data file changes along with version information
DireXions+ 2011 – Your Tool Box just got Bigger
Developer checkout• Overview of Source Control• For each developer to get their copy
• Checkout from the repository• Update application directory
Application DirectoryTokenized ProgramsScreen librariesData filesOther files
Source DirectorySandboxText ProgramsScreen directories with text panelsData filesOther filesSVN control files
RepositoryDatabase with programs, panels, and data file changes along with version information
DireXions+ 2011 – Your Tool Box just got Bigger
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 LET2 - 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
DireXions+ 2011 – Your Tool Box just got Bigger
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.)
DireXions+ 2011 – Your Tool Box just got Bigger
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
DireXions+ 2011 – Your Tool Box just got Bigger
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
• ALWAYS comment your changes
DireXions+ 2011 – Your Tool Box just got Bigger
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.
DireXions+ 2011 – Your Tool Box just got Bigger
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
DireXions+ 2011 – Your Tool Box just got Bigger
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:
DireXions+ 2011 – Your Tool Box just got Bigger
Version Control Enhancements
• Improved error handling• Extract / Update summary
screens• SVN UCOMMIT option• Bug fixes
Version 10
Features
DireXions+ 2011 – Your Tool Box just got Bigger
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
DireXions+ 2011 – Your Tool Box just got Bigger
Documentation• Documentation available at:
• http://wiki.pvxplus.comGeneral Topics
PxPlus Version Control Using TortoiseSVN
• For information on TortoiseSVN visit:• http://tortoisesvn.net