SALT and Version Control How to handle projects using version controlled SALT V1.09.

Slides:



Advertisements
Similar presentations
Packaging a Presentation on a CD, using PowerPoint 2003 Multimedia Services at The Citadel Updated
Advertisements

Intro to Version Control Have you ever …? Had an application crash and lose ALL of your work Made changes to a file for the worse and wished you could.
1. What is Subversion? Why do we need CM? Basic concepts Repositories Options Setup Clients Options Setup Operation Troubleshooting Slide 2.
 Use the Left and Right arrow keys or the Page Up and Page Down keys to move between the pages. You can also click on the pages to move forward.  To.
Version Control System (Sub)Version Control (SVN).
A Guide to Unix Using Linux Fourth Edition
MODULE 4 File and Folder Management. Creating file and folder A computer file is a resource for storing information, which is available to a computer.
The Windows Registry Adapted from
David Notkin Autumn 2009 CSE303 Lecture 22 Subversion is an open source version control system. Social Implications Friday version control system.
Microsoft Visual Source Safe 6.01 Microsoft Visual Source Safe (MVSS) Presented By: Rachel Espinoza.
1 CMPT 275 Software Engineering Revision Control.
Source Control Repositories for Enabling Team Working Svetlin Nakov Telerik Corporation
Systems Software Operating Systems.
Working with SharePoint Document Libraries. What are document libraries? Document libraries are collections of files that you can share with team members.
SubVersioN – the new Central Service at DESY by Marian Gawron.
Editing Java programs with the BlueJ IDE. Working environments to develop (= write) programs There are 2 ways to develop (write) computer programs: 1.Using.
Microsoft Office Illustrated Fundamentals Unit B: Understanding File Management.
Lesson 4 Computer Software
Version Control with Subversion. What is Version Control Good For? Maintaining project/file history - so you don’t have to worry about it Managing collaboration.
8 Copyright © 2004, Oracle. All rights reserved. Creating LOVs and Editors.
SALT and Version Control How to handle projects using version controlled SALT V1.06.
1 Chapter 2 & Chapter 4 §Browsers. 2 Terms §Software §Program §Application.
Chapter 18: Windows Server 2008 R2 and Active Directory Backup and Maintenance BAI617.
Version Control with Subversion Quick Reference of Subversion.
Chapter Three The UNIX Editors. 2 Lesson A The vi Editor.
Prepared by: Steve Teo Contributors: Tong Huu Khiem.
Object-Oriented Software Engineering Using UNIX groups and Subversion Estimated Time: minutes “Unix is user-friendly. It's just very selective about.
XP New Perspectives on Integrating Microsoft Office XP Tutorial 2 1 Integrating Microsoft Office XP Tutorial 2 – Integrating Word, Excel, and Access.
Microsoft Office 2008 for Mac – Illustrated Unit C: Understanding File Management.
Object-Oriented Analysis & Design Subversion. Contents  Configuration management  The repository  Versioning  Tags  Branches  Subversion 2.
Systems Software Operating Systems. What is software? Software is the term that we use for all the programs and data that we use with a computer system.
Copyright © 2015 – Curt Hill Version Control Systems Why use? What systems? What functions?
SENG 403 Tutorial 1 1SENG 403 – Winter Agenda Version Control Basics Subversion Basic actions in Subversion Some examples 2SENG 403 – Winter 2012.
DireXions – Your Tool Box just got Bigger PxPlus Version Control System Using TortoiseSVN Presented by: Jane Raymond.
Introduction to Derby. RHS – What is Derby…? Derby is a DBMS –Database –GUI for administration –GUI for data maintenance Best part; integrated.
Diagnostic Pathfinder for Instructors. Diagnostic Pathfinder Local File vs. Database Normal operations Expert operations Admin operations.
9/2/ CS171 -Math & Computer Science Department at Emory University.
XP New Perspectives on Windows 2000 Professional Windows 2000 Tutorial 2 1 Microsoft Windows 2000 Professional Tutorial 2 – Working With Files.
Utilities in Dyalog APL Dan Baronet Boston 2011 V1.00 0Dyalog’11 - BostonUtilities.
GumTree Development Environment Setup Windows Only Compatible with Eclipse 3.2 M3 (Last update: 16/11/05)
SALT and Version Control How to handle projects using version controlled SALT V1.07.
Prepared by: Steve Teo Contributors: Tong Huu Khiem.
Chapter Three The UNIX Editors.
WinCvs. WinCVS WinCvs is a window based version control system. Use WinCvs when  You want to save every version of your file you have ever created. CVS.
Copyright © Curt Hill Tortoise SVN A Subversion Client.
20081 Converting workspaces and using SALT & subversion to maintain them. V1.02.
1 MSTE Visual SourceSafe For more information, see:
Sabriansyah R.A Version Control. The Repository Subversion adalah sistem tersentralisasi untuk informasi sharing Repository adalah pusat penyimpanan data.
Oct SALT in Dyalog V1.17. Oct Introduction SALT is a Simple APL Library Toolkit It is a source code management system for Classes and script-based.
Oct SALT in Dyalog Doc v1.18. Oct Introduction SALT is a Simple APL Library Toolkit It is a source code management system for objects with.
Photoshop Actions Lights, Camera, Actions in Photoshop.
Version Control and SVN ECE 297. Why Do We Need Version Control?
1 CSE 303 Lecture 19 Version control and Subversion ( svn ) slides created by Marty Stepp
TEAM FOUNDATION VERSION CONTROL AN OVERVIEW AND WALKTHROUGH By: Michael Mallar.
Source Control Repositories for Enabling Team Working Doncho Minkov Telerik Corporation
McGraw-Hill/Irwin The Interactive Computing Series © 2002 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft Excel 2002 Using Macros Lesson.
© CGI Group Inc. User Guide Subversion client TortoiseSVN.
FILE I/O: Low-level 1. The Big Picture 2 Low-Level, cont. Some files are mixed format that are not readable by high- level functions such as xlsread()
Emdeon Office Batch Management Services This document provides detailed information on Batch Import Services and other Batch features.
Subversion Subversion is a brand of version control software that is frequently used to store the code and documentation of a project so as to permit.
Development Environment
Version Control with Subversion
SVN intro (review).
Guide To UNIX Using Linux Third Edition
Concurrent Version Control
Source Code Management
Electronics II Physics 3620 / 6620
Stata Basic Course Lab 2.
Microsoft Office Illustrated Fundamentals
Presentation transcript:

