source control for scripts

Ambika S's picture
Ambika S asked on October 23, 2013 - 4:01pm | Replies (5).

Hi,What is a good source control tool for stand-alone scripts(shell, perl etc)? svn is at the project level,not file based.

1 Comment

Thanks Bob and Drew.

Normal
0

false
false
false

EN-US
X-NONE
X-NONE

/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman","serif";}

We are currently using CVS. So it’s convenient to request script changes because we do not have a single owner for scripts, any developer can touch and make changes .There are 100s of scripts and some scripts change frequently (daily) and some may not change at all.

We do not have any of the new tools/technologies in place. Moving to SVN is one of our first efforts to migrate from old tools.

Industry- finance

Number of developers- about 40-50 globally

We have many projects- java based, flex based, C/C++, shell scripts and perl, website(html,js) code, DB.

Java and flex projects would be good candidates for svn. I am debating whether to move the scripts to SVN or just leave it in CVS. I am not sure how it’s done everywhere else. What is the workflow of a code release using SVN? Do the developers cut a tag every time they need to push some code to production? So for scripts it could mean they need to create tags every day?

Right now the developers request code change through a request form which scans for files and the versions. They select the files and request a code change. How can I achieve something like this in SVN? Please let me know if this needs to be a separate thread. Thanks a lot.

5 Answers

Bob Aiello's picture
Bob Aiello replied on October 23, 2013 - 9:04pm.

The answer to this question would be that almost any version control tool would provide source control for scripts easily. What features do you need?

What other tools/technologies are you using?
How many developers?
What industry are you in?

Bob Aiello, Technical Editor CM Crossroads

Drew Benson's picture

svn is a perfectly good tool to manage scripts.

Its functionality can be beneficial in managing "project level" commits etc but works perfectly fine with individual file commits.

You (obviously) need to get your head around "COMMITS" vs "(File) VERSION"

The svn "COMMIT" is in effect a "Version" of the entire repository at that (commit) point in time

Each individual file revision is still accessible (The latest revision of the file has the Commit of when it was last changed) - Any commits after this point produce this revision (until the individual file changes again or is deleted)

By viewing the Commit (at least 1) prior to this one the previous revision is available.

 

 

 

Paul Thompson's picture

I use SVN on GoogleCode to control all my scripts that are not client-related.  Works great.  To get around the "entire directory" paradigm that Subversion perfers, I have a "tools" directory that contains sub-dirs for each tool.  Each tool-specific directory has the standard ".../trunk/", ".../tags/" and ".../branches/" subdirs.  I should say they will have those when I get around to refactoring the repository :-)  

Ambika S's picture
Ambika S replied on October 29, 2013 - 1:39pm.

Thanks Paul..So the tools directory is the repository or just a directory? the sub-dirs are projects? Can reposiroties or projects be grouped inside directories?

Drew Benson's picture

Repository = the highest level entity.

All commits are "across" the repository.

You can have multiple repositories (on single or multiple locations). They each will start at commit 0 (Repository creation)

And will indeopendently increnment from there. (A commit to reposittory 1 will NOT be recorded/recognised etc within Repository 2).

Beneath Repository you can break down into your own High Level Qualifier (which "looks" like a Directory)
and further down into Lower Level Qualifiers (as deep as you like)

At some point you will shove in your Trunk/Tag/Branch structure (to manage Parallel developments, code branches and "Baselines") at a logical (and managable granularity).

svn doesn't enforce any of it ... so you could have Trunk/Branch/Tag at HLQ Level 1

or beneath any chosen level (per App, Per sub-app, per-technology) - its all up to you.

You can even mix and match (Trnk/BR/Tag at different levels within a single repository - Although I really wouldn't recomend this!!!

 

 

 

  

CMCrossroads is a TechWell community.

Through conferences, training, consulting, and online resources, TechWell helps you develop and deliver great software every day.