Chapter 6. Using Properties


One of Subversion's most powerful features is its property system. In addition to storing the history of a file, Subversion also allows you to associate arbitrary metadata with each file, directory, or revision. Properties are keyed with a user-defined name, and can contain any data that you would like to associate. Additionally, Subversion provides several special properties that Subversion clients use in order to provide added functionality to versioned files.

Properties in Subversion come in two forms. Conceptually, both forms of properties are the same, and both are dealt with using nearly identical syntax. The key difference between the two forms lies in how they are versioned, and how those versions are accessed and modified.

The first form is a versioned property, which is applied to a file or directory. These sorts of properties are the most common, dealt with directly on a day-to-day basis, and tend to just be referred to as properties. Changes to versioned properties are stored with new revisions, when a file is committed, just as changes to the contents of a file are.

The second form of property is an unversioned property that is attached to a specific revision, instead of a file in the repository. These properties, which are called revision properties because they are attached to a revision, can be modified, but their history is not stored. If a revision property is modified, its previous state is irretrievably lost. Internally, Subversion uses revision properties to store information such as commit dates and log messages, but users can also store their own properties as revision properties.



    Subversion Version Control. Using The Subversion Version Control System in Development Projects
    Subversion Version Control. Using The Subversion Version Control System in Development Projects
    ISBN: 131855182
    EAN: N/A
    Year: 2005
    Pages: 132

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net