Software Configuration Management - PowerPoint PPT Presentation

1 / 59
About This Presentation
Title:

Software Configuration Management

Description:

CVS (Concurrent Versioning System) is built on top of RCS and implements a ... Subversion is a newer and is designed as a replacement for CVS. ... – PowerPoint PPT presentation

Number of Views:397
Avg rating:3.0/5.0
Slides: 60
Provided by: chemicalen
Category:

less

Transcript and Presenter's Notes

Title: Software Configuration Management


1
Software Configuration Management
2
Software Configuration Management
  • What is it?
  • Software Configuration Management is the process
    of tracking changes to software.
  • Why use it?
  • Maintain multiple branches and versions.
  • Recover previous versions.
  • Keep track of changes, ie, committed changes.
  • When to use it?
  • For text files programs, data, and configuration
    files.
  • Supports binary files Word and Excel files,
    etc.
  • In multi developer contexts can assign blame for
    changes.

3
Software Configuration Management
  • Used in both single user and multi user
    environments.
  • There are two multi user paradigms
  • Locked access A single developer checks-out a
    copy of a file before modifying it. The modified
    file is then checked-in. During check-out only a
    single developer has access to the file.
  • Concurrent access Multiple developers work with
    their own copy of a file. Conflicts are resolved
    as the local copies are committed to the common
    repository.

4
Software Configuration Management
  • There are many implementations of version control
    software.
  • RCS (Revision Control System) is one of the
    earliest. It was developed along with Unix. It
    is implemented as check-in/check-out.
  • CVS (Concurrent Versioning System) is built on
    top of RCS and implements a concurrent access
    scheme.
  • Subversion is a newer and is designed as a
    replacement for CVS. It is more easily deployed
    as a server. It is rapidly displacing CVS as the
    version control system of choice.
  • Visual Source Safe is part of Microsoft Visual
    Studio. It is a check-in/check-out system and
    only runs on Windows.
  • There are other open source and commercial
    implementations available.

5
Subversion
  • Runs on Linux, Unix, MacOS, and Windows.
  • Files, properties, and versioning information is
    maintained in a repository.
  • The developer works with a copy located in a
    local working directory.
  • Subversion repositories are local or
    server-based.
  • The URL of the repository describes the access
    method
  • file//... a local file based repository
  • svn// - a repository using the built-in
    svnserver
  • svnssh// - an svnserver with ssh used to
    control access (not a tunnel)
  • http//... a web based repository, most common
    in multi user environments
  • http//subversion.tigris.org/ home page
  • http//svnbook.red-bean.com/ Subversion Book

6
Subversion
  • URL Notes
  • When using the file// method, do not use it in
    multi user mode while the repository is located
    on a shared network disk. It is unreliable and
    will eventually corrupt your repository.
  • When using the http// method, you can view the
    current head revision files using a normal
    browser.

7
Subversion
8
Subversion
  • Plain SVN is a line mode system.
  • ex, svn update
  • There are several GUI clients
  • http//subversion.tigris.org/links.html
  • TortoiseSVN is popular Windows client, explorer
    extension
  • Download TortoiseSVN from
  • http//tortoisesvn.tigris.org/

9
Subversion
  • Installation of TortoiseSVN
  • Download TortoiseSVN from
  • http//tortoisesvn.tigris.org/
  • Double click file
  • TortoiseSVN-1.5.3.13783-win32-svn-1.5.2.msi
  • Installs as an explorer extension
  • special file icons for affected files
  • added right-click menu items
  • Start Programs TortoiseSVN
  • Includes a differences program
  • After installation explorer or computer must be
    restarted.

10
Subversion
  • Use Cases
  • create a repository
  • import initial files into new repository
  • check out a repository into a working directory
  • update a working directory
  • change file svn properties
  • add a new file to a repository
  • commit changes to the repository
  • checking status of files in working set
  • listing files in repository
  • show a files log entries
  • revert to a previous version
  • resolving conflicts

11
Subversion
  • Create a Local Repository

12
Subversion
  • Create a pair of directories/folders.
  • work is the working directory.
  • repos is the directory where repositories will
    reside.

13
Subversion
  • Create the specific repository directory.
  • Use the TortiseSVN Explorer extension, right
    click the mouse on the repos folder.

14
Subversion
  • A dialog box will appear asking for the type of
    repository to create. The choice is either a
    Berkeley Database file or a file-based
    repository. In most cases the file-based
    repository is best.
  • The line-mode equivalent is
  • svnadmin create proj1 fs-type fsfs

15
Subversion
  • Now the repos directory is filled with folders
    and files that are used by Subversion to manage
    the repository.
  • The repository is still empty.

16
Subversion
  • Import Project Files to Repository

17
Subversion
  • The initial set of files that are to be placed
    under version control are created in the work
    directory. In this example a single file,
    matmult.c, is created.
  • This is an optional step. It is used only if
    there is an existing project that is being added
    to a repository.
  • See slides on Adding Files to repository.

18
Subversion
  • The next slide shows the contents of matmult.c.
  • In particular see line 5. The string Id
    identifies the revision number associated with
    the file. This string is updated to show the
    version id every time the working file is
    updated, if the appropriate property is set.

