Labels: Overview

A Label is a snap shot of all of the files within a SourceJammer folder at the time when the label is built. The Label keeps track of the exact version, file name, and path or each file so that when you Get a Label the files returned will always be the same as when the Label was created, no matter how those files have change in the SourceJammer archive.

Say you are working on an application. At a certain point you decide that your application code has reached, say, version 1.0. You can create a Label in SourceJammer to include all of your application code for version 1.0. The Label will always include the version of each file that was current when you first created the Label.

For example:

-My Application
    -src
        ModOne.java (version 4)
        ModTwo.java (version 1)
        ModThree.java (version 10)
        ModFour.java (version 8)
        

If you make a label for My Application, it will always include version 4 of ModOne.java, version 1 of ModTwo.java, etc. When you create your Label you get something like this:

-My Application
    MyApplicationLabel
    -src
        ModOne.java (version 4)
        ModTwo.java (version 1)
        ModThree.java (version 10)
        ModFour.java (version 8)

You can now do a "Get Label" on MyApplicationLabel and get all of the files that that Label points to in one operation.

Later on you make changes to your code and get something like this:

-My Application
    MyApplicationLabel (version 1)
    -src
        ModOne.java (version 7)
        ModTwo.java (version 2)
        ModThree.java (version 16)
        ModFour.java (version 8)

If you do a get label on MyApplicationLabel now, you will still get version 4 of ModOne.java, version 1 of ModTwo.java, version 10 of ModThree.java, etc.

Now, at this point you might decide to call the current version of My Application 1.0.1, so you decide that you want to rebuild your label. You can select MyApplicationLabel and do a "Rebuild Label" action in the client. That will give you this:

-My Application
    MyApplicationLabel (version 2)
    -src
        ModOne.java (version 7)
        ModTwo.java (version 2)
        ModThree.java (version 16)
        ModFour.java (version 8)

Now you can do a Get Label on version 2 of MyApplicationLabel and get version 7 of ModOne.java, etc. You can also Get Label on version 1 of MyApplicationLabel and still get version 4 of ModOne.java, etc.