Page 142 -
P. 142

models and UML diagrams. If all of these elements are bundled into a single design specifi-
                          cation, it is important that the scope of each review is clear—it’s reasonable to have indi-
                          vidual people review only the part of the design specification that they are interested in.

                          Version Control with Subversion

                          The purpose of a version control system is to bring a project’s source code under control. * The
                          main element of the version control system is the repository, a database or directory that
                          contains each of the files that make up the system. Bringing a group of files under control
                          means that someone can pick a point at any time in the history of the project and see
                          exactly what those files looked like at the time. It is always possible to find the latest ver-
                          sion of any file by retrieving it from the repository. Changing a file will not unexpectedly
                          overwrite any previous changes to that file; any change can be rolled back, so no work will
                          accidentally be overwritten. Modern version control systems can identify exactly what
                          changed between two different versions of a file, and allow the team to roll back those
                          changes—even if they were made a long time ago, and the affected files have had many
                          modifications since then.

                          This is very important for source code. When source code files are stored in a shared
                          folder, for example, it is easy for changes to be lost when more than one programmer is
                          working on the software. Even a single programmer, working on source code that resides
                          in a folder on his computer, can run into problems. He might make a large change, only to
                          realize that he needs to roll it back. Or he may find that he’s got several copies of the code
                          on his hard drive and laptop, and that each of them contains a different set of changes that
                          all need to be integrated.

                          Subversion is a free and open source version control system. It is available from http://
                          subversion.tigris.org for many operating systems and platforms, including Linux, BSD,
                          Solaris, BeOS, OS/2, Mac OS X, and Windows. Subversion provides many advanced fea-
                          tures for bringing source code under control, but it takes only a few basic commands for a
                          programming team to use a simple version control repository effectively.

                          The examples below are based on Version 1.2, the latest version available at the time of
                          this writing. The remainder of this chapter assumes that this version (or later) is installed

                          on the programmer’s machine. The Subversion installation procedure does not install a
                          graphical user interface—all functions are accessed through command-line programs.
                          There are graphical utilities and web interfaces that work with Subversion, including Tor-
                          toiseSVN (http://tortoisesvn.tigris.org), ViewCVS (http://viewcvs.sourceforge.net), and SmartSVN
                          (http://www.smartcvs.com/smartsvn).



                          * Some people use the term “configuration management” in place of “version control.” We’ve
                            selected the narrower term because in some software engineering organizations, “configuration
                            management” includes not only version control (identifying baselines and controlling changes to
                            work products), but also tracking change requests, establishing configuration management records,
                            and performing configuration audits.


                   134  CHAPTER SEVEN
   137   138   139   140   141   142   143   144   145   146   147