SALT and Version Control How to handle projects using version controlled SALT V1.09

Reasons for external storage Ever since large IT projects have been going on there has been a need to keep code out of the workspace and manage it. Whether the code is small or big. 2Sep 2009

Reasons for external storage Programs evolve and distributed copies should be kept separately, even if small 3Sep 2009

Reasons for external storage -More room needed in the workspace -Backup copies (security) -Modularize code -Code control -Trace history -Find culprits -Etc. 4Sep 2009

Managing applications Larger applications have to be maintained whether they are written in APL or not You have to keep track of changes to know who's done what and when You must be able to undo changes Generally cope with (large) system related problems 5Sep 2009

Managing applications Apps have been maintained using a combination of workspace and external storage Code DB workspace 6Sep 2009

How In APL: APL files (most common way) Other workspaces ([]CY) External DBs (e.g. Oracle) Etc. In other (e.g. compiled) languages Text files (distributed, e.g. file system) 7Sep 2009

The rest of the world APL stands out APL 8Sep 2009

Managing applications in APL This makes porting code or even sharing snippets of it difficult. -You cannot transport it -Hard to compare changes -You need the (proper) interpreter just to VIEW the code 9Sep 2009

Managing applications in APL -You need to maintain the code management system (CMS) itself -Employees need time to learn it -They go away with “useless” skills when they leave -The IT dptm sees APL as a problem, an outcast 10Sep 2009

