Surce Management Tl Server Envirnment Operatin Summary In the e- gvernment standard framewrk, Subversin, an pen surce, is used as the surce management tl fr develpment envirnment. Subversin (SVN, versin management system) is a system fr the management f files used thrughut a prject. Subversin allws a histry- based versin management when multiple develpers wrk fr a sftware and an cnsistent management f cmmn mdules fr a team. As f May 2009, the subject f this manual and the installatin versin f Subversin included in the e- gvernment standard framewrk develpment envirnment are as fllws. Server envirnment: Subversin 1.4.6 The abve specified versin f Subversin may change in the future due t any imprvement made t the cntinuus imprvement effrts n the e- gvernment standard framewrk develpment envirnment. Descriptin In additin t the actual wrk directry (wrkspace), Subversin stres the first data, its update histry and change infrmatin in the dmain called repsitry. Multiple repsitries can be created. Usable files r directries are imprted t the repsitry Running checkut will cpy the repsitry cntent t the wrk space and create.svn directry which list management infrmatin. This wrk is needed nly nce. When a file r directry is mdified, the changes are registered in the repsitry. T incrprate ther changes existing in the repsitry t the wrk directry, run update. In rder t bring the repsitry cntent withut management infrmatin, run exprt. Subversin s s Architecture
The repsitry (Subversin Repsitry) manages all versin data and the client prgram manages the cpied data f the lcal envirnment. Varius repsitry access (RA) layers are prvided between these tw. Subversin Cmpnents svn: cmmand line client prgram svnversin: prgram that manages the status f wrking cpy svnlk: tl t inspect the Subversin s repsitry svnadmin: prgram t adjust and restre Subversin s repsitry, used by the system administratr svndumpfilter: filter prgram fr dump file frmat data in Subversin s repsitry md_dav_svn: plug- in mdule fr Apache HTTP server, allwing ther users n the netwrk t use the repsitry svnserve: demn r an independent server prgram run by SSH, anther methd t use the repsitry n the netwrk Manual Main functins 1. Versin management f directry Subversin prvides a virtual versin management that can check changes t the entire directry tree with time. Versin infrmatin is als added t the directry. 2. Versin histry enhanced Subversin can add, delete, cpy and rename bth files and directries. A newly added file has histry that begins newly. 3. Atmic Cmmit
Gathering f change pints is whether they are all incrprated in the repsitry r they are nt at all. The develper can prduce a bundle f changes lgically t carry ut Cmmit, eliminating the prblem that nly sme are incrprated in the repsitry. 4. Metadata versin management The files and directries are the cmbinatins f their assciated prperty keys and values. Yu can create yu wn key/ value cmbinatins. The prperties are versin- managed in the way with the files. 5. Netwrk layer selectin Subversin has an abstract layer fr access in the repsitry s that it can implement a new netwrk prgram easily. Subversin is an extensin mdule f the HTTP server and culd be used as a plug- in. It is advantageus in terms f reliance and interperability and is able t use the existing functins (authenticatin, permissin, data cmpressin, etc.) instantly. Yu can use a standalne Subversin prcess which is mre simple and easier t use. This server can use its wn prtcl t establish a SSH- based tunnel cmmunicatin easily. 6. Cnsistency f data prcessing Subversin uses the same algrithm t shw the changes t the files. It wrks in the same way t the texts (readable data) and binaries (unreadable data) 7. Prductin f efficient branches and tags The cst t prduce branches and tags is nt prprtinal t the prject size. Subversin prduces branches and tags by using a methd similar t the ne knwn as hard link t just cpy the prject. Therefre it takes very little time t prduce branches and tags. 8. Easiness t scale Subversin is cmpsed f sets f shared libraries written in C and cmpleted with well designed APIs. This means that it is easier t maintain r interface them with ther applicatins r languages. Main cmmands Yu can use the fllwing cmmands via the system cnsle t manage sftware cnfiguratins and repsitries. 1. Checkut(imprt) If yu check ut the repsitry, a cpy f the prject is prduced in the lcal cmputer and this cpy cntains the latest revisin f the designated repsitry. Yu can check ut yur desired versin, nt the latest versin 2. Cmmit Cmmit is als called check- in. This mdifies the checked- ut surces and add/ delete files and then update the changes t the lcal cpy t the repsitry. If yu carry ut Cmmit, the ttal revisin increase by 1 in Subversin. If Cmmit is carried ut, the user can view the latest versin f a certain file since the update 3. Update Update synchrnizes the latest changes t the wrk cpy with the repsitry and mves the latest wrk cy t the lcal drive (changed parts nly mved) It is imprtant t carry ut Update befre making a change t a file. 4. Imprt This is t put the surce int the repsitry which is empty. 5. Exprt Unlike checkut, yu can receive pure surce files that dn t include versin management files In an pen surce prject, this is used t cmpress and release surces. 6. Cnflict When sme lines in a file are mdified r files are updated in the repsitry by tw r mre users, a cnflict ccurs. 7. Revisin When a surce file r smething is mdified and cmmitted, the number increases accrding t a certain rule. This number is the file versin f the file stred in the repsitry.
8. Trunk 9. Branch 10. Tag 11. Hk 12. Lck 13. Merge Thugh a single files is mdified and cmmitted, the versin f all the files increases per prject. This is a central directry fr a prject and all sftware develpment activities are made in the trunk directry. Under the trunk directry, surces files and directries are placed. While develping sftware in the trunk directry, smetimes yu need t cme ut frm it and wrk in a smaller categry. At this time, yu can put directries in the branch directry. Branch directries are usually created t test a new functin withut being interrupted by cmpiler errrs r bugs. Tag directry is a space where surces are separately stred whenever annunced in the regular release. Tagging is t label each file regardless f the revisin number. This can be applied t the wrk cpy r the repsitry. Hk is a prgram run by a repsitry event such as creatin f new revisin r mdificatin f a prperty that is nt versin- managed. Hk infrms what the event is, with what bjective it wrks and wh the user is that ran the event. Sever Operatin Management This is a device fr the user t demand an exclusive right t mdify the wrk cpy file. Merge is t cmbine changes t a branch with anther branch t incrprate them t the trunk (and vice versa) At this time, anther branch culd be a trunk 1. Prducing a repsitry It is recmmended Subversin repsitry be a multi- repsitry system fr easy additin and management f repsitries in the future. Create a directry fr Rt Repsitry. > mkdir repsitry Create repsitries. > cd repsitry > svnadmin create --fs-type fsfs rep1 > svnadmin create --fs-type fsfs rep2 2. Authenticatin/ permissin setup (cnf/ svnserve.cnf) In the svnserve.cnf file in the repsitry cnf flder (r directry), set up the permissins fr the repsitries If nt set up fr ann- access (annymus user) and auth- access (authenticated user), the annymus user is granted the permissin t read and the authenticated user is granted the permissin t write by default. The fllwing is an example f svnserve.cnf. [general] ### These ptins cntrl access t the repsitry fr unauthenticated ### and authenticated users. Valid values are "wri te", "read", ### and "nne". The sample settings belw are the defaults. # ann-access = read # auth-access = write
# The annymus user is nt allwed t access, but the authenticated user is granted the #permissin t write. ann-access = nne auth-access = write ### The passwrd-db ptin cntrls the lcatin f the passwrd ### database file. Unless yu specify a path start ing with a /, ### the file's lcatin is relative t the cnf dir ectry. ### Uncmment the line belw t use the default pas swrd file. # As the passwrd file, the cnf/passwd is used by default. # passwrd-db = passwd ### The authz-db ptin cntrls the lcatin f th e authrizatin ### rules fr path-based access cntrl. Unless y u specify a path ### starting with a /, the file's lcatin is relat ive t the cnf ### directry. If yu dn't specify an authz-db, n path-based access ### cntrl is dne. ### Uncmment the line belw t use the default aut hrizatin file. # If permissins are nt cntrlled fr directries and user grups, # n additinal permissin is set up. # authz-db = authz ### This ptin specifies the authenticatin realm f the repsitry. ### If tw repsitries have the same authenticati n realm, they shuld ### have the same passwrd database, and vice versa. The default realm ### is repsitry's uuid. # Designate the title that will appear when authent icating this repsitry. realm = egvframe SVN Repsitry 3. Creating a repsitry Register users in the passwd file in each repsitry cnf flder r directry. The frmat is 'id = passwrd and the passwrd is a plaint text type. ### This file is an example passwrd file fr svnse rve. ### Its frmat is similar t that f svnserve.cnf. As shwn in the ### example belw it cntains ne sectin labelled [users]. ### The name and passwrd fr each user fllw, ne accunt per line. [users] # harry = harryssecret # sally = sallyssecret develper01 = 123qwe develper02 = 123qwe 4. Backup and recvery Dump : Use the standard I/ O t create a file frm the cntent f repsitry. The svnadmin dump cmmand is used. This cmmand shuld be used utside the directry. > ls repsitry > svnadmin dump repsitry > repsitry.dump Lad: Use the repsitry backup file t recver the repsitry. The svnadmin lad cmmand is used. Create an empty repsitry and use the backup file. > svnadmin create repsitry > ls repsitry repsitry.dump > svnadmin lad repsitry < sample.dump References
Subversin pen surce prject site: http:/ / subversin.tigris.rg/