19
Subversion
t1 clock() for(iter0iterlt10iter)
for(i0iltMAXi) for(j0jltMAXj)
cij 0.0 for(k0kltMAXk)
cij cij aik
bkj t2
clock() printf("t1d, t2d\n",t1,t2)
printf("cpu time8.3f\n",(float)(t2 -
t1)/CLOCKS_PER_SEC) / printmat(c,MAX,MAX)
/
  • include ltstdio.hgt
  • include lttime.hgt
  • define MAX 500
  • static char svnid "Id "
  • void printmat(double a,int imax, int jmax)
  • long int i,j
  • printf("enter printmat\n")
  • for (i0iltimaxi)
  • for (j0jltjmaxj)
  • printf("5.2f ",(a (jmax i) j))
  • printf("\n")

20
Subversion
  • The next step is to import the initial set of
    files into the repository.
  • Right-click the mouse on the work directory.

21
Subversion
  • This dialog box requests the location of the
    repository. It is entered as a URL.
  • In this case the repository is a local directory
    so use the file// form.
  • A web based URL might be http//svn/svn/proj

22
Subversion
  • This is the result of the import operation. It
    shows that one file has been added to the
    repository.
  • The current revision number is 1.

23
Subversion
  • The contents of the work directory can now be
    discarded.

24
Subversion
  • Check Out the Repository to a Working Directory

25
Subversion
  • Create a subversion working directory under
    revision control.
  • We will reuse the work directory.
  • To do this delete the contents of the work
    directory. At least the files that were added to
    the repository.
  • Now checkout the contents of the repository to
    the work directory.

26
Subversion
  • This dialog box is used to control what is
    checked out and to where.
  • The directory work will be created if it does not
    exist.

27
Subversion
  • For a server based working directory, the file
    work usually has the same name as the repository.

28
Subversion
  • This dialog box lists the files that were added
    to the working directory.

29
Subversion
  • Opening the working directory.
  • The TortoiseSVN extension results in changes to
    the file icons.

30
Subversion
  • Additional information about revision controlled
    files can be displayed by using View/Details and
    then View/Choose Details

31
Subversion
  • The dialog box that results from View/Choose
    Details
  • The SVN parameters, if selected, will be
    displayed when View/Details is selected as the
    directory format.

32
Subversion
  • The result of selecting SVN Revision and SVN
    Status.

33
Subversion
  • Update a Working Directory

34
Subversion
  • Right click on directory or file and select SVN
    Update.
  • This will load the current version from the
    repository to the working directory.
  • When using a multi user repository it is a good
    idea to execute an update before working on the
    file.

35
Subversion
  • Set Subversion Properties

36
Subversion
  • To set properties on svn controlled files

37
Subversion
  • To set properties on svn controlled files.

38
Subversion
  • To set properties on svn controlled files.
  • The drop-down box shows the available properties.

39
Subversion
  • svneol-style
  • Subversion will set the end-of-line in a text
    file appropriate to the destination working
    directory.
  • svnkeywords
  • Informs Subversion to handle the keywords, eg,
    Id , which will be updated when downloaded to
    the working directory.
  • svnexecutable
  • Informs Subversion that the file is an executable
    file. It will set permissions on the working
    copy to allow execution.

40
Subversion
  • For this file svnkeywords has been set to Id and
    svneol-style has been set to native.

41
Subversion
  • Going back an looking at the work directory
    notice that the icon for the file matmult.c has
    changed. In this case it indicates that the svn
    properties for the file have changed.

42
Subversion
  • Add a New File to a Working Directory

43
Subversion
  • To add a new file, readme.txt, to the repository.
    Create the file in the working directory, then
    use svn add

44
Subversion
  • The dialog box that lists the files to be added
    to the repository. And the result of the add
    operation.

45
Subversion
  • The freshly added file has a icon to indicate
    its status. Now set the properties of the file
    then commit it.

46
Subversion
  • The status of the working directory after the
    commit operation. Note that readme.txt is level
    3 and matmult.c is level 2.

47
Subversion
  • Adding is the better way to put files into a
    repository.
  • Create the file in the working directory.
  • Add the file to the repository.
  • Set the appropriate properties.
  • Commit the file to the repository.

48
Subversion
  • Commit Changes to Repository

49
Subversion
  • Now commit the changed file to the repository.

50
Subversion
  • The dialog that results from the commit operation
    allows you to enter a log message that describes
    the changes made.

51
Subversion
  • The final dialog box verifying the update of the
    repository. The revision number is now 2. The
    icon for matmult.c reverts to the green check.
    Looking at the file matmult.c shows the
    following
  • static char svnid "Id matmult.c 2
    2006-11-08 153316Z latham "

52
Subversion
  • Listing the Contents of the Repository

53
Subversion
  • The contents of the repository can be viewed by
    using the repository browser.

54
Subversion
  • The list of files in the repository.

55
Subversion
  • Show Log for File

56
Subversion
  • To show a files log entries, right click the file
    and select TortoiseSVN Show Log.
  • The window at the right shows every revision made
    that included a comment.
  • Use TortoiseSVN Revision Graph for a complete
    list of all revisions.

57
Subversion
  • Revert to a Previous Version

58
Subversion
  • Right click on the file to revert, then select
    the revision number that you want.

59
Subversion
  • Resolving Conflicts
  • (todo)
Write a Comment
User Comments (0)
About PowerShow.com