Managing applications in APL There is another way: Unicode text files -You can transport them -You don’t need any interpreter to VIEW them -They integrate with any text file based control system 11Sep 2009

Managing applications in APL With existing text based CMS -You don’t need to write your own CMS -Employees may already know about it -They go away with useful skills -The IT department doesn’t see APL as a non team player 12Sep 2009

The rest of the world APL doesn’t have to stand out APL 13Sep 2009

Unicode With the wider acceptance of Unicode it has become easier to share code in text files. They can be reorganized e.g. Disk Explorer APL code can now be cut & pasted and viewed in Notepad or other Unicode compliant editor/program They can be exchanged easily 14Sep 2009

Dyalog V11 This version introduced the scripted form of classes/namespaces Their definitions, including functions in them, can be edited. 15Sep 2009

Dyalog V11 The definition of objects like classes can be retrieved and manipulated like the definition of functions And, like the ⎕ CR of a function, it can be stored outside the workspace, e.g. in a text (Unicode) file 16Sep 2009

Requirements All that is needed to store and retrieve text to any Operating System is a pair of functions to -Store code to a text file -Read a text file into the workspace Easy enough to do. 17Sep 2009

Requirements Of course, once you’ve done that you may want to: -Save multiple versions -Retrieve any of them -List them -Compare them -Etc. * Basically manage them * 18Sep 2009

Enter... 19Sep 2009

OK, so, what is SALT? 20Sep 2009

SALT SALT is exactly that: -A pair of functions to store/retrieve -+ other functions to list/compare/etc. -+ utility functions (e.g. ease migration of namespaces to text format) 21Sep 2009

SALT SALT stands for Simple APL Library Toolkit It is a source code management system for functions, Classes and script- based Namespaces in Dyalog APL. 22Sep 2009

Facts -SALT consists in a series of functions stored in ⎕ SE to manipulate the source ( ⎕ SRC & ⎕ CR) of objects. -The source code for each APL object is stored in a single Unicode text file with a file extension of “.dyalog”. -All functions take a string to do their work. -This string describes completely the arguments for the function 23Sep 2009

Commands SALT functions are monadic. They -Save classes in files -List files -Explore them -Load them -and more 24Sep 2009

SALT stores source in Unicode files whose extension is.dyalog by default.dyalog files are configured to be opened automatically with Notepad under Windows upon V11 installation Under Unix the naming of the files is case sensitive. Storage 25Sep 2009

Requirements There are NO special requirements (not even.Net) V11 is the minimum version SALT will run under SALT is packaged and comes in already available with APL 26Sep 2009

SALT basics SALT is tucked away in ⎕ SE - you can )LOAD and run any workspace anytime To save a namespace use Save: ⎕ SE.SALT.Save 'myns \path\myfile' To bring in a namespace use Load: ⎕ SE.SALT.Load '\path\myfile' 27Sep 2009

Features -The editor can be rigged to react on edition of SALTed objects -The user commands include all the SALT functions, e.g. ]save myns \path\myfile 28Sep 2009

Features SALT can save back a script on file right after it has been modified. After modification you are prompted to confirm saving over the present script file: Modify 29Sep 2009

Storing a script with a stack This can happen if you modify a function of a class on the stack. After modification you are prompted to confirm saving over the present script file. Once saved both the script and the class are modified and you can resume execution. Error happens Stack shows up Edit the function 30Sep 2009

Storing multiple version of a script You can store and KEEP several versions of a script. By using the –version modifier you tell SALT to start using version numbering: 31Sep 2009

Storing multiple version of a script Every time you modify a script SALT stores the definition in a new file: V0V1 32Sep 2009

=? Showing differences between versions SALT can show the difference between 2 versions of a script, either -natively, using APL, or -using a 3 rd party Unicode comparison program 33Sep 2009

=? Showing differences between versions If ‘APL’ is the method chosen to compare, the output will appear in the session like this: lines inserted lines modified → is used to denote inserted lines ← is used to denote deleted lines 34Sep 2009

SALT features SALT has many more features It is UNIX ready It comes with tools of its own It can be extended easily by adding your own utilities 35Sep 2009

SALT limitations For small applications it may be sufficient to keep all code on file managed by SALT For larger apps this is clearly inadequate, you need Version Control on a grander scale 36Sep 2009

What is Version Control (VC)? VC is a good way to ensure team members of a project don't step over each others' toes. On a large project it is imperative to use VC. Otherwise, time (and money) will be lost trying to recover from coordination problems.

Version Control overview You usually start by importing an existing system (a set of files) into a version control repository: repository original files import 38Sep 2009

Version Control overview The original files can then be forgotten: repository original files 39Sep 2009

Version Control overview You then checkout a subset to work with: repository subset checkout original files 40Sep 2009

Version Control overview You then work on the subset for a while: repository subset 41Sep 2009

Version Control overview If you are using SALT you maintain the files from APL: subset Dyalog APL 42Sep 2009

Version Control overview Every once in a while you update the repository: repository subset Checkin 43Sep 2009

Version Control overview When the repository is in a stable state you may produce a new release: repository new release export 44Sep 2009

VC systems There are several VC systems out there. To mention a few: PerForce, ClearCase, Visual SourceSafe, CVS and SubVersion. There are pros & cons for each. 45Sep 2009

VC systems In the following slides we'll use subversion as an example. subversion is a popular open source program. It is well documented, has a large user base and it's free. 46Sep 2009

Enter... 47Sep 2009

subversion subversion is a version control system for Unix and Windows. It is independent of any file system or file types to manage It is easy to install 48Sep 2009

subversion subversion comes in command line (shell) mode. Most commands involve a single program: svn. For ex: svn import... svn checkout... svn checkin... svn export... 49Sep 2009

subversion There are many more commands in subversion. They handle updates, conflicts, allow to see differences between versions. The complete list is extensive but well documented. 50Sep 2009

subversion There is also a GUI front-end for subversion. This front-end is completely separate but closely integrated to the GUI. It's name is TortoiseSVN. subversion is integrated. 51Sep 2009

subversion Different people prefer different things: Windows users may choose the GUI front-end for subversion. Unix users may prefer the shell environment APL users might prefer to stay in APL Either way the results will be the same: better coordination! 52Sep 2009

subversion: an example ROBOTS Assuming we have the following workspace named ROBOTS written in Dyalog: It has 2 top level namespaces in which there are 5 (nested) namespaces: -namespace Master: 2 namespaces -namespace Troopers: 3 namespaces 53Sep 2009

subversion: an example workspace Datagame PoundRobot1SDuck Troopers Master There are 7 namespaces, 5 of which are nested 54Sep 2009

subversion: an example We’ve seen the benefits of using text files for the namespaces: -easier to visualize the code -easier to maintain -easier to share -no need to have the interpreter to see it 55Sep 2009

subversion: an example ROBOTS We will create the following folder named \ROBOTS involving Dyalog scripts: It has 2 folders and 5 scripts: -folder Master: 2 scripts -folder Troopers: 3 scripts 56Sep 2009

subversion: an example To create \ROBOTS we only need to: use SALT's function to store the scripted namespaces to the \ROBOTS subfolders (or use the ]save UCMD) 57Sep 2009

subversion: an example For example: To create \ROBOTS\Troopers\Pound.dyalog all we need to do is ]Save Troopers.Pound \ROBOTS\Troopers\Pound -make –convert -makecreates the folder if necessary -convertconverts the namespace to []SRC form 58Sep 2009

subversion: an example You then do the other namespaces: ⎕ SE.SALT.Save 'Troopers.SDuck \ROBOTS\Troopers\SDuck -convert ' ]Save Troopers.Robot1 \ROBOTS\Troopers\Robot1 -convert 59Sep 2009

subversion: an example If everything in a namespace has to be SALTed you can do: ⎕ CS 'Troopers’ ⎕ SE.SALT.Snap '\ROBOTS\Troopers -convert -makedir' 60Sep 2009

subversion: an example Here is the final result in Explorer view: 61Sep 2009

subversion: an example And here is what 'Pound' looks like: 62Sep 2009

At this point we have 2 copies: -The copy in the workspace -The copy on file They are linked subversion: an example 63Sep 2009 Workspace.dyalog files

If we were to stop here (not use subversion) we could )SAVE the workspace and it would remember where everything (all the namespaces) is. But we need to move them first to a repository. Let’s carry on. subversion: an example 64Sep 2009

subversion: an example We first create a repository, here in \MyRepository: 65Sep 2009

We then import our system (ROBOTS) into it: subversion: an example MyRepository Robots import 66Sep 2009

Our system is now in the repository and can be checked out by anyone able to access it. This can be on the same machine or on the same network. It can also be across the internet with proper credentials. subversion: an example 67Sep 2009

The original source is no longer required. We can get rid of it (or back it up ) subversion: an example 68Sep 2009

Next we checkout a copy to work with. subversion: an example MyRepository aplscripts checkout Ro X ots We will put our working copy in \aplscripts: 69Sep 2009

If we want to preserve the original location we can check out the empty repository into it after which we add the new material: svnadmin create \repo svn co file:///repo C:\robots\troopersfile:///repo svn add C:\robots\troopers\* subversion: an example 70Sep 2009

We can now start working in APL. We have to make sure SALT is enabled: subversion: an example 71Sep 2009

We can now start working in APL. We can also state where the working folder is. Here we specify to use our \aplscripts folder: subversion: an example 72Sep 2009

Afterwards, when we start Dyalog, SALT should be there: subversion: an example 73Sep 2009

Our working directory should be set: subversion: an example 74Sep 2009

We can now bring in scripts: subversion: an example 75Sep 2009

And edit one of them: subversion: an example 76Sep 2009

And edit one of them (3 changes): subversion: an example 77Sep 2009

After editing we are prompted to replace: subversion: an example 78Sep 2009

We verify the changes have been made: TortoiseSVN : an example 79Sep 2009

We can see in explorer that all is there: subversion: an example 80Sep 2009

If the workspace is only used by one person at a time it can be saved with the links: )load ROBOTS )save (when finished editing) subversion: an example 81Sep 2009 ROBOTS.dyalog files

Restoring the original workspace If the workspace is out of sync and needs refreshing )LOAD ROBOTS And bring back the out of sync code, e.g.: )CS Troopers ]load Troopers/Pound )save 82Sep 2009

Restoring the original workspace If an attempt is made to use an out of sync object SALT will warn you of the fact and confirm your intentions before saving: 83Sep 2009

User Interactions They now look like this: workspace Pound Robot1 SDuck Troopers Data game Master \aplscripts 84Sep 2009

Many users Interactions They now look like this: User 1 working on Pound User 2 working on Robot1 workspace Pound Robot1 SDuck Troopers Data game Master workspace Pound Robot1 SDuck Troopers Data game Master 85Sep 2009

If the workspace is used by more than one person at a time it should reconstruct the links at load time: )load ROBOTS subversion: an example 86Sep 2009 Workspace.dyalog files

When we are happy with all the changes we can tell subversion to commit the changes we've made: subversion: an example MyRepository aplscripts Checkin 87Sep 2009

We keep making changes in APL... subversion: an example 88Sep 2009

... and committing until happy: subversion: an example 89Sep 2009

Finally, to produce a finished version we export to a folder we'll use to hold the entire project subversion: an example MyRepository RobotGame export 90Sep 2009

We can see in Explorer the new \RobotGame folder: subversion: an example 91Sep 2009

TortoiseSVN An integrated disk Explorer GUI front-end for subversion 92Sep 2009

TortoiseSVN: an example Using the same ROBOTS example: 93Sep 2009

TortoiseSVN: an example We first create an empty repository, here in \MyRepository: -right click on the folder wanted -TortoiseSVN -Create repository here... 94Sep 2009

Then we import our current system into it: TortoiseSVN: an example 95Sep 2009

Our system is now in the repository and can be checked out by anyone able to access it. This can be on the same machine or on the same network. It can also be across the internet with proper credentials. TortoiseSVN: an example 96Sep 2009

Next we checkout a copy to work with. We will put our working copy in \aplscripts: TortoiseSVN : an example 97Sep 2009

Start Dyalog, SALT should be there: TortoiseSVN: an example 98Sep 2009

Our working directory should be set: TortoiseSVN : an example 99Sep 2009

We can now bring in scripts: TortoiseSVN : an example 100Sep 2009

And edit one of them: TortoiseSVN : an example 101Sep 2009

And edit one of them: TortoiseSVN : an example 102Sep 2009

We verify the changes have been made: TortoiseSVN : an example 103Sep 2009

We can see in explorer that all is there: TortoiseSVN : an example 104Sep 2009

The files modified are marked using a special icon TortoiseSVN: an example 105Sep 2009

We can also ask to see the differences TortoiseSVN: an example 106Sep 2009

Here we are using the diff program: TortoiseSVN: an example 107Sep 2009

When happy we commit the changes TortoiseSVN: an example 108Sep 2009

We keep making changes in APL and committing until happy: TortoiseSVN: an example 109Sep 2009

Finally, to produce a finished version we export to a folder we'll use to hold the entire project TortoiseSVN: an example 3 110Sep 2009

We can see in Explorer the new \Army folder: TortoiseSVN : an example 111Sep 2009

Control Version environments Whatever environment suits best your needs there is another alternative. The APL alternative: drive svn from APL This presumes subversion is installed of course! 112Sep 2009

113Sep 2009

Spice This is a separate tool. It uses a special syntax to issue commands. To use it start statements with ], e.g. ]mycmd 114Sep 2009

Spice It creates an input area at the bottom of the screen to issue commands using SALT. Spice can be initialized directly from APL: 115Sep 2009

Spice In V12 use the options menu: 116Sep 2009

Spice Spice can also be started automatically by setting SALT registry key AddSPICE to ‘1’ 117Sep 2009

Spice Utilities To get a list of all available commands enter ‘]?’ in the session: 118Sep 2009

Spice SVN Utilities Some of those utilities relate to Version Control. They are grouped under svn: 119Sep 2009

Spice SVN Utilities Syntax is similar to the command line version Only the names have been changed (slightly) 120Sep 2009

Spice: an example Assuming we have the following project involving Dyalog scripts: 121Sep 2009

Spice: an example And suppose we have a repository here 122Sep 2009

Then we import our current system into it: Spice: an example 123Sep 2009

Our system is now in the repository and can be checked out by anyone able to access it. Spice: an example repository checkout subset checkout subset checkout 124Sep 2009

Next we checkout a copy to work with. We will put our working copy in \aplscripts: Spice : an example 125Sep 2009

svnco already sets up our working directory for us Spice : an example Confirmed by the settings command 126Sep 2009

We can now bring in scripts: Spice: an example 127Sep 2009

And edit one of them (3 changes): Spice: an example 128Sep 2009

After editing we are prompted to replace: Spice: an example 129Sep 2009

When we are happy with all the changes we can tell subversion to commit the changes we've made. Spice: an example 130Sep 2009

Real life examples SALT and An international APL code repository

The Project The entire SALT project is in a public repository. It is available at Another project for sharing code is under way. 132Sep 2009

The use of svn under Spice is just another possibility. The choice to use the shell commands, TortoiseSVN or Spice is a personal matter. What is important is to ensure proper synchronisation between team members and subversion provides just that. Conclusion 133Sep 2009

Wait, how do I use this? Subversion and TortoiseSVN are available from the Net. SALT/Spice come with Dyalog ready for use. You will find on your memory stick a presentation on how to port an APL application into SALT. 134Sep 2009