02.05.2013 Views

The Source Integrity Professional Edition User Guide - MKS

The Source Integrity Professional Edition User Guide - MKS

The Source Integrity Professional Edition User Guide - MKS

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Mortice Kern Systems (<strong>MKS</strong>) Inc.<br />

<strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong><br />

<strong>Edition</strong><br />

<strong>User</strong> <strong>Guide</strong>


<strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong><br />

<strong>User</strong> <strong>Guide</strong><br />

© Copyright 2000 by Mortice Kern Systems Inc.<br />

All rights reserved.<br />

Printed in Canada.<br />

<strong>MKS</strong>, <strong>MKS</strong> logo, <strong>MKS</strong> Change <strong>Integrity</strong>, and <strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong> are registered trademarks of Mortice Kern Systems Inc.<br />

Other brand and product names are trademarks or registered trademarks of their respective holders.<br />

Portions © copyright BEA Systems Inc. All rights reserved.<br />

Portions © copyright KL Group or its suppliers. All rights reserved.<br />

Portions © copyright PointBase, Inc. All rights reserved.<br />

Customer Support<br />

Include your <strong>MKS</strong> product name, release and serial number, as well as your operating system name and release number<br />

with all Technical Support correspondence. <strong>MKS</strong> product information is available on the CD-ROM label.<br />

Thirty days of free telephone support covering installation and configuration queries are provided with your purchase.<br />

This period begins with your first request for assistance. Support beyond the initial 30 days is available through a Preferred<br />

Customer Subscription package, or through a “pay as you go” program. Charges can be billed to your American Express,<br />

VISA, or MasterCard.<br />

Corporate Headquarters<br />

Mortice Kern Systems (<strong>MKS</strong>) Inc.<br />

185 Columbia Street West<br />

Waterloo, Ontario<br />

Canada N2L 5Z5<br />

Phone: (519) 884-2251<br />

Fax: (519) 884-8861<br />

North American Sales: 1 800 265-2797<br />

E-mail: info@mks.com<br />

<strong>MKS</strong>/DataFocus<br />

12450 Fair Lakes Circle<br />

Suite 400<br />

Fairfax, Virginia 22033<br />

Phone: +1 703 803-3343<br />

Fax: +1 703 803-3344<br />

E-mail: nutcracker@mks.com<br />

<strong>MKS</strong> France<br />

11C Quai Conti<br />

78430 Louveciennes<br />

France<br />

Phone: +331 3082 2762<br />

Fax: +331 3082 7278<br />

E-mail: france@mks.com<br />

4.0-0300<br />

Customer Support: (519) 884-2270<br />

(8:00 a.m. – 8:00 p.m. Eastern Time, Monday – Friday)<br />

Internet: sales@mks.com<br />

support@mks.com<br />

World Wide Web: http://www.mks.com<br />

FAX: (519) 884-8861<br />

US Headquarters<br />

<strong>MKS</strong> US Inc.<br />

2500 S. Highland Ave.<br />

Suite 200<br />

Lombard, Illinois 60148<br />

Phone: (630) 495-2108<br />

Fax: (630) 495-3591<br />

E-mail: sales@mks.com<br />

<strong>MKS</strong> (UK) Ltd.<br />

Block D,<br />

Dukes Court,<br />

Woking, Surrey<br />

United Kingdom<br />

GU21 5BH<br />

Phone: +44 (0) 1483 733 900<br />

Fax: +44 (0) 1483 733 901<br />

E-mail: uk@mks.com<br />

<strong>MKS</strong> US Inc.<br />

9020-I Capital of Texas Highway North<br />

Great Hills Corporate Center<br />

Suite 335<br />

Austin, Texas 78759<br />

Phone: (512) 342-2220<br />

Fax: (512) 342-2939<br />

E-mail: austin@mks.com<br />

<strong>MKS</strong> Germany<br />

Martinstraße 42-44<br />

73728 Esslingen<br />

Deutschland<br />

Phone: +49 711 351775 0<br />

Fax: +49 711 351775 11<br />

E-mail: info@mks.de<br />

<strong>MKS</strong> Japan<br />

Kounike Building 4F<br />

2-5-7 Minamisuna<br />

Koto-Ku, Tokyo<br />

Japan<br />

Phone: (416) 626 7097<br />

Fax: (416) 626 7354<br />

E-mail: japan@mks.com


Table of Contents<br />

1 Welcome to <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong> . . . . 1<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong> <strong>User</strong> <strong>Guide</strong>. . . . . . . . . . . . . . . . .2<br />

Typographical Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4<br />

Related Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4<br />

2 Understanding <strong>Source</strong> <strong>Integrity</strong> . . . . . . . . . . . . . . . . . . . . 5<br />

What Is Configuration Management? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .6<br />

<strong>The</strong> Role of Configuration Management . . . . . . . . . . . . . . . . . . . . . . . . . . . .7<br />

Managing Constant Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7<br />

<strong>The</strong> Cost of Change. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .7<br />

Managing Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9<br />

Implementing Change . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9<br />

Configuration Management Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10<br />

Archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10<br />

Revisions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10<br />

Branches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11<br />

Metadata. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11<br />

<strong>Source</strong> <strong>Integrity</strong> Basics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11<br />

Related Objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .11<br />

Changing States. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12<br />

Understanding Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13<br />

Logical and Functional Structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13<br />

Understanding Archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13<br />

About Archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14<br />

What Happens at Check-in Time? . . . . . . . . . . . . . . . . . . . . . . . . . . . . .15<br />

Branches and Trunks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17<br />

Checkpointing Your Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .20<br />

Sandboxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21<br />

Sandbox Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21<br />

A Typical Workplace Scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22<br />

How Sandboxes Can Help. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22<br />

Variant Sandboxes and Development Paths. . . . . . . . . . . . . . . . . . . . .24<br />

Build Sandboxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25<br />

<strong>User</strong> <strong>Guide</strong> i


Table of Contents<br />

Locking in Variant Sandboxes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .26<br />

Converting Old-Style Variant Sandboxes . . . . . . . . . . . . . . . . . . . . . . .28<br />

Metadata . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29<br />

About Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .29<br />

About Revision Descriptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .30<br />

About Timestamps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .31<br />

About Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .32<br />

About Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33<br />

About Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33<br />

Security and Administration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34<br />

<strong>Source</strong> <strong>Integrity</strong> Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34<br />

<strong>The</strong> SAM Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .34<br />

Managing Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36<br />

Promotion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36<br />

Reporter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .37<br />

3 Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces . . . . . . . . . 39<br />

<strong>The</strong> Windows interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40<br />

Starting the <strong>Source</strong> <strong>Integrity</strong> Windows Interface . . . . . . . . . . . . . . . . .40<br />

<strong>The</strong> Application Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40<br />

<strong>The</strong> Project Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .42<br />

<strong>The</strong> Archive Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .43<br />

Using Filters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .44<br />

Filtering Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45<br />

Using Tree View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45<br />

Using <strong>Source</strong> <strong>Integrity</strong> With Windows Explorer . . . . . . . . . . . . . . . . .48<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .48<br />

Installing the <strong>Source</strong> <strong>Integrity</strong> Web Interface . . . . . . . . . . . . . . . . . . . .49<br />

Installing Additional Browser Plugins . . . . . . . . . . . . . . . . . . . . . . . . .50<br />

Starting the <strong>Source</strong> <strong>Integrity</strong> Web Interface . . . . . . . . . . . . . . . . . . . . .50<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface Home Page . . . . . . . . . . . . . . . . .52<br />

Introduction to Views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .52<br />

Setting the Proxy Server. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58<br />

Setting Your Timezone Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .60<br />

<strong>The</strong> Command Line Interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61<br />

Project Commands Versus Archive Commands . . . . . . . . . . . . . . . . .61<br />

Command-Line Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62<br />

Path Separator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62<br />

Wildcard Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62<br />

File Name Arguments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63<br />

ii <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Table of Contents<br />

4 Getting Started With Projects,<br />

Sandboxes, and Members . . . . . . . . . . . . . . . . . . . . . . . 65<br />

Creating a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .66<br />

Registering a Project in the <strong>Source</strong> <strong>Integrity</strong> Web Interface. . . . . . . . . . . .69<br />

Registering a Sandbox in the <strong>Source</strong> <strong>Integrity</strong> Web Interface . . . . . . . . . .69<br />

Opening a Project or Sandbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .70<br />

Opening the Master Project From a Sandbox. . . . . . . . . . . . . . . . . . . . . . . .71<br />

Adding Members to a Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72<br />

Removing Members From a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .75<br />

Creating a Sandbox . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76<br />

Checking Out a Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81<br />

Viewing and Editing a Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85<br />

Checking In a Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .87<br />

Starting a Branch When Checking In a Member . . . . . . . . . . . . . . . . .87<br />

Assigning Revision Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .88<br />

Assigning Revision Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .89<br />

Assigning Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94<br />

Assigning a State . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94<br />

Assigning a Different Revision Number . . . . . . . . . . . . . . . . . . . . . . . .94<br />

Viewing and Editing Project and Sandbox Information. . . . . . . . . . . . . . .94<br />

Setting Project or Sandbox Attributes . . . . . . . . . . . . . . . . . . . . . . . . . .97<br />

Comparing the Working File to Its Member Revision . . . . . . . . . . . . . . . .99<br />

Discarding Changes to Working Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . .100<br />

Locking a Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101<br />

Unlocking a Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102<br />

Removing Unused Locks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103<br />

Detecting Sandbox Members Out of Sync With the Project. . . . . . . . . . .104<br />

Resynchronizing Your Project or Sandbox. . . . . . . . . . . . . . . . . . . . . . . . .104<br />

Freezing Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106<br />

Thawing Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .107<br />

Viewing Member Information (Windows Only). . . . . . . . . . . . . . . . . . . .108<br />

Viewing and Editing Member Attributes . . . . . . . . . . . . . . . . . . . . . .109<br />

Promoting and Demoting a Member . . . . . . . . . . . . . . . . . . . . . . . . . . . . .110<br />

Updating to Head Rev. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113<br />

Updating to Tip Revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114<br />

Scanning Your Project for Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .114<br />

Refreshing Your View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115<br />

Assigning Labels to Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .116<br />

Deleting a Member’s Label . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117<br />

Building a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118<br />

Calculating Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118<br />

Using the Build Command (Windows) . . . . . . . . . . . . . . . . . . . . . . . .120<br />

Using pj build . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .122<br />

<strong>User</strong> <strong>Guide</strong> iii


Table of Contents<br />

Using pj mkmf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .123<br />

<strong>The</strong> Reporter Utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124<br />

About the Report Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124<br />

About Graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .124<br />

Report Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125<br />

Creating Reports with the Command Line Interface. . . . . . . . . . . . .128<br />

Using Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129<br />

Locating Keywords. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .130<br />

Removing Keyword Values. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131<br />

Table of Keywords . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131<br />

5 Managing Projects and Sandboxes . . . . . . . . . . . . . . . 133<br />

Freezing a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134<br />

Thawing a Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135<br />

Checkpointing a Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .136<br />

Opening a Project Archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140<br />

Promoting and Demoting a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .140<br />

Logging Project Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142<br />

Cleaning Up Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142<br />

Viewing Changes to a Project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143<br />

Restoring a Project’s Member List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146<br />

Importing Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148<br />

Importing SCCS Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149<br />

Importing PVCS Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149<br />

Importing Visual <strong>Source</strong>Safe Files . . . . . . . . . . . . . . . . . . . . . . . . . . . .150<br />

Using Existing RCS Archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151<br />

Accessing Project Information With the Command Line Interface . . . .152<br />

List of Members. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152<br />

Changed Members . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .152<br />

Variables and Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153<br />

Project and Sandbox Information and System Settings. . . . . . . . . . .153<br />

Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .153<br />

Deleting Variant Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158<br />

Cleaning Up Working Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .159<br />

Encrypting Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160<br />

Automatic Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160<br />

Explicit Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .160<br />

Choosing an Encryption Key. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .161<br />

Changing the Encryption Key. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162<br />

Working With Encryption . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .162<br />

Encryption and Other Applications . . . . . . . . . . . . . . . . . . . . . . . . . . .162<br />

iv <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Table of Contents<br />

6 Managing Archives and Revisions . . . . . . . . . . . . . . . 165<br />

Opening a Project’s Archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166<br />

Opening a Member’s Archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .166<br />

Creating Archives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .167<br />

Importing Archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .171<br />

Checking Out Revisions From Archives. . . . . . . . . . . . . . . . . . . . . . . . . . .172<br />

Checking Out by Revision Number or Label . . . . . . . . . . . . . . . . . . .173<br />

Checking Out by State Setting. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174<br />

Checking In Revisions to Archives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .174<br />

Checking In—Setting Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175<br />

Checking In—State Settings. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176<br />

Viewing and Editing Archive Information. . . . . . . . . . . . . . . . . . . . . . . . .176<br />

Viewing and Editing Revision Information . . . . . . . . . . . . . . . . . . . . . . . .178<br />

Viewing Revision Metadata With Archive Commands . . . . . . . . . .180<br />

Locked Revisions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .182<br />

Assigning Labels to Revisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183<br />

Viewing and Editing the Working File or Revision . . . . . . . . . . . . . . . . .184<br />

Promoting and Demoting a Revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185<br />

Locking Revisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187<br />

Unlocking Revisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187<br />

Deleting Revisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .189<br />

Comparing Revisions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .190<br />

Merging Revisions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192<br />

Logging Archive Transactions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .193<br />

Log File Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .194<br />

Cleaning Up Log Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .195<br />

Cleaning Up Working Files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .195<br />

Storing Binary Files in Reference Format . . . . . . . . . . . . . . . . . . . . . . . . . .196<br />

7 Using Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197<br />

Introduction to <strong>Source</strong> <strong>Integrity</strong> Extensions. . . . . . . . . . . . . . . . . . . . . . . .198<br />

<strong>The</strong> Project Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199<br />

<strong>The</strong> Archive Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .206<br />

Using the Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209<br />

Differences Between Extensions and <strong>Source</strong> <strong>Integrity</strong> . . . . . . . . . . . . . . .210<br />

Creating Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210<br />

Creating Sandboxes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212<br />

Microsoft Visual Basic 5.0 and 6.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214<br />

Creating a <strong>Source</strong> <strong>Integrity</strong> Project. . . . . . . . . . . . . . . . . . . . . . . . . . . .215<br />

Creating a Sandbox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216<br />

Checking Out Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216<br />

Checking In New Revisions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .217<br />

<strong>The</strong> Microsoft Visual C++ 6.0 Extension. . . . . . . . . . . . . . . . . . . . . . . . . . .218<br />

<strong>User</strong> <strong>Guide</strong> v


Table of Contents<br />

Creating a <strong>Source</strong> <strong>Integrity</strong> Project. . . . . . . . . . . . . . . . . . . . . . . . . . . .219<br />

Creating a Sandbox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219<br />

Checking Out Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219<br />

Checking in New Revisions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .220<br />

Using Microsoft Visual C++ 6.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221<br />

<strong>The</strong> Borland Delphi Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223<br />

Creating a <strong>Source</strong> <strong>Integrity</strong> Project. . . . . . . . . . . . . . . . . . . . . . . . . . . .224<br />

Creating a Sandbox. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225<br />

Checking Out Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225<br />

Checking Out Multiple Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226<br />

Checking In New Revisions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .226<br />

Checking In Multiple Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .227<br />

<strong>The</strong> Microsoft Windows Explorer Extension . . . . . . . . . . . . . . . . . . . . . . .227<br />

Creating an Archive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228<br />

Checking Out Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229<br />

Checking In New Revisions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229<br />

8 Building Projects With <strong>Source</strong> <strong>Integrity</strong> . . . . . . . . . . . 231<br />

Before You Build. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .232<br />

Creating a Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .233<br />

Building . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .234<br />

Object File Associations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235<br />

Template Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236<br />

Language Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236<br />

Conditional Expansion. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236<br />

@Depends. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237<br />

@Template . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237<br />

Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237<br />

Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239<br />

<strong>The</strong> Build Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239<br />

Templates and Configuration Language. . . . . . . . . . . . . . . . . . . . . . .240<br />

Templates and Variable Expansion . . . . . . . . . . . . . . . . . . . . . . . . . . .240<br />

9 Using the <strong>MKS</strong> Make Utility . . . . . . . . . . . . . . . . . . . . . 243<br />

Compatibility Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .244<br />

Getting the Right Make . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .244<br />

Search Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .245<br />

Changing Your Search Order . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .245<br />

Getting Started With <strong>MKS</strong> Make . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246<br />

Dependency of Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246<br />

Makefiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247<br />

Writing a Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248<br />

Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250<br />

vi <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Table of Contents<br />

More About Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250<br />

Running <strong>MKS</strong> Make. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .252<br />

Specifying Targets on the Command Line . . . . . . . . . . . . . . . . . . . . .252<br />

Using a Different Makefile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .252<br />

<strong>The</strong> Command Line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .253<br />

How Make Finds Its Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .254<br />

Using Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .256<br />

Macro Naming Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .258<br />

Defining Macros on the Command Line . . . . . . . . . . . . . . . . . . . . . . .259<br />

Nesting Macros in other Macros. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .259<br />

Modifying Macro Expansions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .261<br />

Controlling <strong>MKS</strong> Make . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265<br />

Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .265<br />

Special Target Directives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .267<br />

Special Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271<br />

How Make Finds Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .277<br />

Using Inference Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .281<br />

Metarules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282<br />

Suffix Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286<br />

More About Executing Recipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .288<br />

Regular Recipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .288<br />

Built-In Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289<br />

Group Recipes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289<br />

Control Macros Used With Group Recipes. . . . . . . . . . . . . . . . . . . . .290<br />

Text Diversions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .291<br />

Making Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .293<br />

Metarules for Library Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294<br />

Suffix Rules for Library Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .295<br />

Compatibility Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296<br />

Conditionals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .296<br />

Other Makes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .298<br />

Using the Generic CC Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .302<br />

Compilation Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . .302<br />

Using CC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303<br />

Generic Command-line Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303<br />

Examples of Use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304<br />

Problem Solving . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304<br />

Without a Makefile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304<br />

Simple Makefile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305<br />

Separate Object Directory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305<br />

<strong>MKS</strong> Make and <strong>Source</strong> <strong>Integrity</strong>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .306<br />

Using a Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .306<br />

Recursive Makes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307<br />

Clean-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307<br />

<strong>User</strong> <strong>Guide</strong> vii


Table of Contents<br />

Back-up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308<br />

Default Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308<br />

Miscellaneous Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .309<br />

10 Starting a Change <strong>Integrity</strong> Session . . . . . . . . . . . . . . 311<br />

Change <strong>Integrity</strong> Concepts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312<br />

Issues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312<br />

Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312<br />

<strong>User</strong> . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312<br />

Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313<br />

Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313<br />

Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313<br />

Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313<br />

Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .313<br />

Before You Start a Change <strong>Integrity</strong> Session . . . . . . . . . . . . . . . . . . . . . . .314<br />

Starting a Change <strong>Integrity</strong> Session. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .314<br />

Logging In . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .314<br />

<strong>The</strong> Change <strong>Integrity</strong> Graphic <strong>User</strong> Interface . . . . . . . . . . . . . . . . . . . . . .317<br />

<strong>The</strong> Application Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .317<br />

<strong>The</strong> Change <strong>Integrity</strong> Web Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .320<br />

Setting Session Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321<br />

Email Notification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323<br />

Saving Session Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .327<br />

Ending a Change <strong>Integrity</strong> Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .328<br />

Logging Out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .328<br />

Closing a Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .328<br />

11 Submitting Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 331<br />

Submitting an Issue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .332<br />

Relating an Issue With a Submitted Issue . . . . . . . . . . . . . . . . . . . . . .335<br />

Adding Attachments to an Issue . . . . . . . . . . . . . . . . . . . . . . . . . . . . .340<br />

12 Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349<br />

Creating a New Query. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .350<br />

Creating Saved Queries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .354<br />

Reverting a Saved Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356<br />

Deleting a Saved Query . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356<br />

Viewing and Editing Saved Query Properties . . . . . . . . . . . . . . . . . .357<br />

Running Queries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .359<br />

13 Viewing and Editing Issues . . . . . . . . . . . . . . . . . . . . . 363<br />

Viewing Query Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364<br />

viii <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Table of Contents<br />

Selecting Issues to View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .367<br />

Printing Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371<br />

Saving Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373<br />

Editing Issues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .376<br />

Batch Editing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377<br />

14 Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385<br />

Change <strong>Integrity</strong> Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .386<br />

Creating Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .386<br />

Editing Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .393<br />

Running Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .395<br />

Deleting Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .397<br />

Copying Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .398<br />

Saving and Printing Reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .400<br />

Saving Reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .400<br />

Printing Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .401<br />

15 Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405<br />

Change <strong>Integrity</strong> Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .406<br />

Creating Distribution Charts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .407<br />

Creating Trend Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .417<br />

Editing Existing Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .427<br />

Running Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .428<br />

Deleting Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .431<br />

Copying Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .432<br />

Saving and Printing Charts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .433<br />

Saving Charts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .434<br />

Printing Charts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .434<br />

16 Integrated Version Control . . . . . . . . . . . . . . . . . . . . . . 437<br />

Configuring Change <strong>Integrity</strong> Connect . . . . . . . . . . . . . . . . . . . . . . . . . . .438<br />

Associating Active Issues With Project Members . . . . . . . . . . . . . . . . . . .441<br />

Viewing Change Packages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .442<br />

A Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445<br />

<strong>Source</strong> <strong>Integrity</strong> Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .445<br />

Change <strong>Integrity</strong> Terms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .454<br />

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 457<br />

<strong>User</strong> <strong>Guide</strong> ix


Table of Contents<br />

x <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Welcome to<br />

<strong>Source</strong> <strong>Integrity</strong><br />

<strong>Professional</strong> <strong>Edition</strong><br />

1<br />

<strong>Source</strong> <strong>Integrity</strong> is a comprehensive, project-oriented configuration<br />

management system that gives you control over the evolution of your<br />

files. It not only documents the changes made to your files, but also<br />

tracks who made them, when they were made, and the reasons why.<br />

In addition, its project functionality lets you group related files into<br />

projects that can follow your development cycle. <strong>Source</strong> <strong>Integrity</strong><br />

includes extensive configuration options to provide configuration<br />

management that conforms with your established policies.<br />

As part of <strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>, Change<br />

<strong>Integrity</strong> integrates with <strong>Source</strong> <strong>Integrity</strong>, to give you a highly<br />

customizable issue-tracking, software change management, and team<br />

management tool. Change <strong>Integrity</strong> helps your development team<br />

capture and track all the data related to software change, which is<br />

particularly important when your organization has implemented a<br />

Software Configuration Management (SCM) process for the proposal,<br />

review, and approval of all software changes on your project.<br />

Whether you work on one-person projects, or in multipleprogrammer<br />

development environments, <strong>Source</strong> <strong>Integrity</strong><br />

<strong>Professional</strong> <strong>Edition</strong> has the features to help you get the job done. Its<br />

function set and project-oriented architecture are available in both<br />

command-line and graphical user interfaces.<br />

<strong>User</strong> <strong>Guide</strong> 1


Welcome to <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong><br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong><br />

<strong>User</strong> <strong>Guide</strong><br />

This manual is designed to provide users with an overview of<br />

configuration management and problem tracking and how they can<br />

use <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong> to implement these<br />

principles in their environment. For the purposes of this manual, a<br />

user is considered to be anyone who needs to work with <strong>Source</strong><br />

<strong>Integrity</strong> or Change <strong>Integrity</strong> projects.<br />

This chapter introduces you to the <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong><br />

<strong>User</strong> <strong>Guide</strong> and its contents. <strong>The</strong> following is a list of the book’s other<br />

chapters with a brief description of each chapter’s topic:<br />

Chapter 2: “Understanding <strong>Source</strong> <strong>Integrity</strong>” (page 5)<br />

Discusses basic concepts of software configuration management,<br />

and how they are implemented within <strong>Source</strong> <strong>Integrity</strong>.<br />

Chapter 3: “Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces”<br />

(page 39)<br />

Provides an introduction to the three main interfaces to <strong>Source</strong><br />

<strong>Integrity</strong>: the Windows interface, the <strong>Source</strong> <strong>Integrity</strong> Web<br />

interface, and the command line interface.<br />

Chapter 4: “Getting Started With Projects, Sandboxes, and<br />

Members” (page 65)<br />

Describes how to create projects and sandboxes, and work with<br />

members. Explains tasks in each of the three main <strong>Source</strong><br />

<strong>Integrity</strong> interfaces.<br />

Chapter 5: “Managing Projects and Sandboxes” (page 133)<br />

Describes how to manages projects as a whole, explaining<br />

commands in all three main interfaces.<br />

Chapter 6: “Managing Archives and Revisions” (page 165)<br />

Describes how to manage your <strong>Source</strong> <strong>Integrity</strong> archives directly,<br />

without using projects.<br />

Chapter 7: “Using Extensions” (page 197)<br />

Explains how to integrate <strong>Source</strong> <strong>Integrity</strong> with a number of<br />

popular programming platforms.<br />

Chapter 8: “Building Projects With <strong>Source</strong> <strong>Integrity</strong>”<br />

(page 231)<br />

Explains how to use <strong>Source</strong> <strong>Integrity</strong>’s build features.<br />

2 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong> <strong>User</strong> <strong>Guide</strong><br />

Chapter 9: “Using the <strong>MKS</strong> Make Utility” (page 243)<br />

Explains how to use <strong>Source</strong> <strong>Integrity</strong>’s MAKE utility.<br />

Chapter 2: “Starting a Change <strong>Integrity</strong> Session” (page 5)<br />

Provides an overview of important Change <strong>Integrity</strong> concepts,<br />

logging in to Change <strong>Integrity</strong>, the Change <strong>Integrity</strong> graphic user<br />

interface, the Change <strong>Integrity</strong> Web interface, setting session<br />

preferences, logging out, and exiting a Change <strong>Integrity</strong> session.<br />

Chapter 3: “Submitting Issues” (page 25)<br />

Discusses how to submit new issues.<br />

Chapter 4: “Queries” (page 43)<br />

Describes how you can query the Change <strong>Integrity</strong> database for<br />

issue types that meet specific criteria.<br />

Chapter 5: “Viewing and Editing Issues” (page 57)<br />

Describes how to view issues and edit issue information.<br />

Chapter 6: “Reports” (page 79)<br />

Discusses how to create, edit, and generate reports from issue<br />

data.<br />

Chapter 7: “Charts” (page 99)<br />

Discusses how to create, edit, and generate charts from issue<br />

data.<br />

Chapter 8: “Integrated Version Control” (page 131)<br />

Describes using Change <strong>Integrity</strong> to activate issues for use in<br />

<strong>Source</strong> <strong>Integrity</strong>, configuring Change <strong>Integrity</strong> Connect in <strong>Source</strong><br />

<strong>Integrity</strong>, and associating active issues with project members in<br />

<strong>Source</strong> <strong>Integrity</strong>.<br />

Appendix A: “Glossary” (page 445)<br />

A glossary of common terms and definitions for <strong>Source</strong> <strong>Integrity</strong><br />

and Change <strong>Integrity</strong>.<br />

<strong>User</strong> <strong>Guide</strong> 3


Welcome to <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong><br />

Typographical<br />

Conventions<br />

Related<br />

Documentation<br />

Throughout the manuals, the following typographical conventions<br />

identify the features, functions and components of <strong>Source</strong> <strong>Integrity</strong><br />

<strong>Professional</strong> <strong>Edition</strong>.<br />

Items in documentation Appear as follows<br />

Menu items, nested menu items Edit > Role<br />

Drop-down menus the Archive menu item<br />

Dialog boxes, features Edit Options, Cancel, OK<br />

Command-line commands pj ci<br />

Screen information, messages Enter a name for this<br />

development path:<br />

Environment variables TMPDIR<br />

Path names c:\srcint\work<br />

<strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong><br />

<strong>Edition</strong> terms<br />

appear in italics the first time<br />

Keyboard keys appear in bold between angle<br />

brackets, for example: <br />

Procedures for the Windows<br />

interface, graphic user interface,<br />

Web interface, and Command-Line<br />

interface<br />

<strong>The</strong> <strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong> Reference <strong>Guide</strong> provides<br />

information on <strong>Source</strong> <strong>Integrity</strong> Configuration and <strong>MKS</strong> Make, and<br />

includes the manual pages for both the <strong>Source</strong> <strong>Integrity</strong> commandline<br />

interface and <strong>MKS</strong> Make.<br />

<strong>The</strong> <strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong> Administrator <strong>Guide</strong><br />

provides information on installing, configuring, and administrating<br />

<strong>Source</strong> <strong>Integrity</strong> and Change <strong>Integrity</strong> at your site.<br />

<strong>The</strong> <strong>MKS</strong> Change <strong>Integrity</strong> Solutions <strong>Guide</strong> recommends ways of<br />

configuring Change <strong>Integrity</strong> to best suit your development<br />

processes.<br />

You can access online help from within the <strong>Source</strong> <strong>Integrity</strong> Windows<br />

interface and Change <strong>Integrity</strong> graphic user interface; and through<br />

the <strong>Source</strong> <strong>Integrity</strong> Web interface and Change <strong>Integrity</strong> Web<br />

interface. You can access online man pages for <strong>Source</strong> <strong>Integrity</strong> from<br />

the command line interface.<br />

4 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Understanding <strong>Source</strong><br />

<strong>Integrity</strong><br />

2<br />

This chapter describes basic concepts of configuration management<br />

and how these concepts are applied within <strong>Source</strong> <strong>Integrity</strong>. If you<br />

are unfamiliar with configuration management or revision control<br />

applications, you should read this chapter.<br />

This chapter covers the following topics:<br />

what is configuration management<br />

configuration management concepts<br />

<strong>Source</strong> <strong>Integrity</strong> basics<br />

understanding projects<br />

understanding archives<br />

understanding sandboxes<br />

security and administration<br />

managing development<br />

<strong>User</strong> <strong>Guide</strong> 5


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

What Is Configuration Management?<br />

Configuration management supports developers who create, revise,<br />

and deliver large amounts of interrelated source material that<br />

changes over time.<br />

Developers can include primary software developers, quality<br />

assurance specialists, and others who work with source material. This<br />

source material is usually source code, header or script files, thirdparty<br />

libraries, documentation, graphic files, or other included<br />

resources.<br />

An effective configuration management tool has to address all the<br />

revision-control needs of the development team. Such a tool should<br />

preserve the evolving revisions of source code and resource files<br />

define relationships between the files and the other components<br />

needed to build applications<br />

retrieve previous versions of files, application components, or<br />

entire applications<br />

To enhance the management of the overall project, it should also<br />

protect work in progress from inadvertent loss or overwriting<br />

reduce duplication of effort<br />

isolate work in progress from the testing environment<br />

provide analytical capabilities (it should provide reports to help<br />

managers assess and control the flow of work during the<br />

development cycle)<br />

take advantage of system security facilities to protect valuable<br />

data<br />

encourage a responsible and disciplined approach to<br />

implementing change<br />

allow a managed product-release strategy<br />

reduce maintenance costs by simplifying or automating the<br />

replication of any previous release state<br />

6 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> Role of Configuration Management<br />

Managing<br />

Constant<br />

Change<br />

<strong>The</strong> Cost of<br />

Change<br />

<strong>The</strong> Role of Configuration Management<br />

In today’s competitive software world, developers need to be able to<br />

bring robust, maintainable products to market in a timely way.<br />

Consequently, they need to establish an environment that encourages<br />

disciplined development practices and managed propagation of<br />

change.<br />

In an industry where post-implementation maintenance accounts for<br />

a significant portion of product costs, anything that reduces the<br />

maintenance burden can provide a significant competitive edge.<br />

From the outset, virtually every software development project tries to<br />

hit a moving target, and the need to manage the resulting change<br />

constructively is paramount. For instance, consider a typical project.<br />

Initial designs are modified to accommodate the needs of<br />

implementation, user requirements, and new hardware<br />

platforms.<br />

Maintenance and additional release schedules are based on—and<br />

require changes to—source code and resources produced in the<br />

implementation phase.<br />

No one expects software products to be carved in stone. Pressures<br />

from users and the marketplace mean that every software project is<br />

an ongoing process of upgrade, modification, and maintenance.<br />

<strong>The</strong> issue today is not whether this trend can—or should—be<br />

reversed, but how well it can be managed. <strong>The</strong> challenge is to<br />

minimize its negative impact and attempt to turn it to competitive<br />

advantage.<br />

Undisciplined software development can have an enormous price<br />

tag. Duplication of effort, propagation of changes in “free-fire”<br />

development zones, and constantly changing construction<br />

environments all add to the cost of software production.<br />

Consider two scenarios that are common at software development<br />

sites.<br />

<strong>User</strong> <strong>Guide</strong> 7


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

<strong>Source</strong> Changes<br />

A bug report is issued against a released product, but a check of the<br />

latest source code reveals no obvious reason for the problem. It is<br />

known that the product in the field was built from an earlier release<br />

of the code, but the precise configuration of code and resource<br />

modules used in the release cannot be reproduced.<br />

To make matters worse, the source code currently under<br />

development cannot be shipped as a fix because it is still in a<br />

prerelease state. <strong>The</strong> only way to solve the problem is to take time<br />

and resources away from current development to produce and<br />

distribute an expensive patch.<br />

Environmental Changes<br />

A programmer spends several weeks writing a program. It runs<br />

successfully in the development environment, but when it is turned<br />

over to the product team for integration into a new release it<br />

immediately fails all tests in the product environment.<br />

As a result, both time and money are lost trying to discover the<br />

difference between the programmer’s and the product team’s<br />

development environments.<br />

<strong>The</strong> problems in these scenarios are all too common in the software<br />

industry: companies are unable to replicate previous states of source<br />

code and resources, and efficiency is degraded due to changes in the<br />

development environment. <strong>The</strong> result is wasted time and money.<br />

Common Development Problems<br />

Development problems can occur for a number of reasons.<br />

Two programmers may be working on different modules of the<br />

same set of source-code files, each unaware of the other. When<br />

one programmer finishes a fix and tries a test build, he or she<br />

picks up the incomplete file that the other programmer is<br />

working on and the build fails.<br />

Time is spent debugging a problem that has nothing to do with<br />

the work done by the first programmer.<br />

A programmer alters a fundamental resource file—such as a C<br />

header—resulting in unexpected changes that ripple across the<br />

entire application.<br />

<strong>The</strong> configuration of source files used to build product releases is<br />

not easily replicable when post-release maintenance is needed.<br />

8 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Managing<br />

Change<br />

Implementing<br />

Change<br />

<strong>The</strong> Role of Configuration Management<br />

<strong>The</strong> tools used to build an application are not maintained as part<br />

of the release, along with the source code and resource files.<br />

Libraries are often a culprit here, as are preprocessor scripts or<br />

build scripts, which are modified for current releases and no<br />

longer work for earlier ones.<br />

All of these problems are related to the way source code is<br />

maintained and how product configuration is managed. <strong>The</strong>y<br />

demonstrate poor management practices and a lack of discipline in<br />

the way many organizations develop and maintain software<br />

applications.<br />

Configuration management is the key to streamlining software<br />

development, reducing costs, and increasing the efficiency and<br />

profitability of the process.<br />

A successful configuration management system does more than track<br />

a development project’s structure and contents. It also encourages<br />

and supports healthy practices during all phases of the development<br />

cycle: design, implementation, testing, and maintenance.<br />

At its heart, a configuration management system is a comprehensive<br />

approach to software development that addresses<br />

how the environment is configured (its directory structures and<br />

file distribution, for example)<br />

how programmers work in the development environment (for<br />

instance, their revision management, locking, and promotion<br />

practices)<br />

how discipline is encouraged and how management objectives<br />

are supported throughout the development cycle<br />

In an industry that takes pride in its own creativity, the mention of<br />

discipline or management controls can send people running for<br />

cover. This type of response, however, has led to many of the<br />

problems and bad work habits in the realm of software development.<br />

Discipline, thoughtfully instituted and supported by tools that make<br />

it easy to implement, can provide a well-structured work<br />

environment for managers and programmers alike.<br />

For programmers, it significantly reduces down time. It reduces<br />

time spent recreating previous development states, or time spent<br />

isolating themselves from other developers so that problems can<br />

be identified and corrected.<br />

<strong>User</strong> <strong>Guide</strong> 9


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

For managers, such discipline helps streamline the development<br />

cycle, allowing them to get products to market in a more timely—<br />

and therefore more profitable—manner.<br />

<strong>Source</strong> <strong>Integrity</strong> gives programmers and managers a comprehensive<br />

set of configuration management tools. <strong>The</strong>se tools are flexible<br />

enough to enforce the discipline required by management, and<br />

organized enough to free programmers from endless maintenance<br />

cycles. In short, these tools allow developers to concentrate on what<br />

they are really good at—the creative aspects of developing<br />

applications.<br />

Configuration Management Concepts<br />

Archives<br />

Revisions<br />

Traditional configuration management, and advanced configuration<br />

management systems such as <strong>Source</strong> <strong>Integrity</strong>, have evolved around<br />

a few commonly held concepts.<br />

Traditional source files, even in advanced file systems, do not lend<br />

any advantage to data that changes over time. A file contains one and<br />

only one version of data—if the data changes over time and you want<br />

to retain the changes, you need one file for each new version. <strong>The</strong>se<br />

files can be organized within folders or directories, but they are not<br />

directly interrelated.<br />

Configuration management systems like <strong>Source</strong> <strong>Integrity</strong> create<br />

archives to provide these enhancements. Archives are structures that<br />

store multiple revisions of a source file. <strong>The</strong>y can store many different<br />

types of user-supplied data and can efficiently store data between<br />

revisions that have not changed much. <strong>Source</strong> <strong>Integrity</strong> stores one<br />

archive file for each source file, but other systems use methods such<br />

as databases.<br />

Revisions are the basic unit of data placed under configuration<br />

management control. Each revision corresponds to the content of a<br />

source file at a particular instant in time. <strong>The</strong> collection of revisions of<br />

a particular source file is the archive for that source file. When a<br />

revision is extracted (or checked out) and changed, the new version<br />

(once it is checked in) becomes the next revision.<br />

10 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Branches<br />

Metadata<br />

<strong>Source</strong> <strong>Integrity</strong> Basics<br />

<strong>Source</strong> <strong>Integrity</strong> Basics<br />

Not all development is linear—different developers may want to take<br />

the same piece of source material in different directions.<br />

Configuration management systems like <strong>Source</strong> <strong>Integrity</strong> can branch<br />

an archive, to preserve a copy of the original content for each<br />

developer as they begin their individual work. Through the process<br />

of merging, those different branches can be selectively woven back<br />

together.<br />

Any information about the source material in question is metadata.<br />

Traditional file systems make little provision for metadata. Files<br />

commonly have a file name that can be less than informative.<br />

Systems keep timestamps and ownership information, but they do<br />

not traditionally keep comments for each file.<br />

With configuration management tools, you can assign plain-language<br />

comments to each revision of a source file, communicating to anyone<br />

who will use your revisions exactly what you changed. You can also<br />

assign arbitrary or prescribed labels or state descriptors.<br />

Configuration management tools can also add your identity (as an<br />

author) to the metadata, to preserve an audit trail.<br />

At its heart, any configuration management system must deal with<br />

two basic facts:<br />

Relationships exist between objects in the development<br />

environment.<br />

An object’s revision history must be tracked so that past versions<br />

of projects can be recreated.<br />

Once you understand that these key concepts are the core of your<br />

configuration management system, all the other pieces begin to fall<br />

into place.<br />

Related Objects Even the simplest development effort consists of multiple files that<br />

must come together to build a finished product, and the vast majority<br />

of today’s projects are far from simple. Finished applications consist<br />

of executables, libraries, resource and data files, help systems, and<br />

myriads of other components. Each component of an application may<br />

contain dozens of individual objects.<br />

<strong>User</strong> <strong>Guide</strong> 11


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

Changing<br />

States<br />

Often, the same files are shared by more than one component, and<br />

entire components may be part of several larger modules. <strong>Source</strong><br />

<strong>Integrity</strong>’s projects let you define development objects and the<br />

relationships among them. <strong>Source</strong> <strong>Integrity</strong> handles both simple and<br />

complex objects—files, components, modules, or complete<br />

applications—and automates the intricate weave of their<br />

relationships.<br />

What Are Development Objects?<br />

<strong>Source</strong> <strong>Integrity</strong> lets you define objects and establish their place in the<br />

development hierarchy at every stage of the development process.<br />

<strong>Source</strong> <strong>Integrity</strong> can help you organize your resources into<br />

meaningful, easy-to-manage units, so you can work with confidence<br />

in a stable environment. This ability to group objects into logically<br />

and functionally related projects, and to define relationships between<br />

objects, provides a foundation for good development practices.<br />

If building a software application were like building a house, <strong>Source</strong><br />

<strong>Integrity</strong>’s archives and projects—the building blocks—would be all<br />

you would need. But software development is not a static process.<br />

Imagine trying to build a house when the bricks and timbers keep<br />

changing shape.<br />

Unlike bricks and timbers, the objects used in software applications<br />

change over time: files are updated and code modules are expanded<br />

or broken down into smaller components. Software building blocks<br />

change even after they are put into place.<br />

Dealing With Constant Change<br />

<strong>Source</strong> <strong>Integrity</strong> handles this problem by letting you take “snapshots”<br />

of any object at every stage of its development. This snapshot—or<br />

revision—then becomes a static building block that you use to build<br />

your application while the object continues to evolve.<br />

When a file or code module reaches a milestone, you can check in the<br />

object to preserve its current state as a revision. When you need that<br />

object to build your application or compile another module, it can be<br />

recreated automatically, in precisely the same state as it was saved.<br />

Using this technique, different revisions of the same object (that is,<br />

the same object in different states) can be used to build various<br />

components of an application. You can recreate components—or an<br />

entire product release—if post-release fixes become necessary.<br />

12 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Understanding Projects<br />

Logical and<br />

Functional<br />

Structures<br />

Understanding<br />

Archives<br />

Understanding Projects<br />

With <strong>Source</strong> <strong>Integrity</strong>, you can control the granularity of your<br />

development process. <strong>Source</strong> <strong>Integrity</strong>’s projects let you define<br />

complex development objects and the relationships among them.<br />

Individual files represent the development object at its lowest level.<br />

However, modern software development’s size and complexity make<br />

it impractical to manage at this level. Instead, <strong>Source</strong> <strong>Integrity</strong> takes<br />

another approach.<br />

<strong>Source</strong> <strong>Integrity</strong>’s approach to configuration management lets you<br />

modularize your development effort. It lets you create logically and<br />

functionally related subprojects that come together to build a finished<br />

application. Every unit—or subproject—in the hierarchy is a<br />

development object that can be managed either individually or<br />

relative to the other objects it interacts with.<br />

You can determine the number, size, and complexity of the<br />

objects you work with.<br />

You can define the relationships between development objects.<br />

You can shape the project to address the management<br />

requirements at your site.<br />

<strong>The</strong>re are two key issues to consider when you decide on the best<br />

structure for your projects:<br />

the functional structure, the directory trees where files reside<br />

the logical structure of the <strong>Source</strong> <strong>Integrity</strong> project<br />

Ideally, these two structures should be identical. <strong>The</strong> physical<br />

organization of stored files—the project’s directory tree—should<br />

reflect the logical relationships among files. Except for very small<br />

projects, however, this ideal is almost never achieved. Usually, as a<br />

project grows, new files and modules are added until the internal<br />

relationship among components becomes too varied and complex to<br />

be accurately reflected by the project’s directory tree.<br />

A <strong>Source</strong> <strong>Integrity</strong> archive is the “place” where revisions (snapshots of<br />

an object’s state at a particular point in time) are preserved. Any<br />

development object can have an archive where revisions of itself are<br />

stored, and from which they can be retrieved at any time. It is this<br />

ability to save and recreate every development object—at any stage of<br />

its development—that makes <strong>Source</strong> <strong>Integrity</strong> so effective as a<br />

configuration management tool.<br />

<strong>User</strong> <strong>Guide</strong> 13


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

About Archives<br />

Archives and revisions are fully integrated with <strong>Source</strong> <strong>Integrity</strong><br />

projects. When you add an archived object to a project, you add a<br />

specific revision of the object, not the entire development object, which<br />

might contain dozens or hundreds of different snapshots of itself.<br />

Once the object becomes a project member, the project and object<br />

automatically maintain their relationship: you can freeze the project<br />

or the revision so only that particular revision will ever be used, or<br />

you can track the archive and update the member whenever a newer<br />

revision is available.<br />

Because archives store development objects, you can have them at<br />

any level of your development hierarchy. You can archive<br />

individual files<br />

entire projects consisting of any number of files and subprojects<br />

No matter how simple or complex your objects are, you can save<br />

snapshots of them in an archive and reproduce them—accurately and<br />

reliably—whenever they are needed.<br />

Archives provide the underlying storage structure for <strong>Source</strong><br />

<strong>Integrity</strong>. <strong>The</strong>y contain your source files and the changes you make to<br />

them. Archives also contain detailed information, or metadata, about<br />

your files and their change history.<br />

About Archive Structure<br />

A new archive contains<br />

Archive Information<br />

Information about the archive itself (for example, the archive<br />

description).<br />

<strong>The</strong> first revision of your working file. <strong>The</strong> content of the file you<br />

checked in.<br />

Revision Information<br />

Information about the revision (for example, the revision number<br />

and the name of the person who has it locked).<br />

<strong>The</strong> new archive can be represented graphically, as the following<br />

illustration on the left shows. As you continue to work with your files<br />

and add more revisions to the archive, it develops a structure much<br />

like the trunk of a tree.<br />

Each new revision adds to the line of revisions, as the illustration on<br />

the right shows.<br />

14 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


This main line of revisions is<br />

referred to as the trunk of the<br />

archive.You can also add<br />

branches to the archive to take<br />

the content in a different<br />

direction.<br />

What Happens<br />

at Check-in<br />

Time?<br />

Understanding Projects<br />

When <strong>Source</strong> <strong>Integrity</strong> creates an archive for a source file, it performs<br />

the following steps:<br />

creates a new archive file<br />

adds a revision to the archive and assigns it a unique revision<br />

number (usually number 1.1)<br />

copies the original file into the new revision<br />

During subsequent check-ins to the archive, <strong>Source</strong> <strong>Integrity</strong> does<br />

things slightly differently. <strong>Source</strong> <strong>Integrity</strong><br />

creates a new revision and assigns it a unique revision number<br />

(for example, revision 1.2)<br />

copies the working file into the new revision<br />

compares the new revision (revision 1.2) with the previous<br />

revision (revision 1.1) and calculates the differences between<br />

them<br />

replaces the contents of the previous revision (revision 1.1) with<br />

the differences between it and the newer revision.<br />

<strong>The</strong> list of differences between a revision and its immediate ancestor<br />

is called a delta. An archive usually contains a complete copy of the<br />

latest revision and all of the deltas required to reconstruct earlier<br />

revisions. An archive can also be made up of complete copies of each<br />

revision if you choose to configure the system that way.<br />

<strong>User</strong> <strong>Guide</strong> 15


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

Storing Deltas<br />

When <strong>Source</strong> <strong>Integrity</strong> performs a check-in operation, it calculates<br />

and stores the delta between the new revision and the previous one in<br />

the archive.<br />

For instance, in the situation described earlier, revision 1.1 (that is, the<br />

first revision checked in) now contains a complete description of the<br />

changes that must be made to revision 1.2 to rebuild revision 1.1. This<br />

list of changes, the delta, is the key to understanding how archives<br />

store revisions and rebuild working files on demand.<br />

To check out revision 1.1, <strong>Source</strong> <strong>Integrity</strong><br />

reads the list of differences (that is, the delta) it contains<br />

applies the changes to revision 1.2., rebuilding a duplicate of the<br />

original revision 1.1<br />

copies the revision to a working file<br />

Using this technique, <strong>Source</strong> <strong>Integrity</strong> can recreate any revision<br />

without having to store complete copies. Usually, if you save only the<br />

changed portion of each revision, the archive will be much smaller<br />

than if the entire file were saved each time. <strong>The</strong>re are situations when<br />

this may not be the case; if you are storing binary files in an archive, a<br />

complete copy of each revision is stored by default (see “Storing<br />

Entire File” next).<br />

When <strong>Source</strong> <strong>Integrity</strong> compares the file being checked in to the<br />

preceding revision in the archive, it compares the two files line by<br />

line. While this is a logical—and efficient—way to handle text files, it<br />

is not always effective with binary files, since a relatively small<br />

change at the beginning of a binary file can displace all subsequent<br />

characters in the file, cascading changes through all remaining lines.<br />

As a consequence, the record of changes (that is, the delta) for some<br />

binary files may be as large as, or larger than, the file itself. For this<br />

reason, <strong>Source</strong> <strong>Integrity</strong> provides a number of configurable<br />

techniques for checking in files.<br />

Storing Changes Only<br />

With this method, <strong>Source</strong> <strong>Integrity</strong> calculates and stores a delta for<br />

each revision of a file when it is checked in. This is the default and<br />

recommended method for checking in text files. You can use this<br />

method for storing binary files, but <strong>MKS</strong> does not recommend it.<br />

16 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Branches and<br />

Trunks<br />

Storing Entire File<br />

Understanding Projects<br />

With this method, <strong>Source</strong> <strong>Integrity</strong> does not calculate deltas, but still<br />

stores all of the revisions of the file in one archive.<br />

This is the default and recommended method for checking in binary<br />

files.<br />

Storing Entire File by Reference<br />

With this method, <strong>Source</strong> <strong>Integrity</strong> does not calculate differences<br />

between a file and the current revision. Instead, <strong>Source</strong> <strong>Integrity</strong> uses<br />

the Reference format. In the Reference format, the archive file only<br />

contains a summary of each revision with a pointer to a file that<br />

contains that revision. Although this method requires more disk<br />

space to store archives, it improves performance when checking large<br />

binary files in or out of a project.<br />

Note You can choose Store Changes Only or Store Entire File for both<br />

text and binary files on the Checkin tab of the Personal Configuration<br />

dialog box. You can choose Store By Reference for an individual archive<br />

using the Archive Information dialog box.<br />

<strong>The</strong> original development path of your project is also called the trunk,<br />

and its most recent revision is called the head revision. If you check out<br />

the head revision, modify it, and check it back in, <strong>Source</strong> <strong>Integrity</strong><br />

places a new revision at the top of the trunk, making it the new head<br />

revision.<br />

To move away from the main development path by creating a new<br />

path, you check out, modify, and check in a revision that is not the<br />

head revision. When you check it back in, by default, <strong>Source</strong> <strong>Integrity</strong><br />

will suggest that you create a branch; your new revision will now be<br />

the tip of the branch.<br />

A branch is an independent revision line that uses an existing<br />

revision as its starting point. Branches have several uses. You may be<br />

pursuing a line of development that will not be included in the<br />

finished product or may need to create a branch to perform postrelease<br />

maintenance on an earlier revision.<br />

Revisions on the trunk are characterized by two-part revision<br />

numbers (for example, 1.2 or 3.5), and branch revision numbers are<br />

prefixed with the number of the revision they start from (that is, the<br />

root revision).<br />

<strong>User</strong> <strong>Guide</strong> 17


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

Branching the archive permits<br />

development to continue<br />

unhindered on the trunk.<br />

Contrast the branched<br />

structure, previous<br />

illustration, with the nonbranched<br />

structure.<br />

If a branch is started from trunk revision number 1.2, the revisions of<br />

the branch are numbered (from bottom to top)<br />

1.2.1.3<br />

1.2.1.2<br />

1.2.1.1<br />

and so on. <strong>The</strong> first two digits of the number identify the root revision<br />

the branch springs from; the last two represent a revision on the<br />

branch.<br />

Starting a Branch<br />

<strong>Source</strong> <strong>Integrity</strong> always tries to build the revision tree vertically by<br />

adding a new level every time you check in a file.<br />

When you check in a revision that is not a tip revision, <strong>Source</strong><br />

<strong>Integrity</strong> assumes it should create a branch for the new revision,<br />

because there is already a revision in place above it.<br />

18 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Branching occurs when you<br />

check in a revision that is not<br />

at the top of the revision tree.<br />

Understanding Projects<br />

Replacing an existing revision or inserting a new revision between<br />

two existing ones would alter the archive’s change history—this<br />

behavior would undermine the entire process of revision control and<br />

is therefore not allowed.<br />

Revision Number, Branch Number, Branch Level<br />

<strong>The</strong> revision number is the particular number of a revision. It is<br />

composed of branch.version pairs.<br />

<strong>Source</strong> <strong>Integrity</strong> considers the revision number without the last dot<br />

and digits to be the branch number. As well, the branch level is the<br />

“degree of removal” from the trunk. <strong>The</strong> following table shows the<br />

relationship between revision numbers, branch numbers, and branch<br />

levels.<br />

Example Revision Number Branch Number Branch Level<br />

1.3 1 0<br />

1.9.2.3 1.9.2 1<br />

1.11.2.4.1.1 1.11.2.4.1 2<br />

Example<br />

If you make four revisions to a source file named prog.c, <strong>Source</strong><br />

<strong>Integrity</strong> records revision 1.1 (the original revision), 1.2, 1.3, and 1.4.<br />

This is the trunk of the archive.<br />

If you need to work from revision 1.2 and make some new changes,<br />

trying to check in the result will branch the archive, as our new<br />

changes cannot replace the existing revision 1.3. <strong>Source</strong> <strong>Integrity</strong><br />

creates revision 1.2.1.1 for our changes to 1.2.<br />

<strong>User</strong> <strong>Guide</strong> 19


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

<strong>The</strong>re is no limit to the<br />

number of branches you can<br />

create in an archive. You can<br />

even have multiple branches<br />

stemming from the same<br />

revision.<br />

Checkpointing<br />

Your Project<br />

<strong>The</strong> number of the branch created in the prog.c archive is 1.2.1 (since<br />

it stems from revision 1.2 and it is the first branch from that revision).<br />

<strong>The</strong> branch level of the 1.2.1 branch is 1, because it is one level<br />

removed from the trunk (0). You could create a second branch from<br />

revision 1.2 in the prog.c archive by repeating the steps you used to<br />

create the first one.<br />

Default Branch<br />

Each archive has a default branch. <strong>Source</strong> <strong>Integrity</strong> tries to check in<br />

files as revisions along this branch, unless you explicitly specify a<br />

revision number. <strong>The</strong> default branch is the trunk of the archive, until<br />

changed by the user.<br />

When your project has reached a significant milestone, you should<br />

save the state of the project and all of its components so you can<br />

recreate it later if need be. In <strong>Source</strong> <strong>Integrity</strong>, this is called a<br />

checkpoint. When you checkpoint a project, you create an archive for<br />

your project file and check it in. Since the project file contains your<br />

project’s directory structure and the list of members with their<br />

revision numbers, you can recreate the project as it existed at the time<br />

of the checkpoint.<br />

Some users checkpoint at the end of each day or week, while others<br />

wait until their work has reached a desired level of stability.<br />

20 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Sandboxes<br />

<strong>The</strong> directory structure in the<br />

illustration is typical, although<br />

most projects will be much<br />

more complex, consisting of<br />

dozens of directories and<br />

hundreds (or thousands) of<br />

files.<br />

Sandbox Files<br />

Sandboxes<br />

<strong>The</strong> typical directory structure of a software development project will<br />

look something like the illustration below. Problems can occur in<br />

such structures when multiple users are active in a common<br />

workspace. For example, if two programmers need to make changes<br />

to a module, one has to wait until the other is finished.<br />

Consider programmers working in the traditional “free-fire zone.”<br />

<strong>The</strong>re are obvious problems associated with an environment where<br />

all developers work in the same directory tree.<br />

It is easy to accidentally overwrite somebody else’s changes.<br />

<strong>The</strong>re are no safeguards to protect you from picking up another<br />

developer’s incorrect or incomplete changes.<br />

File access is restricted to one user at a time.<br />

Because all of these situations can mean loss of data and result in<br />

delays, <strong>Source</strong> <strong>Integrity</strong> offers a unique sandbox environment that<br />

can eliminate such collisions. Sandbox environments are private<br />

workspaces where individual programmers can work on projects<br />

outside the free-fire zone. <strong>The</strong>se separate workspaces allow<br />

developers to work more efficiently, without conflict with other users.<br />

When you use a sandbox, <strong>Source</strong> <strong>Integrity</strong> copies any or all of the<br />

project files into an identical directory tree on your local machine,<br />

where changes can be made and fixes tested. You can even test build<br />

an entire project in a sandbox, without interfering with work being<br />

done by other team members. When changes are completed and<br />

tested in the sandbox, you can check them back in to update the<br />

master project.<br />

<strong>User</strong> <strong>Guide</strong> 21


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

Sandboxes mirror the original<br />

project and provide a safe<br />

working environment.<br />

A Typical<br />

Workplace<br />

Scenario<br />

How Sandboxes<br />

Can Help<br />

Consider what could happen in a sample project if a customer<br />

encounters a bug in an earlier release that requires an immediate fix.<br />

In this example, the work is done in a free-fire zone and programmers<br />

need to examine the earlier revisions of affected NT and UNIX files.<br />

This process would halt any development on those files, due to<br />

file naming conflicts in the workspace.<br />

If the NT developer were to complete his or her work before the<br />

UNIX developer, neither could test the fix until both are<br />

complete, since a comprehensive build uses all files in the project.<br />

<strong>The</strong> result is that maintenance only progresses at the pace of the<br />

slowest component.<br />

If more than one iteration is required to complete either or both<br />

fixes, the time delay is further compounded.<br />

<strong>Source</strong> <strong>Integrity</strong> has designed the sandbox environment to deal with<br />

these potential conflicts. A sandbox is a personal workspace where<br />

changes can be made and tested on working copies of project<br />

members, independent of the master project. Sandboxes let each<br />

developer work on a shared project in a personal, protected<br />

workspace, without disrupting the master project or other<br />

developers.<br />

When work takes place using sandboxes, it presents a totally different<br />

picture. When sandboxes are used in the previous scenario, each<br />

developer makes a complete copy of the earlier release in a separate<br />

sandbox and works on the files he or she is responsible for.<br />

<strong>The</strong> developer who finishes first can test the fix in the sandbox—<br />

even build the entire project to make sure it functions as<br />

anticipated—then check the modified files back into the master<br />

project and continue with new development.<br />

22 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Once a <strong>Source</strong> <strong>Integrity</strong><br />

project has been created, you<br />

have the option of creating an<br />

associated sandbox. This<br />

sandbox includes a directory<br />

tree that mirrors the structure<br />

of the master project.<br />

Sandboxes<br />

When the second developer completes and tests changes, they<br />

too are checked into the master project. <strong>The</strong> buildmaster can<br />

make a new sandbox, and do a final build incorporating both sets<br />

of changes. <strong>The</strong> fix can then be shipped to the customer.<br />

When you execute a <strong>Source</strong> <strong>Integrity</strong> command in a sandbox, the<br />

action is redirected to the master project. <strong>Source</strong> <strong>Integrity</strong> can<br />

perform almost the entire range of project commands in the sandbox,<br />

as if it were in the master project. For example, if you check out a<br />

sandbox member, <strong>Source</strong> <strong>Integrity</strong> physically checks out the member<br />

from the master project, but copies the working file to the sandbox<br />

directory.<br />

In this way, you are assured of working with current data from the<br />

master project, with the knowledge that your work will not interfere<br />

with other users (or vice versa). This streamlines product<br />

maintenance, saving time, saving money, reducing delays to ongoing<br />

development, and increasing customer satisfaction.<br />

Within your sandbox, you can see if new updates are available in the<br />

master project. It is up to you to decide when and if you will pick up<br />

these changes in your sandbox. Thus, you are protected from a “freefire<br />

zone”, but still have the ability to coordinate with other users’<br />

work when it is convenient for you.<br />

<strong>User</strong> <strong>Guide</strong> 23


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

Variant<br />

Sandboxes and<br />

Development<br />

Paths<br />

Regular sandboxes are based upon the current or head revision of the<br />

project. You can also create a sandbox that is based upon a previous<br />

checkpointed revision of the project. This type of sandbox is called a<br />

variant. When you create a variant sandbox, you choose a checkpoint<br />

(snapshot) of your project and use it as a starting point for new<br />

development. <strong>Source</strong> <strong>Integrity</strong> allows you to do this by defining a<br />

new development path.<br />

A development path is an identifier given to a new direction of<br />

software development; it includes the new revision history created by<br />

<strong>Source</strong> <strong>Integrity</strong> as developers vary from a main project. Changes<br />

made through the development path are kept separate from the main<br />

development trunk unless you choose to merge them into it later.<br />

<strong>Source</strong> <strong>Integrity</strong> allows multiple developers to point to the same<br />

development path, each using their own variant sandbox. In the<br />

variant sandbox, you can see the current state of software along the<br />

development path and the changes made by other developers using<br />

it.<br />

When a variant sandbox is created for the first time, it is also created<br />

for all subprojects, reserving the assigned name as a unique identifier<br />

and ensuring no two paths can share the same name.<br />

Development paths are useful for performing post-release<br />

maintenance. Variant sandboxes pointing to a post-release<br />

development path allow you to make changes to a previous revision<br />

of a project. Any fixes, patches, or changes you check in go onto a<br />

branch and do not affect the main project, unless you choose to merge<br />

them.<br />

Example: Multiple Development Paths<br />

A team approach to development is shown in the following<br />

illustration. Three development teams work on the product. Each<br />

team is concerned with a slightly different aspect of getting the<br />

product to market and satisfying customer needs.<br />

24 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> labels in the illustration<br />

indicate milestones in the<br />

product’s development, rather<br />

than any particular revision<br />

number.<br />

Build<br />

Sandboxes<br />

Sandboxes<br />

Team one is composed of the developers who work on the main<br />

trunk of development. <strong>The</strong>ir concern is to create new features for<br />

the software and therefore to move from release 3.2 to release 3.3.<br />

This is considered the main development path.<br />

Team two, the beta team, must test the functionality of the<br />

product and prepare it for the beta trial. <strong>The</strong>y work with the same<br />

software, but just before the beta release, they must polish the<br />

beta product on their own and their objectives force them to<br />

diverge from the main path.<br />

Team three is the post-release maintenance team. <strong>The</strong>y want to<br />

change the functionality of a feature in the shipping version to<br />

satisfy a customer request, and then release a patch for the<br />

product.<br />

<strong>The</strong> teams all have slightly different goals for the software and each<br />

group needs to move the product in a different direction without<br />

affecting another team’s ability to work. Each team is following a<br />

different development path.<br />

After major milestones such as product releases, you might want to<br />

recreate a static version of an entire project as it existed at some point<br />

in the past. You use a build sandbox, as it is called, to build or test the<br />

project, not to begin further work along a new development path.<br />

A build sandbox is associated with a particular project revision, and<br />

has no development path (since it is static and not meant for further<br />

development).<br />

Within a build sandbox, you cannot<br />

check out, lock, or check in members<br />

<strong>User</strong> <strong>Guide</strong> 25


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

Locking in<br />

Variant<br />

Sandboxes<br />

remove or add members<br />

set the development path<br />

However, within a build sandbox, you can<br />

change labels and states<br />

resynchronize your sandbox<br />

compare a member revision in the build sandbox to another<br />

revision<br />

merge a member revision in the build sandbox with another<br />

revision (of course, you cannot check that merged file back into<br />

the build sandbox)<br />

query for differences between project revisions, such as changes<br />

to a project since it was last checkpointed<br />

calculate dependencies, but you cannot add dependent files to<br />

the project<br />

update sandbox attributes<br />

<strong>Source</strong> <strong>Integrity</strong> can manage access to source files by locking<br />

revisions in the name of developers who check them out. This<br />

provides a level of security, as it discourages two people from<br />

working on the same revision at the same time.<br />

When developers are following different development paths,<br />

however, this kind of security can become inconvenient. Two (or<br />

more) developers, working along different development paths, may<br />

want to lock the same revision for different purposes.<br />

Even though development paths are logically separate, <strong>Source</strong><br />

<strong>Integrity</strong> maintains one revision history for each source file, in a<br />

corresponding archive. A revision can only be checked out locked by<br />

one <strong>Source</strong> <strong>Integrity</strong> user. Conflicts can arise from this.<br />

Those working in variant sandboxes are forced to lock revisions<br />

that might be needed by developers working in standard<br />

sandboxes.<br />

Similarly, those following one development path would lock out<br />

those following a different path.<br />

To accommodate developers following different development paths,<br />

<strong>Source</strong> <strong>Integrity</strong> will suggest to branch an archive. It does this<br />

whenever a check-out operation would lock out other developers,<br />

who might need access to the revision.<br />

26 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Sandboxes<br />

<strong>The</strong> process starts with developers who use variant sandboxes. If you<br />

are using a variant sandbox, your check-out operations might cause<br />

conflict if you try to lock<br />

a revision in the main trunk of an archive (probably used by the<br />

main project and standard sandboxes)<br />

a revision on a branch that was created by others, working from a<br />

different development path<br />

<strong>Source</strong> <strong>Integrity</strong> will then suggest you start a branch from that<br />

revision. This creates a duplicate of the revision on a new branch. <strong>The</strong><br />

duplicate is locked in your name, allowing you to edit it freely.<br />

On the other hand, there is no perceived conflict when you want to<br />

use a revision on a branch created through your own development<br />

path. <strong>Source</strong> <strong>Integrity</strong> assumes locking is desirable between those<br />

who share your own development path.<br />

<strong>The</strong> process is repetitive: if users on another development path<br />

attempt to check out locked a revision from one of your resulting<br />

branches, they will in turn be encouraged to branch the archive again,<br />

to avoid locking you out of your revisions.<br />

This branching is not mandatory—you can opt to lock a (potentially<br />

conflicting) revision from within a variant sandbox. This amounts to<br />

crossing the invisible line between your development path and<br />

another path or the main project.<br />

For instance, if you have adopted a trunk revision as a member<br />

revision in an otherwise variant sandbox and you intend on checking<br />

in changes to the trunk, locking the revision on check-out is<br />

appropriate.<br />

If for some reason your branch needs to be integrated into the trunk,<br />

this can be accomplished by merging the tip revision of the branch<br />

and the head revision of the trunk (1.x) in a standard merge<br />

operation. This is normally done by a developer using a standard<br />

sandbox.<br />

Note Even if the head revision of an archive is not the member revision<br />

of your variant sandbox, <strong>Source</strong> <strong>Integrity</strong> will suggest to start a branch if<br />

you attempt to check out the head revision locked. This functionality is<br />

maintained for backward compatibility with previous versions of <strong>Source</strong><br />

<strong>Integrity</strong>.<br />

<strong>User</strong> <strong>Guide</strong> 27


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

Converting Old-<br />

Style Variant<br />

Sandboxes<br />

Example<br />

You have created a variant sandbox and a new development path,<br />

based on revision 1.3 of a project. Your sandbox represents an older<br />

version of the project, but you find you still need to make changes to<br />

the head revision, revision 1.5 of main.c. You check out locked<br />

revision 1.5 of main.c.<br />

<strong>Source</strong> <strong>Integrity</strong> will by default suggest to branch the main.c archive.<br />

It does this because you will otherwise lock other developers out of<br />

main.c, and your work is on a development path other than on the<br />

main path.<br />

If you accept the default, <strong>Source</strong> <strong>Integrity</strong> creates revision 1.5.1.1 of<br />

main.c. It copies revision 1.5 to 1.5.1.1, and checks out 1.5.1.1 locked<br />

in your name. You can make changes to the new revision, and check it<br />

back in as 1.5.1.2.<br />

Because <strong>Source</strong> <strong>Integrity</strong> branched the archive, other developers are<br />

not locked out of revision 1.5. <strong>The</strong>y can continue development<br />

unhindered.<br />

If you do not accept the default, you will acquire a lock on revision<br />

1.5 of main.c. You could make changes and check in revision 1.6.<br />

Variant sandboxes created in <strong>Source</strong> <strong>Integrity</strong> version 7.2 or earlier<br />

must be converted to work with later versions. This is a one-way<br />

process that makes the variant sandboxes incompatible with previous<br />

versions of <strong>Source</strong> <strong>Integrity</strong>.<br />

A command-line utility, cnvrnt72, is available to do the conversion<br />

automatically. You must have sufficient permissions in the Security<br />

and Administration Module (SAM) to perform the conversion:<br />

ModifyProject, ModifySandbox, and CreateSandbox. (For details<br />

on usage, see the cnvrnt72 manual page in the <strong>Source</strong> <strong>Integrity</strong><br />

<strong>Professional</strong> <strong>Edition</strong> Reference <strong>Guide</strong>.)<br />

28 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Metadata<br />

About Labels<br />

Metadata<br />

<strong>The</strong> most important conversion step is the establishment of a<br />

development path for the variant sandbox. This development path<br />

will begin at a new checkpoint in the master project.<br />

Note If a master project has other subprojects as members, then a<br />

sandbox based on it will have subsandboxes, individual sandbox files<br />

matching the same structure. cnvrnt72 converts the specified sandbox,<br />

and recursively converts all subsandboxes as well.<br />

Running cnvrnt72 on a subsandbox file will convert it and all of those<br />

below it, but cnvrnt72 cannot convert any sandbox files above it in the<br />

hierarchy. This will cause problems when using the sandbox, and when<br />

later trying to finish the conversion. You should run cnvrnt72 on the<br />

uppermost sandbox, that is, on the one that is not a subsandbox.<br />

<strong>Source</strong> <strong>Integrity</strong> maintains a variety of information about your<br />

development objects. This metadata can be used to monitor and<br />

manage projects, identify and retrieve revisions, update working<br />

files, and prepare activity reports on your development efforts.<br />

An important part of any configuration management system is the<br />

regular input of significant metadata, such as<br />

archive descriptions when archives are created<br />

revision descriptions and labels when objects are checked in, and<br />

at project milestones<br />

automatic records, such as timestamps and transaction logs<br />

This section describes some of the ways you can take advantage of<br />

the metadata <strong>Source</strong> <strong>Integrity</strong> maintains.<br />

When you check in a file, <strong>Source</strong> <strong>Integrity</strong> lets you assign a revision<br />

label to it. Labels serve as identifiers for revisions in an archive, and<br />

make it easier to locate significant revisions of your objects. Many<br />

<strong>Source</strong> <strong>Integrity</strong> functions use labels to specify the revision a<br />

command will operate on. For instance, you can check out a revision<br />

by specifying its label.<br />

<strong>User</strong> <strong>Guide</strong> 29


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

About Revision<br />

Descriptions<br />

Labels provide an effective mechanism for tracking development<br />

objects. Because revisions can have more than one label, they are<br />

perfectly suited to multi-track development. <strong>The</strong> fact that labels are<br />

unique within an archive makes them an efficient tool to mark<br />

milestones for later retrieval.<br />

Labeling Requirements<br />

Labels have a number of restrictions on their contents.<br />

<strong>The</strong>y cannot<br />

exceed 1,024 characters in length<br />

contain left square brackets ([), right square brackets (]), or<br />

colons (:)<br />

contain a leading space<br />

resemble a revision number; that is, a number of the form x.y,<br />

such as 2.13.<br />

Versions of <strong>Source</strong> <strong>Integrity</strong> prior to Release 7.3c, <strong>Source</strong> <strong>Integrity</strong> for<br />

UNIX, and <strong>Source</strong> <strong>Integrity</strong> for OS/2 will still be able to read archives<br />

with the current label format, but labels will show up with new<br />

characters translated (for example, a space will appear as %20).<br />

To be useful, labels must be accessible and convey the same meaning<br />

to everyone who uses them. A well-thought-out system of consistent<br />

labels can simplify the ability to identify and retrieve important<br />

revisions, and let you script repetitious file management tasks.<br />

For example, some sites use a system of standard prefixes to identify<br />

the scope of labels: site-wide labels use a specific prefix (like <strong>MKS</strong>_ or<br />

SITE_); labels for individual projects have prefixes that reflect their<br />

associations.<br />

When you checkpoint your projects, you can also apply a label to the<br />

project itself and, optionally, to every project member. This simple<br />

step makes reconstructing any development environment for postrelease<br />

maintenance a one-step process; just create a new sandbox<br />

based on a labeled checkpoint and let <strong>Source</strong> <strong>Integrity</strong> create and<br />

populate it with all the correct member revisions.<br />

Revision descriptions let you add notes and explanations to your work<br />

every time you check in a revision. <strong>The</strong>y provide a useful tool for<br />

managing your development by helping you document the reasons<br />

for a change. You should develop the habit of including a detailed<br />

description of every revision you check in.<br />

30 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


About<br />

Timestamps<br />

Metadata<br />

When you finish making changes to a file and check it in, the nature<br />

of the changes, and the reasons for them, are clear to you. <strong>The</strong>y may<br />

not be clear to everyone else, and in six months they probably will<br />

not be obvious to you either.<br />

If you consistently add notes to your revisions in the form of revision<br />

descriptions, you can preserve a detailed project record. You can then<br />

use <strong>Source</strong> <strong>Integrity</strong>’s Reporter utility to retrieve, display, and<br />

analyze these revision descriptions.<br />

You can also append new comments onto an existing revision<br />

description. <strong>The</strong> time and author of such additional comments are<br />

automatically included.<br />

Most developers realize how critical timestamps are during the build<br />

process. Building a program requires linking a number of objects that<br />

are themselves compiled from source code. <strong>The</strong>se files could include<br />

header files, source files, object modules, and executables. <strong>The</strong> source<br />

code usually depends on other source modules and one or more<br />

header files. <strong>The</strong>se dependencies are recorded in a makefile that is<br />

used by a build or make program.<br />

During a build, the make program uses timestamps to streamline the<br />

process; it refers to file timestamps to find components that have<br />

changed since the last build and that, therefore, need to be rebuilt.<br />

When the make utility finds a file that another component depends<br />

on—and determines that the file has a newer timestamp than the<br />

component—it assumes that either the file has changed, or the<br />

component that depends on the file must be rebuilt.<br />

If a component’s timestamp is identical to, or newer than, all of the<br />

files it depends on, the make utility reuses the component without<br />

rebuilding it.<br />

When you check a file into or out of an archive, you can specify how<br />

the timestamp of the working file should be set. Since timestamp<br />

changes affect dependencies between files (and therefore the make<br />

process), <strong>Source</strong> <strong>Integrity</strong> must be configured to set timestamps<br />

appropriately for your build environment.<br />

Timestamps can be set at check in and check out. At check in you can<br />

set the timestamp of the new revision to either the current time or to<br />

the timestamp of the working file. At check out, you can set the<br />

working file’s timestamp to the current time or to the timestamp of<br />

the revision.<br />

<strong>User</strong> <strong>Guide</strong> 31


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

For information about<br />

configuring timestamps, see<br />

the “Configuring <strong>Source</strong><br />

<strong>Integrity</strong>” chapter in the<br />

<strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong><br />

<strong>Edition</strong> Administrator <strong>Guide</strong>.<br />

About<br />

Attributes<br />

Example: How Timestamps Affect the Build Environment<br />

<strong>The</strong> significance of timestamp settings can be illustrated with the<br />

following example. If these files are dependent<br />

hello.exe --> hello.obj --> hello.c<br />

and <strong>Source</strong> <strong>Integrity</strong> is configured to set timestamps to the current<br />

time at both check in and check out, the following scenario arises:<br />

On Monday morning hello.c is checked out locked, and some<br />

changes are made to it.<br />

<strong>The</strong> make utility is run to build the program. Everything builds<br />

smoothly and all three files (hello.exe, hello.obj, hello.c)<br />

have Monday’s timestamp.<br />

Since the program was built without incident, hello.c is then<br />

checked in unlocked.<br />

Note When you check in a file unlocked, <strong>Source</strong> <strong>Integrity</strong> actually<br />

checks it in and then checks it out unlocked, replacing the editable working<br />

file with a read-only copy.<br />

<strong>The</strong> make utility is run again, but this time everything is rebuilt,<br />

even though the source files have not changed.<br />

<strong>The</strong> result of using the current time at check-in and check-out is that<br />

components are rebuilt unnecessarily. This is not only frustrating, but<br />

a waste of valuable development time.<br />

This problem can be avoided by using the SaveTimestamp and<br />

RestoreTimestamp configuration options as follows.<br />

SaveTimeStamp sets the timestamp of revisions to the timestamp<br />

of the working files when they are checked in.<br />

RestoreTimeStamp sets the timestamp of working files to that of<br />

the revision they are checked out from.<br />

You can assign attributes to projects and their members. Attributes<br />

can be used to identify members, to define or restrict the scope of<br />

project commands, or to automate project management operations.<br />

Attributes are variable statements with the form<br />

var [=value]<br />

32 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For information about<br />

configuring attributes, see the<br />

“Configuring <strong>Source</strong><br />

<strong>Integrity</strong>” chapter in the<br />

<strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong><br />

<strong>Edition</strong> Administrator <strong>Guide</strong>.<br />

Metadata<br />

where var is the name of the attribute, and value is its optional<br />

assigned value. Attribute names may contain any combination of<br />

alphanumeric or underscore characters; they may not begin with a<br />

number.<br />

Some project attributes are reserved by <strong>Source</strong> <strong>Integrity</strong>. Because of<br />

their special meaning, they are called Configuration Options. If present,<br />

<strong>Source</strong> <strong>Integrity</strong> overrides its built-in defaults and takes its<br />

configuration from them.<br />

<strong>The</strong> value portion of an attribute statement may contain any number<br />

of printable ASCII characters.<br />

About Log Files <strong>Source</strong> <strong>Integrity</strong> can monitor and keep track of actions that change<br />

archives (for example, checking in a new revision). This ability<br />

provides a powerful mechanism your organization can use to<br />

generate audit trails for individual archives, development projects, or<br />

an entire site.<br />

About<br />

Keywords<br />

Whenever you check in or check out locked a revision, <strong>Source</strong><br />

<strong>Integrity</strong> adds a line to a log file describing the operation.<br />

Automatic transaction logging can help managers assess the progress<br />

of development projects, as well as the contributions of individual<br />

programmers. Depending on site requirements, records can be<br />

maintained in two ways:<br />

in a single, monolithic log file describing all activity for all files at<br />

the site<br />

in a project log file containing reports for a single project<br />

A keyword is a placeholder that can be inserted into text-based<br />

working files. <strong>Source</strong> <strong>Integrity</strong> updates keywords with information<br />

about the revision or archive. Keywords provide a handy mechanism<br />

for accessing up-to-the-minute revision information from within a<br />

working file.<br />

<strong>User</strong> <strong>Guide</strong> 33


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

Security and Administration<br />

<strong>Source</strong> <strong>Integrity</strong><br />

Security<br />

For information about filelevel<br />

security, see the <strong>Source</strong><br />

<strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong><br />

Administrator <strong>Guide</strong>, “<strong>Source</strong><br />

<strong>Integrity</strong> Security”.<br />

<strong>The</strong> SAM<br />

Hierarchy<br />

No matter how well-designed or feature-filled your configuration<br />

management system is, it will be less effective if it is not used<br />

consistently by everyone at your site. Since no two sites are alike,<br />

<strong>Source</strong> <strong>Integrity</strong> provides SAM to let administrators define and<br />

enforce <strong>Source</strong> <strong>Integrity</strong>’s configuration management policies.<br />

SAM lets administrators control configuration management activities<br />

at your site by defining which users have access to any or all <strong>Source</strong><br />

<strong>Integrity</strong> functions (and, therefore, to the files in your development<br />

environment). SAM’s management controls can be applied at<br />

whatever level your site and corporate situation require, that is<br />

to all files and users at the site<br />

to specific projects<br />

to specific groups of users<br />

to individual archive files<br />

to individual users<br />

Using SAM, the administrator of your site defines which files and<br />

projects under <strong>Source</strong> <strong>Integrity</strong> you have access to, and the degree of<br />

that access. This is done by defining a number of structures within<br />

SAM: policies, users, groups of users, and roles.<br />

Policies<br />

A policy is a group of <strong>Source</strong> <strong>Integrity</strong> configuration statements that<br />

can be associated with your entire site or with any development<br />

object within it.<br />

Policies are arranged in a hierarchical inheritance structure to<br />

simplify management. Your administrator can define general<br />

practices at the global (that is, site-wide) level, and then fine tune<br />

these policies for individual projects and archives.<br />

For example, your site could have a global policy that establishes a<br />

strict-locking policy for all objects at the site, plus a policy at the<br />

project level to require encryption on a particularly sensitive project.<br />

<strong>User</strong>s<br />

<strong>The</strong> SAM database contains the names of all users with access to<br />

<strong>Source</strong> <strong>Integrity</strong>.<br />

34 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Groups<br />

Security and Administration<br />

<strong>User</strong>s can be placed together in groups according to how they should<br />

be using <strong>Source</strong> <strong>Integrity</strong>.<br />

Roles<br />

A role is a set of <strong>Source</strong> <strong>Integrity</strong> permissions that can be associated<br />

with a user or with a group of users. It defines access and restrictions<br />

for the <strong>Source</strong> <strong>Integrity</strong> users with that role at your site.<br />

When a user invokes a command, <strong>Source</strong> <strong>Integrity</strong> checks any roles<br />

associated with the user and reads the permissions they contain in<br />

order to determine whether to allow the action.<br />

Example: Group Permissions<br />

If your corporate development standards include a protocol for<br />

passing work from one person to another, you may want to take<br />

advantage of the freezing and thawing capabilities of <strong>Source</strong><br />

<strong>Integrity</strong>.<br />

Let’s assume that Development must sign-off on the work by<br />

checkpointing the project. At that point, they might also freeze the<br />

project and alert the Testing group that the product is ready for<br />

evaluation. Testing might thaw the project if they need to make very<br />

minor fixes.<br />

In order to ensure there is no going back, the <strong>Source</strong> <strong>Integrity</strong><br />

administrator can convey FreezeProject (but not ThawProject)<br />

permissions to the Development group.<br />

Rather than doing this individually, the administrator can create a<br />

group in SAM and add all the development members. <strong>The</strong><br />

administrator would also create a role holding the FreezeProject<br />

permission, and assign the role to the group. <strong>The</strong>refore, every <strong>Source</strong><br />

<strong>Integrity</strong> user that is part of the group receives the FreezeProject<br />

permission.<br />

Permissions are additive, so the administrator must ensure a user is<br />

not obtaining the ThawProject permission from any other source,<br />

that is, a role assigned<br />

directly to the user in the same module<br />

directly to a user in another module<br />

to another group the user is a member of<br />

<strong>User</strong> <strong>Guide</strong> 35


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

Managing Development<br />

Promotion<br />

<strong>Source</strong> <strong>Integrity</strong> includes two features that help you track the<br />

development process.<br />

<strong>The</strong> Promotion feature lets you impose a step-by-step<br />

progression on the development cycle.<br />

<strong>The</strong> Reporter utility lets you view the audit trail of files and<br />

resources.<br />

<strong>The</strong> Promotion feature lets you track the progress of your product<br />

through the development cycle to a finished product. <strong>The</strong> Promotion<br />

model at your site<br />

defines your development cycle<br />

specifies how files will be handled at each development stage<br />

controls who can modify development objects at each promotion<br />

state<br />

Although most aspects of the promotion policy at your site will be<br />

defined by your administrator, you can customize some settings<br />

locally.<br />

<strong>The</strong> development cycle at your site might include the stages<br />

Development, when code is being actively written<br />

Testing, when each code module and application is tested<br />

Release, when the code is declared finished, and distribution<br />

disks can be produced<br />

In this case, your administrator could set <strong>Source</strong> <strong>Integrity</strong> promotion<br />

policy as follows:<br />

All development objects must pass through each stage in the<br />

development cycle, from lowest to highest.<br />

During the Development phase, only the Development Leader<br />

can promote objects to the Testing phase. (<strong>Source</strong> <strong>Integrity</strong> lets<br />

you define who may promote and demote.)<br />

Any tester can demote an object back to the Development phase<br />

if it fails a test, but only the Quality Assurance Manager can<br />

promote an object to the Release state.<br />

This policy guarantees that the state of every product component<br />

would be obvious at any time, and that each component would pass<br />

through each phase of the development process successfully before<br />

moving on to the next.<br />

36 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Reporter<br />

Managing Development<br />

Most sites need a way of examining ongoing projects so they can<br />

identify trends, check hot spots, predict problems, or prevent<br />

schedule slippage. To deal with this need, <strong>Source</strong> <strong>Integrity</strong> includes<br />

the Reporter. This utility helps you analyze the revision history of<br />

project members and revisions.<br />

Depending on the requirements at your site, you can view any of the<br />

Reporter’s built-in reports on development patterns and activities.<br />

<strong>The</strong> Reporter also lets you import raw data into your own database,<br />

where you can create custom reports tailored to your own needs.<br />

Report Types<br />

<strong>The</strong> Reporter utility includes nine different types of reports based on<br />

the information <strong>Source</strong> <strong>Integrity</strong> maintains about project members<br />

and revisions. Reports can be presented as formatted text and some<br />

can be displayed as graphs (bar, pie, line, or area charts).<br />

Changes Grouped by Author lists changes to members or revisions<br />

grouped by the person who made them.<br />

Changes Grouped by Author (Summary) summarizes the changes<br />

to project members, or archives, grouped by author.<br />

Revisions Newer Than Member Revision shows which project<br />

members have more recent revisions available.<br />

Changes from Member Revision to Label lists all the revisions<br />

between the project member and another revision with a<br />

specified label.<br />

Changes From Member Revision to Revision lists revisions in a<br />

project member’s archive between the member revision and<br />

another revision (specified by revision number).<br />

List Locked Revisions lists all locked revisions in a project or an<br />

archive, giving the name of the member, the revision number,<br />

and the person who has it locked.<br />

List Revisions Associated with Labels scans the archives of all<br />

project members and extracts any labels they contain.<br />

List Revisions Associated with States scans the archives of all<br />

project members and extracts any state settings they contain.<br />

Project Member History displays change information for all<br />

revisions of a specified project member.<br />

<strong>User</strong> <strong>Guide</strong> 37


Understanding <strong>Source</strong> <strong>Integrity</strong><br />

38 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Introducing the <strong>Source</strong><br />

<strong>Integrity</strong> Interfaces<br />

3<br />

This chapter provides a brief introduction to the three interfaces to<br />

<strong>Source</strong> <strong>Integrity</strong>:<br />

<strong>The</strong> Windows interface, a standard Windows application.<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface, which gives you the ability to<br />

access development projects remotely using their web browser<br />

(either Microsoft Internet Explorer 4.0+ or Netscape Navigator<br />

4.0+).<br />

<strong>The</strong> command-line interface, which allows you to type powerful<br />

commands at a command prompt or develop scripts for<br />

automating common activities.<br />

If you are unfamiliar with <strong>Source</strong> <strong>Integrity</strong>, you should begin with<br />

the Windows interface.<br />

You will probably not use <strong>Source</strong> <strong>Integrity</strong> through just one of these<br />

interfaces exclusively, but rather decide over time which interface is<br />

best for a particular activity within your environment and workflow.<br />

For detailed information about how to use <strong>Source</strong> <strong>Integrity</strong>, with<br />

specific instructions for each of the three interfaces, see Chapter 4:<br />

“Getting Started With Projects, Sandboxes, and Members” on<br />

page 65.<br />

For information about how to use <strong>Source</strong> <strong>Integrity</strong> within<br />

development environments, see Chapter 7: “Using Extensions” on<br />

page 197.<br />

<strong>User</strong> <strong>Guide</strong> 39


Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces<br />

<strong>The</strong> Windows interface<br />

Starting the<br />

<strong>Source</strong> <strong>Integrity</strong><br />

Windows<br />

Interface<br />

<strong>The</strong> Application<br />

Window<br />

<strong>The</strong> most commonly used interface to <strong>Source</strong> <strong>Integrity</strong> is the standard<br />

Windows application, with a menu bar and tool bar for choosing<br />

commands.<br />

If you have performed the standard installation, you can start the<br />

<strong>Source</strong> <strong>Integrity</strong> Windows interface application by choosing<br />

Programs > <strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong> > <strong>Source</strong> <strong>Integrity</strong> for Win32 from<br />

your Start menu or double-clicking the <strong>Source</strong> <strong>Integrity</strong> icon in the<br />

<strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong> program group.<br />

When you open the application for the first time, <strong>Source</strong> <strong>Integrity</strong><br />

displays a Tip Wizard and Startup Wizard.<br />

If you want to open an existing <strong>Source</strong> <strong>Integrity</strong> project or sandbox,<br />

you can also browse to the project directory in Windows Explorer and<br />

double-click the .pj file.<br />

<strong>The</strong> application window contains a number of common Windows<br />

features explained in this section.<br />

Title bar<br />

Menu bar<br />

Toolbar<br />

Workspace<br />

Status bar<br />

Menu Bar<br />

Context menu<br />

(right click menu)<br />

Filter list<br />

<strong>The</strong> menu bar is located directly below the title bar and contains the<br />

available pull-down menus. When you first start <strong>Source</strong> <strong>Integrity</strong>,<br />

there are three menus in the menu bar: File, Configuration, and Help.<br />

<strong>The</strong> list of available menus and commands varies depending on the<br />

40 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For more information on<br />

filters, see “Using Filters” on<br />

page 44<br />

<strong>The</strong> Windows interface<br />

function you are performing (for example, working with an archive<br />

or a project). In the previous diagram, the <strong>Source</strong> <strong>Integrity</strong> menus that<br />

are available when working with a project or sandbox are displayed.<br />

Toolbar<br />

Immediately below the menu bar is an optional toolbar that provides<br />

easy access to the most commonly used <strong>Source</strong> <strong>Integrity</strong> commands.<br />

Toolbar functions are executed by clicking the appropriate icon with<br />

the left mouse button. If a command is not currently available, its<br />

toolbar icon is grayed out.<br />

Two toolbars are available for <strong>Source</strong> <strong>Integrity</strong>: one for archiverelated<br />

functions and the other for project-related functions. When an<br />

Archive window is current in the application window, the archive<br />

toolbar is displayed; when a Project window is current, <strong>Source</strong><br />

<strong>Integrity</strong> automatically presents the project toolbar. Both toolbars can<br />

be modified in the Toolbar panel of the Personal Configuration dialog<br />

box. To set up a toolbar, choose the one you want to work with from<br />

the Select Toolbar box, and the remaining options in the panel act on<br />

the selected toolbar.<br />

Filter List<br />

Beside the toolbar is an optional list of built-in filters that allows you<br />

to focus your view on a subset of project members you are currently<br />

interested in. Only those members that meet the criteria specified by<br />

the filter are displayed. You can decide whether to display this list of<br />

filters through the View menu. Choose Filters when you want the list<br />

of filters to be available, and deselect it when you want to hide the list<br />

from view.<br />

Note <strong>The</strong> list of built-in filters is disabled when there is no project or<br />

sandbox currently loaded, as well as when you are working in the<br />

Archive window.<br />

Workspace<br />

Everything between the toolbar and the status bar is considered the<br />

workspace. This is where <strong>Source</strong> <strong>Integrity</strong> displays windows<br />

containing your projects, sandboxes, or archives. For example, when<br />

you open a project, its members are presented in a Project window in<br />

the workspace.<br />

When you first start <strong>Source</strong> <strong>Integrity</strong>, the workspace is empty.<br />

<strong>User</strong> <strong>Guide</strong> 41


Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces<br />

<strong>The</strong> Project<br />

Window<br />

Context Menu<br />

<strong>Source</strong> <strong>Integrity</strong> supports Windows 95/98 and Windows NT<br />

standard context menus. Selecting and right-clicking<br />

a project member in a project window<br />

an archive revision in an archive window<br />

the empty application window<br />

displays a pop-up menu of actions you can perform on the selected<br />

item.<br />

Status Bar<br />

When you select a command in a <strong>Source</strong> <strong>Integrity</strong> pull-down menu, a<br />

brief explanation of its purpose is displayed in the status bar. In<br />

addition, if the Hint mode (in the Toolbar panel of the Configuration<br />

command) is set to Both or Status Bar Tips, explanations of the<br />

toolbar buttons are displayed when the mouse pointer rests over<br />

them.<br />

When you open a <strong>Source</strong> <strong>Integrity</strong> project, the status bar displays<br />

total number of members in the current project<br />

number of members that are currently locked<br />

number of members you have selected<br />

When you open a project or sandbox, <strong>Source</strong> <strong>Integrity</strong> displays its<br />

contents in a Project window. <strong>The</strong> window has the title Sandbox<br />

path\filename or Project path\filename where path\filename represents<br />

the fully qualified DOS filename of the sandbox or project.<br />

<strong>Source</strong> <strong>Integrity</strong> offers you a choice between two different views of<br />

your Project and Sandbox windows: You may choose to work with<br />

the List view or the Tree view.<br />

<strong>The</strong> List view of the Project window contains a selectable list with<br />

entries for every member of the sandbox or project. <strong>The</strong> information<br />

for each member includes:<br />

Type of member.<br />

If you freeze a project or freeze a member, the snowflake icon<br />

alerts you to the archived member’s condition. <strong>The</strong> description<br />

Frozen Member appears at the bottom of the window.<br />

If either the member’s working file or archive has been modified,<br />

a change symbol (delta) appears, and a description of the changes<br />

is shown at the bottom of the window.<br />

42 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> Archive<br />

Window<br />

<strong>The</strong> Windows interface<br />

<strong>The</strong> delta symbol with a page icon means your working file has<br />

changed. It also appears when no working file exists for the<br />

member.<br />

<strong>The</strong> delta symbol with a book icon means the member archive<br />

has later revisions available. It also appears when no archive<br />

exists for the member.<br />

If you lock a member, a padlock alerts you to its condition. <strong>The</strong><br />

date and time the lock was placed also appears next to the user<br />

name of the person who locked the member.<br />

Member’s revision number.<br />

Name of the member’s working file.<br />

State of the member revision.<br />

Any labels assigned to the particular revision.<br />

Select a member by clicking it, or by moving the selector bar to it with<br />

the cursor control keys. A box below the list of members displays<br />

change information if the selected member’s working file has<br />

changed, relative to the member revision. For example, if the working<br />

file has been updated but not checked in, a message alerts you that<br />

the working file is newer than the member revision.<br />

<strong>The</strong> Project window can be resized within the <strong>Source</strong> <strong>Integrity</strong><br />

application window’s workspace or reduced to an icon in the<br />

application window.<br />

<strong>The</strong> Project window also supports Windows 95/98 and Windows NT<br />

standard context menus. Selecting and right-clicking a project<br />

member in a Project window displays a pop-up menu of actions you<br />

can perform on the selected item.<br />

When you open an archive, <strong>Source</strong> <strong>Integrity</strong> displays its contents in<br />

an Archive window. <strong>The</strong> window has the title Archive path\filename<br />

where path\filename represents the fully qualified DOS filename of<br />

the archive.<br />

<strong>The</strong> Archive window contains a selectable list with entries for<br />

working file (if one exists)<br />

every revision in the archive<br />

Select a revision by clicking it or moving the selector bar to it with the<br />

cursor control keys.<br />

<strong>User</strong> <strong>Guide</strong> 43


Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces<br />

Using Filters<br />

Each entry in the list contains information about a single revision in<br />

the archive. This information is displayed in columns with the<br />

following headings:<br />

Revision. <strong>The</strong> revision number.<br />

Author. <strong>The</strong> user who checked in the revision.<br />

Date. <strong>The</strong> date and time the revision was checked in.<br />

Locker. <strong>The</strong> user name of the person who locked the revision, as<br />

well as the date and time the lock was placed.<br />

State. <strong>The</strong> revision’s state setting.<br />

Labels. <strong>The</strong> label attached to the revision.<br />

A box below the list of revisions displays the revision description for<br />

the currently selected revision. As you move the selector bar from one<br />

revision to another, the description changes to reflect the currently<br />

selected revision.<br />

<strong>The</strong> first entry in the Archive window is the archive’s working file (if<br />

one exists). <strong>The</strong> entry shows the fully qualified filename of the<br />

working file.<br />

If the working file can be edited, the entry is preceded by a pencil<br />

icon. If the working file is read-only, the pencil icon is crossed out in<br />

red.<br />

<strong>The</strong> Archive window can be resized within the <strong>Source</strong> <strong>Integrity</strong><br />

application window’s workspace or reduced to an icon in the<br />

application window.<br />

<strong>The</strong> Archive window also supports Windows 95/98 and<br />

Windows NT standard context menus. Selecting and right-clicking an<br />

archive revision in an Archive window displays a pop-up menu of<br />

actions you can perform on the selected item.<br />

As projects become large, they can become more difficult to navigate.<br />

Finding and selecting the members you are interested in becomes<br />

increasingly difficult. Filters allow you to view and manipulate a<br />

predefined subset of project members that are grouped according to<br />

their properties.<br />

In the Windows interface, the filters appear in a drop-down list<br />

located on the toolbar. Choose one of the following filters, and your<br />

view is filtered accordingly:<br />

All members. All members of the current project or sandbox.<br />

Modified members. Members with a working file that has been<br />

modified.<br />

44 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Filtering Modes<br />

Using Tree View<br />

<strong>The</strong> Windows interface<br />

Out-of-sync members. Members whose revision in a sandbox is<br />

not the same as the member revision in the corresponding<br />

project.<br />

Locked members. Members locked by any user.<br />

Locked by me. Members locked by the current user only.<br />

Frozen members.<br />

Subprojects. Members that are themselves projects.<br />

Members with label. Members with a particular label. If you<br />

choose this filter, <strong>Source</strong> <strong>Integrity</strong> prompts you for a label.<br />

Members with state. Members with a particular state. If you<br />

choose this filter, <strong>Source</strong> <strong>Integrity</strong> prompts you for a state.<br />

Note <strong>The</strong> list of built-in filters is only displayed if a Project or Sandbox<br />

window is the active window.<br />

<strong>Source</strong> <strong>Integrity</strong> provides two filtering modes: Global and Per-<br />

Project. If filtering is set to Global, the filter currently displayed in the<br />

list of filters applies to all open projects. With Per-Project filtering,<br />

each open project has its own filter.<br />

To set the filtering mode:<br />

1. Choose Configuration > Personal.<br />

<strong>The</strong> Personal Configuration dialog box appears with the<br />

Preferences panel displayed.<br />

2. In the View Defaults section, select Global or Per-Project as your<br />

preferred filtering mode and click OK.<br />

<strong>Source</strong> <strong>Integrity</strong> offers you a choice between two different views of<br />

your Project and Sandbox windows: You may choose to work with<br />

the List view or the Tree view.<br />

Note You cannot switch an Archive window from List view to Tree<br />

view.<br />

When expanded, subdirectories and subprojects now appear as tree<br />

branches. <strong>The</strong> right pane of the current window still displays the List<br />

view (list of members and subprojects) with the same columns.<br />

<strong>User</strong> <strong>Guide</strong> 45


Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces<br />

You can move two sets of pane splitter bars to resize the window<br />

panes: the splitter bar between the left and right pane, and the one<br />

between the right pane and the status area.<br />

Select items from the right pane to perform operations on these<br />

selected items. Multiple members and subprojects can be selected<br />

and operated on in the right pane just like the <strong>Source</strong> <strong>Integrity</strong> List<br />

view window.<br />

To change the current view<br />

Choose View > Tree view or View > List view, depending on the current<br />

view.<br />

If you choose List view when the Tree view is active, the List view<br />

window displays members and subprojects of the master project.<br />

You can set the default view for projects upon startup in your<br />

personal configuration.<br />

1. Choose Configuration > Personal.<br />

<strong>The</strong> Personal Configuration dialog box appears with the<br />

Preferences panel displayed.<br />

2. In the View Defaults section, select either List view or Tree view as<br />

your preferred default Project view and click OK.<br />

Expanding a Project<br />

To expand a project in the left pane of the Tree view:<br />

Click the “+” symbol to see the subprojects and subdirectories (if<br />

applicable) in the project.<br />

Select the subdirectory to update the right pane with the list of<br />

project members in the subdirectory.<br />

Select the project (it becomes highlighted) to see the list of<br />

members in the current directory and any subprojects in the right<br />

pane.<br />

Subprojects expand like the master project: members and subsubprojects<br />

are listed in the right pane.<br />

Double-click the project to both select and expand the project.<br />

This updates both window panes.<br />

In the List view, when you double-click a subproject a new List view<br />

appears. If you double-click a subproject in the right pane of the Tree<br />

view, the corresponding subproject in the left pane is selected and its<br />

46 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> Windows interface<br />

members are displayed in the right pane. To open a separate window<br />

for a subproject, right-click the project in the left pane and choose<br />

Open In New Window.<br />

<strong>The</strong> right pane uses the same context menu as the standard project<br />

window to operate on members selected in the right pane.<br />

<strong>The</strong> left pane has its own context menu items:<br />

Create Sandbox<br />

Open Project Archive<br />

Checkpoint<br />

Open In New Window<br />

Project Information<br />

Development Path (for variant sandboxes)<br />

Drag and Drop<br />

List View<br />

<strong>User</strong>s can drag files and projects from outside the Project window<br />

(for example, from Windows Explorer) and drop them into the<br />

Project window. Dropped items are added to the current project as<br />

members and subprojects.<br />

Tree View<br />

<strong>The</strong> Tree view exhibits similar behavior if the right pane is displaying<br />

members and subprojects: items dropped into either pane are added<br />

to the current project (that is, the project selected in the left pane) as<br />

members and subprojects.<br />

Using the Restore Desktop Feature<br />

When you close <strong>Source</strong> <strong>Integrity</strong> with Project or Sandbox windows<br />

still open, <strong>Source</strong> <strong>Integrity</strong> can save the view type (List or Tree) for<br />

each window so that the same view of each project or sandbox<br />

appears the next time you open <strong>Source</strong> <strong>Integrity</strong>.<br />

To turn on the Restore Desktop feature:<br />

Select the Restore Desktop option in the Preferences panel of<br />

Personal Configuration dialog box.<br />

<strong>User</strong> <strong>Guide</strong> 47


Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces<br />

Using <strong>Source</strong><br />

<strong>Integrity</strong> With<br />

Windows<br />

Explorer<br />

For more information on the<br />

<strong>Source</strong> <strong>Integrity</strong> extensions,<br />

see “Using Extensions” on<br />

page 197.<br />

In addition to the application window, <strong>Source</strong> <strong>Integrity</strong> commands<br />

are also available from the Windows Explorer. If you installed the<br />

<strong>Source</strong> <strong>Integrity</strong> Windows Explorer Extension when you installed<br />

<strong>Source</strong> <strong>Integrity</strong>, a <strong>Source</strong> <strong>Integrity</strong> sub-menu was automatically<br />

added to the Windows Explorer File menu. You can also access<br />

<strong>Source</strong> <strong>Integrity</strong> commands via the right-click context menu.<br />

If you did not choose this installation option, you can install the<br />

<strong>Source</strong> <strong>Integrity</strong> Extensions any time by double-clicking the<br />

setup.exe file in the root directory of the <strong>Source</strong> <strong>Integrity</strong> CD and<br />

choosing the <strong>Source</strong> <strong>Integrity</strong> Extensions option.<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface allows you to access some <strong>Source</strong><br />

<strong>Integrity</strong> functionality through a web browser. It is a true clientserver<br />

product, with the Internet forming the basic connection<br />

between the client and the server. It has three components:<br />

client<br />

browser plugin<br />

session applet<br />

<strong>The</strong> client component is a local server that generates the interface for<br />

the browser to display and provides local file access. It communicates<br />

directly with the <strong>Integrity</strong> Server over the Internet to access the<br />

version control services. <strong>The</strong> browser plugin starts up the client<br />

component of the <strong>Source</strong> <strong>Integrity</strong> Web interface. <strong>The</strong> session applet is<br />

a small applet that informs the client component of a browser page’s<br />

status.<br />

<strong>The</strong> look and feel of the product has been adapted to its web-based<br />

environment. <strong>Source</strong> <strong>Integrity</strong> users will find that the web-enabled<br />

version of the product provides easier access to common operations,<br />

and that commonly used operations have been simplified.<br />

48 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Installing the<br />

<strong>Source</strong> <strong>Integrity</strong><br />

Web Interface<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface<br />

To install the <strong>Source</strong> <strong>Integrity</strong> Web Interface on a client machine<br />

for the first time:<br />

1. Contact the <strong>Integrity</strong> Server with your browser. <strong>The</strong><br />

administrator can tell you the URL.<br />

A typical URL of the <strong>Integrity</strong> Server may be of the form:<br />

http://machine_name.your_domain_name.com:/<br />

A web page appears inviting you to download the <strong>Source</strong><br />

<strong>Integrity</strong> Web Interface.<br />

2. Download the <strong>Source</strong> <strong>Integrity</strong> Web Interface installation<br />

program (that is, save it to disk).<br />

3. Close the browser.<br />

4. Run the installation program following the instructions<br />

provided.<br />

5. Restart the browser and connect to the <strong>Integrity</strong> Server.<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface home page appears.<br />

6. Add this page to your list of bookmarks (on Netscape) or<br />

favorites (on Internet Explorer) for convenience.<br />

To update an existing version of the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface:<br />

1. Uninstall your current version of the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface by choosing Start > Settings > Control Panel and doubleclicking<br />

Add/Remove Programs.<br />

<strong>The</strong> Add/Remove Programs Properties dialog box appears.<br />

2. From the Install/Uninstall tab, select <strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface from the list of installed applications and click Add/<br />

Remove.<br />

You are asked to confirm that you want to remove the <strong>MKS</strong><br />

<strong>Source</strong> <strong>Integrity</strong> Web Interface and all of its components. Click<br />

Yes.<br />

3. Follow the instructions above, “To install the <strong>Source</strong> <strong>Integrity</strong><br />

Web Interface on a client machine for the first time”.<br />

<strong>User</strong> <strong>Guide</strong> 49


Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces<br />

Installing<br />

Additional<br />

Browser<br />

Plugins<br />

Starting the<br />

<strong>Source</strong> <strong>Integrity</strong><br />

Web Interface<br />

4. Contact the <strong>Integrity</strong> Server with your browser.<br />

Note <strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface provided with <strong>Source</strong> <strong>Integrity</strong><br />

<strong>Professional</strong> must always be upgraded when a version is available from<br />

the <strong>Integrity</strong> Server. <strong>The</strong>re is no optional upgrade feature available.<br />

When you install the <strong>Source</strong> <strong>Integrity</strong> Web Interface, it installs a<br />

plugin for each chosen browser on your system at installation time.<br />

However, you may also want to use the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface with additional browsers (such as one you installed after the<br />

original installation).<br />

To install a plugin for one or more additional browsers:<br />

1. Click Start > Programs> <strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface ><br />

Plugin Configuration Utility.<br />

<strong>The</strong> Welcome window appears.<br />

2. Click Next>.<br />

<strong>The</strong> Install Plugin window appears and displays the web<br />

browsers the plugin is already installed for.<br />

3. Add or remove a browser from the list by selecting the browser<br />

and clicking the Add or Remove buttons.<br />

4. Click Next> to complete the installation of the plugin.<br />

To start the <strong>Source</strong> <strong>Integrity</strong> Web Interface, start your web browser<br />

and browse to the <strong>Integrity</strong> Server. Your <strong>Source</strong> <strong>Integrity</strong><br />

administrator can provide you with its location.<br />

A typical URL of the <strong>Integrity</strong> Server may be of the form<br />

http://machine_name.your_domain_name.com:/<br />

If the location you entered is correct and the <strong>Integrity</strong> Server is<br />

configured properly, your browser displays the <strong>Integrity</strong> Server home<br />

page.<br />

50 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface<br />

On the <strong>Integrity</strong> Server home page, click <strong>Source</strong> <strong>Integrity</strong>. Your<br />

browser displays one of the following:<br />

If you have already installed the most recent <strong>Source</strong> <strong>Integrity</strong><br />

Web Interface client component on your local machine, your<br />

browser displays a window that prompts you for a user name<br />

and password.<br />

After you enter them, your browser displays the <strong>Source</strong> <strong>Integrity</strong><br />

Web Interface home page (see “<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface Home Page” on page 52). For convenience, add this<br />

page to your list of bookmarks (on Netscape) or favorites (on<br />

Internet Explorer).<br />

If you have not yet installed the client component, your browser<br />

displays a page that allows you to download and install the client<br />

component.<br />

If the version of the server is newer than your client, the client<br />

will still work with the new server. When you want to install the<br />

new client, you must first uninstall the old client.<br />

On that page, click <strong>Source</strong> <strong>Integrity</strong> Web Interface Client Install to<br />

download the client install executable, called siwi.exe. Run the<br />

executable and follow its instructions.<br />

When you have finished installing the client, restart your browser<br />

and return to the <strong>Source</strong> <strong>Integrity</strong> Web Interface home page.<br />

<strong>User</strong> <strong>Guide</strong> 51


Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces<br />

<strong>The</strong> <strong>Source</strong><br />

<strong>Integrity</strong> Web<br />

Interface Home<br />

Page<br />

Introduction to<br />

Views<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface displays information about your<br />

projects and sandboxes and provides commands in a web browser<br />

window.<br />

Across the top of the window, there are drop-down menus that allow<br />

you to choose commands that affect sandboxes and projects and set<br />

configuration options.<br />

In the Sandbox and Project views (“Introduction to Views” next), you<br />

can use filters to allow you to see a currently significant subset of<br />

information, without having to sort through the entire project. You<br />

can also use selections to choose files that fit a particular category.<br />

In the <strong>Source</strong> <strong>Integrity</strong> Web Interface, you can choose from four ways<br />

to look at your projects and sandboxes, or views. You select a view by<br />

clicking its button on the toolbar on the left side of the window. <strong>The</strong><br />

button for the current view is highlighted, and buttons for views that<br />

are inaccessible or do not apply are disabled and grayed out.<br />

Overview of the Sandbox View<br />

<strong>The</strong> Sandbox view displays the members of a sandbox and provides<br />

commands that act on them.<br />

A hierarchical list of the sandbox members appears in the view. Each<br />

member appears with its corresponding metadata, as well as status<br />

information and icons for some of the commands that may be<br />

performed on that member.<br />

52 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface<br />

Icons that tell you about the state of a particular member appear<br />

beside the name of the member. If you rest your pointer on an icon, a<br />

tooltip describes the action performed by clicking that icon.<br />

In the command area at the top of the window, commands are<br />

grouped into two drop-down menus: commands that can be<br />

performed on members and commands that affect the entire sandbox.<br />

<strong>The</strong>re are two other drop-down menus: a filter menu for choosing<br />

which members are displayed, and a selection menu for selecting<br />

subsets of the sandbox.<br />

<strong>The</strong> hierarchical list of members lets you open and close directories,<br />

allowing you to reduce the number of members visible at one time,<br />

and letting you focus on the task at hand.<br />

For each member, the following appears:<br />

Member Name. <strong>The</strong> name of the sandbox member.<br />

Revision. <strong>The</strong> number of the revision in the sandbox (not the<br />

member revision in the project).<br />

Locked. If the member is locked, a padlock ( ) appears with the<br />

name of the person who placed the lock.<br />

A selection checkbox for selecting a member before choosing a<br />

command to act upon it.<br />

Each member may have one or more symbols displayed in front of it,<br />

to quickly convey the status of that member.<br />

<strong>The</strong> Out-of-Sync delta signals that the revision in your sandbox<br />

does not match the member revision in the project.<br />

<strong>The</strong> Working File delta signals that the working file has been<br />

modified from the revision in your sandbox.<br />

<strong>The</strong> missing file symbol identifies a missing file: the file is part of<br />

the sandbox, but is not on the client machine. To get a copy of the<br />

file, click this symbol.<br />

<strong>The</strong> snowflake icon indicates that the individual member or<br />

project is frozen and therefore cannot be updated.<br />

<strong>The</strong> Inaccessible icon indicates that the project or archive is<br />

currently inaccessible.<br />

Sandbox View Filters<br />

<strong>The</strong> Sandbox view may be filtered to reduce the number of members<br />

that are visible at any one time.<br />

You can choose one of the following filters from the Filters dropdown<br />

list:<br />

<strong>User</strong> <strong>Guide</strong> 53


Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces<br />

Members displays all members in currently open directories and<br />

subsandboxes in the sandbox<br />

Locked by me displays only those members that are locked by the<br />

user at the current sandbox revision in currently open directories<br />

or subsandboxes.<br />

Out of Sync Members displays only those members that are not at<br />

member revision in currently open directories or subsandboxes.<br />

Modified Members displays only those members that have a<br />

working file delta in currently open directories or subsandboxes.<br />

Not Present Members displays those members that are part of the<br />

current project, but are not on the client machine in currently<br />

open directories or subsandboxes.<br />

Everything displays all files in currently open directories and<br />

subsandboxes of the sandbox, including local files that are not<br />

part of the project.<br />

Non-Members displays all files in currently open directories and<br />

subsandboxes of the sandbox that are not members of the project.<br />

All Members recurses into any subdirectories and subsandboxes<br />

and displays all members.<br />

All Locked by me recurses into any subdirectories and<br />

subsandboxes and displays all members that are locked by the<br />

user at the current sandbox revision.<br />

All Out of Sync Members recurses into any subdirectories and<br />

subsandboxes and displays only those members that are not at<br />

member revision.<br />

All Modified Members recurses into any subdirectories and<br />

subsandboxes and displays only those members that have a<br />

working file delta.<br />

All Not Present Members recurses into any subdirectories and<br />

subsandboxes and displays those members that are part of the<br />

current sandbox, but are not on the client machine.<br />

Sandbox View Selections<br />

<strong>The</strong> Selections drop-down list allows you to select multiple files that<br />

fit a particular category, based on their status, in just one click.<br />

Reset All deselects all files listed in the sandbox.<br />

All Visible Members selects all files listed in the sandbox.<br />

Out of Sync selects all members whose revision is not the same as<br />

the revision in the project.<br />

54 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface<br />

Modified selects all files whose working files have been modified<br />

since the member was last checked out.<br />

Locked by me selects all members that are locked in the current<br />

user’s name.<br />

Archived selects all members that have been archived.<br />

Exists selects all members that have a working file.<br />

Non-Member selects all members that are not members of the<br />

sandbox, but do exist in the sandbox’s directory.<br />

Invert Current reverses the selected and unselected files in the<br />

current filter.<br />

Overview of the Member View<br />

<strong>The</strong> Member view displays detailed information about a particular<br />

member and provides commands that act upon that member.<br />

This view can be reached from either the Project or Sandbox view. To<br />

open the member view for a member, select it and choose Member ><br />

Open Member View.<br />

A list of the revisions in the member’s archive appears, each revision<br />

displayed with its corresponding metadata.<br />

<strong>The</strong> following metadata is displayed:<br />

Revision. <strong>The</strong> revision number of the archive. To view the<br />

contents of a revision, click its revision number (for example,<br />

“1.4”). <strong>The</strong> revision appears in its associated editor.<br />

Locked. If the revision is locked, a padlock (<br />

name of the person who placed the lock.<br />

) appears with the<br />

Author. <strong>The</strong> name of the person who checked in the revision.<br />

Date. <strong>The</strong> date and time when the revision was checked in.<br />

State. <strong>The</strong> current state of the revision.<br />

Description. <strong>The</strong> description of the revision (entered upon check<br />

in).<br />

Labels. Any labels associated with the revision.<br />

Each revision may have a symbol displayed next to it, to convey the<br />

status of that revision quickly:<br />

<strong>The</strong> Member Revision icon identifies the revision that represents<br />

the member revision in the project. To set a different revision as<br />

the member revision in the project, check the checkbox next to the<br />

revision and select Set Member Revision from the list of available<br />

commands.<br />

<strong>User</strong> <strong>Guide</strong> 55


Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces<br />

<strong>The</strong> revision that is current in the user’s sandbox is highlighted<br />

with a dark line in the view.<br />

Overview of the Project View<br />

<strong>The</strong> Project view focuses on the structure and status of the master<br />

project, and ignores what is in the user’s sandbox. This view provides<br />

some of the same features of the sandbox view, but from a more<br />

administrative perspective.<br />

A hierarchical list of the project members is displayed in the view.<br />

Each member appears with its corresponding metadata, as well as<br />

status information and icons for some of the commands that may be<br />

performed on that member.<br />

In the command area at the top of the window, commands are<br />

grouped into two drop-down menus: commands that can be<br />

performed on members and commands that affect the entire project.<br />

<strong>The</strong>re are two other drop-down menus: a filter menu for choosing<br />

which members are displayed, and a selection menu for selecting<br />

subsets of the project.<br />

<strong>The</strong> hierarchical list of members lets you open and close directories,<br />

allowing you to reduce the number of members visible at one time,<br />

and letting you focus at the task at hand.<br />

Each member is displayed at its member revision (the revision in the<br />

project). <strong>The</strong>refore, all the corresponding metadata, as well as the<br />

member commands, relate to the member revision.<br />

<strong>The</strong> following appears:<br />

Member Name. <strong>The</strong> name of the project member.<br />

Revision. <strong>The</strong> number of the revision in the project.<br />

Locked. If the member is locked, a padlock ( ) appears with the<br />

name of the person who placed the lock.<br />

A selection checkbox for selecting a member before choosing a<br />

command to act upon it<br />

Each member may have a symbol displayed next to it, to convey the<br />

status of that member quickly:<br />

<strong>The</strong> Tip Revision delta signals that the member revision of this<br />

member is not at tip revision. In other words, there is a newer<br />

revision available along the member revision’s branch. Click this<br />

delta to update the member to its most recent revision.<br />

<strong>The</strong> Frozen icon indicates that the individual member or project<br />

is frozen and therefore cannot be updated.<br />

56 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface<br />

<strong>The</strong> Inaccessible icon indicates that the project or archive is<br />

currently inaccessible.<br />

Project View Filters<br />

<strong>The</strong> Project view may be further filtered to reduce the number of<br />

members that are visible at any one time.<br />

You can choose one of the following filters from the drop-down list:<br />

Members displays all members in the project in currently open<br />

directories and subprojects.<br />

Locked by me displays only those members that are locked by the<br />

user at the current project revision in currently open directories<br />

and subprojects.<br />

Locked displays all members that are locked by anyone at the<br />

current project revision in currently open directories and<br />

subprojects.<br />

New Tip Revision display all members whose archive contains a<br />

revision number greater than the current one, but in the same<br />

branch in currently open directories and subprojects.<br />

Frozen Members displays only those members which are frozen<br />

in currently open directories and subprojects.<br />

Everything displays all files in the current project directory,<br />

including local files that are not part of the project in currently<br />

open directories and subprojects.<br />

Non-Members displays all files in the current project directory<br />

that are not members of the project in currently open directories<br />

and subprojects.<br />

All Members recurses into any subprojects and subdirectories and<br />

displays all members.<br />

All Locked by me recurses into any subprojects and subdirectories<br />

and displays all members that are locked by the user at the<br />

current project revision.<br />

All Locked recurses into any subprojects and subdirectories and<br />

displays all members that are locked by anyone at the current<br />

project revision.<br />

All New Tip Revision recurses into any subprojects and<br />

subdirectories and displays all members whose archive contains<br />

a revision number greater than the current one, but in the same<br />

branch.<br />

All Frozen Members recurses into any subprojects and<br />

subdirectories and displays only those members that are frozen.<br />

<strong>User</strong> <strong>Guide</strong> 57


Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces<br />

Setting the<br />

Proxy Server<br />

Project View Selections<br />

You can select multiple files that fit a particular category, based on<br />

their status, by selecting one of the following options in the Selections<br />

drop-down list:<br />

Reset All deselects all members listed in the project.<br />

All selects all members listed in the project.<br />

New Tip Revision selects all members whose archive contains a<br />

revision number greater than the current one, but in the same<br />

branch.<br />

Frozen selects all members that are frozen.<br />

Locked by me selects all members that are locked in the current<br />

user’s name.<br />

Archived select all members that have been archived.<br />

Invert Current reverses the selected and unselected files in the<br />

current filter.<br />

Overview of the History View<br />

<strong>The</strong> History view displays the history of all checkpoints performed<br />

on the project. It is similar to the Member view, but with a subset of<br />

its features.<br />

<strong>The</strong> History view displays a list of the project revisions. Each revision<br />

is displayed with its corresponding metadata.<br />

<strong>The</strong> following appears:<br />

Revision. <strong>The</strong> number of the revision in the project’s archive.<br />

Author. <strong>The</strong> name of the person who checkpointed the project.<br />

Date. <strong>The</strong> date and time when the project was checkpointed.<br />

State. <strong>The</strong> current state of the revision in the project’s archive.<br />

Description. <strong>The</strong> description of the project revision (entered when<br />

checkpointed).<br />

Labels. Any labels associated with the revision in the project’s<br />

archive.<br />

A selection checkbox for selecting a revision before choosing a<br />

command to act upon it.<br />

A proxy is a server that manages communication between a user and<br />

the Internet to ensure administrative control of your website.<br />

58 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface<br />

Proxy settings for the <strong>Source</strong> <strong>Integrity</strong> Web Interface specify how it<br />

communicates with the <strong>Integrity</strong> server using your browser.<br />

Note Changing your proxy settings can interrupt communication<br />

between the <strong>Source</strong> <strong>Integrity</strong> Web Interface and the <strong>Integrity</strong> server.<br />

Please contract your web administrator before changing your proxy<br />

settings.<br />

To set the proxy servers for the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. Choose Configuration > Configuration.<br />

<strong>The</strong> Configuration <strong>Guide</strong> page appears.<br />

2. Click Set the proxy servers. Your current proxy setting is<br />

displayed beside this link.<br />

<strong>The</strong> Set Proxies page appears.<br />

3. Set the following proxy server options:<br />

Use Proxy Server. Select this checkbox if you are using a<br />

proxy server to access the <strong>Integrity</strong> server. This is not the<br />

same as an autoproxy. If you are using an autoproxy, you<br />

need to set a manual proxy on this page.<br />

Fully compliant to HTTP 1.0. <strong>The</strong> method of communication<br />

between the <strong>Source</strong> <strong>Integrity</strong> Web Interface and the <strong>Integrity</strong><br />

server depends upon whether your proxy is fully compliant<br />

to HTTP 1.0 protocol. If it is, then select this checkbox.<br />

Selecting Use Proxy Server automatically selects this option.<br />

HTTP Proxy and Port. Enter the address of your proxy server<br />

(for example, proxy.mks.com) and the port it uses (for<br />

example, 4040). <strong>The</strong> address does not require the http://<br />

prefix.<br />

Security Proxy and Port. If you use a secure proxy server,<br />

enter the address (for example, proxys.mks.com) and the<br />

port it uses (for example, 200). <strong>The</strong> address does not require<br />

the https:// prefix.<br />

Exceptions. A list, separated by commas or semi-colons, of<br />

sites accessed without using the proxy. You can use the<br />

asterisk (*) character to identify a group of sites (for example,<br />

local.*:*).<br />

4. When you are finished, click OK to accept these settings, or<br />

Cancel to cancel them.<br />

<strong>User</strong> <strong>Guide</strong> 59


Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces<br />

Setting Your Timezone Display<br />

You can choose whether to display timestamps in Greenwich Mean<br />

Time (GMT) or your own local server timezone. Your administrator<br />

will set the default behavior of your installation, but you can change<br />

this setting in both the Windows interface and the <strong>Source</strong> <strong>Integrity</strong><br />

Web Interface.<br />

If your installation of the the Windows interface or <strong>Source</strong> <strong>Integrity</strong><br />

Web Interface is set to display times in GMT, the letter Z is appended<br />

to the timestamp.<br />

Note This setting does not affect date strings in log files or revision<br />

descriptions.<br />

To set your timezone display in the Windows interface:<br />

1. Choose Configuration > Personal.<br />

<strong>The</strong> Personal Configuration dialog box appears, showing the<br />

Preferences tab.<br />

2. To display timestamps in your server’s local timezone, select the<br />

Use Local Timezone checkbox. To display them in GMT, leave the<br />

checkbox empty.<br />

3. Click OK to accept these settings, or click Cancel.<br />

To set your timezone display in the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface:<br />

1. From the <strong>Source</strong> <strong>Integrity</strong> Web Interface home page, choose<br />

Configuration > Configuration.<br />

<strong>The</strong> Configuration <strong>Guide</strong> page appears.<br />

2. Click Select the default Time Zone. Your current default timezone<br />

setting is displayed beside this link.<br />

<strong>The</strong> Select Timezone Display Mode page appears.<br />

3. Select one of the following options:<br />

GMT. Displays all timestamps in Greenwich Mean Time. If<br />

you choose this option, timestamps will be followed by the<br />

letter Z.<br />

60 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> Command Line Interface<br />

Project<br />

Commands<br />

Versus Archive<br />

Commands<br />

<strong>The</strong> Command Line Interface<br />

Local Time Zone. Displays all timestamps in the time zone of<br />

your local server.<br />

4. When you are finished, click OK to accept these settings, or<br />

Cancel to cancel them.<br />

Note In the <strong>Source</strong> <strong>Integrity</strong> Web Interface, keywords are expanded on<br />

your server, and then copied to your client machine even though your<br />

working files reside on your client machine. <strong>The</strong>refore, any dates and<br />

times will be server-relative rather than client-relative.<br />

<strong>Source</strong> <strong>Integrity</strong> provides a complete command line interface to<br />

manage your projects and archives. With few exceptions, the<br />

command-line interface and Windows interface of <strong>Source</strong> <strong>Integrity</strong><br />

provide the same functionality.<br />

Note <strong>The</strong> command line interface is not accessible from the <strong>Source</strong><br />

<strong>Integrity</strong> Web Interface.<br />

<strong>Source</strong> <strong>Integrity</strong>’s command line interface has two types of<br />

commands:<br />

Project commands operate on project members or entire projects;<br />

they automatically update project metadata when they perform<br />

their functions.<br />

Archive commands operate on archives only, even if the archive is a<br />

member of a <strong>Source</strong> <strong>Integrity</strong> project.<br />

<strong>The</strong>ir main difference concerns project functionality. Project<br />

commands provide extra project management capabilities, assistance<br />

in the build process, and reporting information. <strong>The</strong>y are the most<br />

versatile way to manage source materials.<br />

Archive commands are supplied mainly for legacy purposes.<br />

Although compatible with project commands, they do not provide<br />

project functionality. <strong>The</strong> sole exception to this allows archive<br />

commands to examine a project file to find archives. Most archive<br />

commands accept the -Pprojfile.pj parameter to do this.<br />

<strong>User</strong> <strong>Guide</strong> 61


Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces<br />

Command-Line<br />

Length<br />

Path Separator<br />

Wildcard<br />

Expansion<br />

While archive commands are individual executables, the project<br />

commands are available through the pj executable. Project<br />

commands follow the general syntax pj directive, where directive is a<br />

<strong>Source</strong> <strong>Integrity</strong> function (ci, co, freeze, build, and others).<br />

Which Project Will Project Commands Operate On?<br />

If you do not specify a project when you call a pj command, it uses<br />

the following order of precedence to determine the project it should<br />

act on<br />

the project named by the PROJECT environment variable<br />

the project named by the ROOTPROJECT environment variable<br />

a sandbox named sandbox.pj in the current working directory<br />

a project named project.pj in the current working directory<br />

<strong>The</strong> operating system and shell where <strong>Source</strong> <strong>Integrity</strong> commands<br />

are run determines the allowable length of the commands.<br />

Under the DOS command.com shell, the maximum length is 128<br />

bytes.<br />

Under the KornShell (provided with <strong>MKS</strong> Toolkit) the maximum<br />

length is 8K.<br />

On UNIX systems, the maximum length is usually greater than<br />

16K.<br />

If the number of files to be included in a command extends the line<br />

past these limits, you can use a file list (explained later) or include all<br />

the files in a project and issue commands for the entire project at<br />

once.<br />

<strong>The</strong> DOS, OS/2 and Windows 95/98 and NT versions of <strong>Source</strong><br />

<strong>Integrity</strong> understand both the DOS and UNIX path separators (that is,<br />

the backslash and slash character, respectively). On these systems, the<br />

following commands are both valid:<br />

rlog c:\src\work\graphics.c<br />

rlog c:/src/work/graphics.c<br />

On UNIX systems, <strong>Source</strong> <strong>Integrity</strong> commands understand only the<br />

UNIX path separator.<br />

Under <strong>Source</strong> <strong>Integrity</strong>, the asterisk wildcard can indicate all files in a<br />

directory, as well as zero or more characters in a filename.<br />

62 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


File Name<br />

Arguments<br />

For more information about<br />

how <strong>Source</strong> <strong>Integrity</strong> resolves<br />

wildcards in filenames, see<br />

“Wildcard Expansion” on<br />

page 62.<br />

<strong>The</strong> Command Line Interface<br />

For example, to check in all of the files in the current directory, you<br />

can use either<br />

pj ci *<br />

pj ci *.*<br />

Wildcards are allowed anywhere in a path or filename. For example,<br />

the characters “*a*” represent any files that contain the letter “a” in<br />

the basename or the extension.<br />

For project commands, file refers to members of a <strong>Source</strong> <strong>Integrity</strong><br />

project. If the file argument is omitted for project commands, the<br />

command is applied to all of the members of the project.<br />

<strong>The</strong> file element must be the last entry of a command statement. <strong>The</strong>re<br />

are three ways to apply a command to multiple files.<br />

Enter Multiple File Names<br />

You can enter two or more filenames, separated by spaces, as the<br />

file component. For example, the command<br />

pj co -l prog.c brochur.toc brochur.idx<br />

checks out all three files. You can name as many files as you like<br />

on the command line (subject to the line length limitations of<br />

your operating system).<br />

Use Wildcards<br />

Use wildcards in the file component. For example, the command<br />

pj ci brochur.*<br />

checks in all files with the basename brochur and any extension.<br />

Specify a File List<br />

A file list (specified with the -Ffilename option) is a text file<br />

containing the names of the files a command should be applied<br />

to. For example, the command<br />

pj ci -Fflist.lst<br />

checks in all the files listed in the flist.lst file.<br />

Files named in the file element may have any level of path<br />

qualification.<br />

A file list is a text file containing a list of filenames, with each name on<br />

a line by itself. When you pass a file list to <strong>Source</strong> <strong>Integrity</strong>, it reads<br />

the filenames and applies the command to them in sequence.<br />

<strong>User</strong> <strong>Guide</strong> 63


Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces<br />

You can create a file list with any text editor by entering filenames—<br />

one name per line—in a plain text file. Alternatively, you can compile<br />

a list of files with the find command and copy them to a text file. <strong>The</strong><br />

find command is a standard UNIX utility and is available on PC<br />

systems with <strong>MKS</strong> Toolkit.<br />

File lists can be used with project commands, as well as the ci, co,<br />

rcs, rcsdiff, rcsclean, rlog, pvcs2rcs, sccs2rcs, and report<br />

commands.<br />

64 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Getting Started With<br />

Projects, Sandboxes,<br />

and Members<br />

4<br />

This chapter describes the <strong>Source</strong> <strong>Integrity</strong> features that you will use<br />

in your day-to-day activities, and explains how to perform tasks<br />

using the three main interfaces to <strong>Source</strong> <strong>Integrity</strong>:<br />

Windows interface<br />

Command line interface<br />

<strong>Source</strong> <strong>Integrity</strong> Web Interface<br />

For introductory information about these three interfaces, see<br />

Chapter 3: “Introducing the <strong>Source</strong> <strong>Integrity</strong> Interfaces” on page 39.<br />

For information about using <strong>Source</strong> <strong>Integrity</strong> in development<br />

environments, see Chapter 7: “Using Extensions” on page 197.<br />

<strong>User</strong> <strong>Guide</strong> 65


Getting Started With Projects, Sandboxes, and Members<br />

Creating a Project<br />

When you are ready to place a group of files under <strong>Source</strong> <strong>Integrity</strong><br />

control, the first step is to create a project. Organizing your files in a<br />

project allows you to perform configuration management operations<br />

on the files as a group.<br />

You should place the project file in the topmost directory of the<br />

source file hierarchy. <strong>Source</strong> <strong>Integrity</strong> projects work best when all<br />

project members reside in a single directory tree under the project<br />

directory. While members can reside anywhere on the system,<br />

spreading projects across multiple directory trees increases the<br />

chances that something will go wrong, since different users may map<br />

network drives differently, and there is no guarantee that all users<br />

will be able to access every directory on the system. Project members<br />

which are not located in the same directory tree as the rest of the<br />

project are called out-of-tree members.<br />

Note <strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface does not support out-of-tree<br />

members. If you want to use the <strong>Source</strong> <strong>Integrity</strong> Web Interface to access<br />

a project, all of its members must be in the same directory tree.<br />

<strong>The</strong> Windows interface provides a wizard to lead you through the<br />

process of creating projects. You can choose to add members and<br />

create a sandbox while you are creating the project, or choose to do it<br />

later.<br />

To create a project in the Windows interface:<br />

1. Choose File > Create Project, or click .<br />

Step 1 of the Create Project Wizard appears.<br />

66 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


2. In Step 1, enter the following options:<br />

<strong>The</strong> Project Name (default is project.pj).<br />

Creating a Project<br />

<strong>The</strong> Project Location. You can type a full directory pathname,<br />

or click Browse to find or create a directory.<br />

Click Next.<br />

Step 2 of the Create Project Wizard appears.<br />

3. In Step 2, enter the names of any members you want to Add to the<br />

project. This step is optional; you can always add members to<br />

your project later. While adding members, you can also choose<br />

the following options:<br />

whether to create member archives, and whether you want<br />

the member archives created automatically or interactively<br />

whether to create a project archive<br />

Note It is recommended that you create archives for all members and<br />

the project, so that all changes to these objects can be tracked.<br />

To create the project without creating an associated sandbox, click<br />

Finish. To create an associated sandbox for the project, click Next.<br />

Step 3 of the Create Project Wizard appears.<br />

<strong>User</strong> <strong>Guide</strong> 67


Getting Started With Projects, Sandboxes, and Members<br />

For information about the<br />

different types of sandboxes,<br />

see “Creating a Sandbox” on<br />

page 76.<br />

4. In Step 3, if you want to create an associated sandbox, click Yes.<br />

Enter a Sandbox Name and Sandbox Location. You can type a full<br />

directory pathname, or click Browse to find or create a directory.<br />

You can specify any name you want for the sandbox.<br />

5. Click Finish.<br />

<strong>Source</strong> <strong>Integrity</strong> opens the project and displays the list of members in<br />

a Project window.<br />

To create a project in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. Choose Project > Create Project.<br />

2. On the Create Project page, choose the drive, directory, and file<br />

name for your project on the server file system and click OK. You<br />

can accept the default project name project.pj.<br />

<strong>The</strong> project is created and the Project page appears.<br />

When you create a project using the <strong>Source</strong> <strong>Integrity</strong> Web Interface, it<br />

is automatically registered (see “Registering a Project in the <strong>Source</strong><br />

<strong>Integrity</strong> Web Interface” on page 69). You cannot add members,<br />

create archives, or create a sandbox while creating a project in the<br />

<strong>Source</strong> <strong>Integrity</strong> Web Interface; you must perform these actions<br />

afterward.<br />

To create a project in the command-line interface:<br />

Change to the directory that will be the root of the project directory<br />

tree, and enter the command<br />

pj create [-Pprojname]<br />

This creates a project file with the name projname in the current<br />

directory. If you omit the optional -P parameter, the project is given<br />

the default name set by the PROJECT environment variable, or<br />

project.pj if there is no PROJECT variable defined.<br />

You cannot add members, create archives, or create a sandbox while<br />

creating a project in the command-line interface; you must perform<br />

these actions afterward.<br />

68 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Registering a Project in the <strong>Source</strong> <strong>Integrity</strong> Web Interface<br />

Registering a Project in the <strong>Source</strong> <strong>Integrity</strong><br />

Web Interface<br />

Before you can use the <strong>Source</strong> <strong>Integrity</strong> Web Interface to access a<br />

project that was created using the <strong>Source</strong> <strong>Integrity</strong> Windows interface<br />

or command-line interface, you must register it first. Any projects<br />

created using the <strong>Source</strong> <strong>Integrity</strong> Web Interface are automatically<br />

registered (see “Creating a Project” on page 66).<br />

If you create (and therefore register) a project with the <strong>Source</strong><br />

<strong>Integrity</strong> Web Interface, you can still use the Windows interface or<br />

command-line interface to <strong>Source</strong> <strong>Integrity</strong> to access the project, as<br />

long as you have file-system access to the project directory.<br />

To register an existing project:<br />

1. Choose Project > Register Project from the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface home page.<br />

<strong>The</strong> Register Project page appears.<br />

2. Browse the server file system to select the project file you want to<br />

register, or enter the full path name and click OK.<br />

Registering a Sandbox in the <strong>Source</strong><br />

<strong>Integrity</strong> Web Interface<br />

Before you can use the <strong>Source</strong> <strong>Integrity</strong> Web Interface to access a<br />

sandbox that was created using the <strong>Source</strong> <strong>Integrity</strong> Windows<br />

interface or command-line interface, you must register it first. Any<br />

sandbox created using the <strong>Source</strong> <strong>Integrity</strong> Web Interface are<br />

automatically registered (see “Creating a Sandbox” on page 76).<br />

If you create (and therefore register) a sandbox with the <strong>Source</strong><br />

<strong>Integrity</strong> Web Interface, you can still use the Windows interface or<br />

command-line interface to <strong>Source</strong> <strong>Integrity</strong> to access the project, as<br />

long as you have file-system access to the project directory.<br />

To register an existing sandbox:<br />

1. Choose Project > Register Sandbox from the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface home page.<br />

<strong>The</strong> Register Sandbox page appears.<br />

<strong>User</strong> <strong>Guide</strong> 69


Getting Started With Projects, Sandboxes, and Members<br />

2. In step 1, to register a sandbox of a registered project, click the<br />

select it link. Whether a project is selected appears to the right of<br />

this link.<br />

3. In step 1, if the project is not registered, click the register it link.<br />

4. In step 2, click the specify link to locate the sandbox.<br />

Opening a Project or Sandbox<br />

5. In step 3, click the register the sandbox link. To close this page<br />

without registering a sandbox, click Cancel.<br />

To perform actions upon a member file in the Windows interface or<br />

<strong>Source</strong> <strong>Integrity</strong> Web Interface, you must first open the project or<br />

sandbox that it belongs to. In the command line interface, just<br />

navigate to the project directory before issuing any commands.<br />

To open a project or sandbox in the Windows interface:<br />

1. Choose File > Open Project/Sandbox, or click .<br />

<strong>The</strong> Open Project/Sandbox browser appears.<br />

2. If the project or sandbox you want to open is not in the current<br />

directory, navigate to the proper drive and directory.<br />

3. Select one or more sandboxes or projects from the list and press<br />

, or click OK.<br />

You can also open recently accessed projects or sandboxes by<br />

choosing their names from the list at the bottom of the File menu.<br />

Upon installation, <strong>Source</strong> <strong>Integrity</strong> creates a Windows association<br />

between itself and files that have the .pj extension. If you have not<br />

changed this association, you can also open a project or sandbox by<br />

double-clicking on the file name in Windows Explorer.<br />

To open a project in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. Register the project, if it has not been registered (see “Registering<br />

a Project in the <strong>Source</strong> <strong>Integrity</strong> Web Interface” on page 69).<br />

2. From the <strong>Source</strong> <strong>Integrity</strong> Web Interface home page, choose the<br />

Project > Open Project command.<br />

<strong>The</strong> Select Project page appears.<br />

70 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Opening the Master Project From a Sandbox<br />

3. In the Select Project page, choose the project you want to open<br />

from the list of registered projects and click OK.<br />

To open a subproject, select the project from the list of registered<br />

projects, click List Subprojects, select the subproject, and click OK.<br />

If you have no projects currently registered, the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface displays an error message.<br />

To open a sandbox in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. Register the sandbox, if it has not been registered (see<br />

“Registering a Sandbox in the <strong>Source</strong> <strong>Integrity</strong> Web Interface” on<br />

page 69).<br />

2. From the <strong>Source</strong> <strong>Integrity</strong> Web Interface home page, choose the<br />

Sandbox > Open Sandbox command.<br />

<strong>The</strong> Select Sandbox page appears.<br />

3. In the Select Sandbox page, choose the sandbox you want to open<br />

from the list of registered sandboxes and click OK.<br />

To open a subsandbox, select the sandbox from the list of registered<br />

sandboxes, click List Subsandboxes, select the subsandbox, and click<br />

OK.<br />

If you have no sandboxes currently registered, the <strong>Source</strong> <strong>Integrity</strong><br />

Web Interface displays an error message.<br />

Opening the Master Project From a Sandbox<br />

If you are working within a sandbox in the Windows interface or<br />

<strong>Source</strong> <strong>Integrity</strong> Web Interface, you can open the sandbox’s master<br />

project.<br />

To open a master project of a sandbox in the Windows interface:<br />

With a Sandbox window active, choose Project > Open Master Project.<br />

<strong>The</strong> master project appears in a Project window.<br />

To open a master project of a sandbox in the <strong>Source</strong> <strong>Integrity</strong><br />

Web Interface:<br />

In the Sandbox view, click Project.<br />

<strong>The</strong> Project view of the master project appears.<br />

<strong>User</strong> <strong>Guide</strong> 71


Getting Started With Projects, Sandboxes, and Members<br />

Adding Members to a Project<br />

As your body of source code grows, you will want to add members to<br />

your existing projects. You can add members using all three<br />

interfaces, but each interface handles the creation of member archives<br />

differently.<br />

In the Windows interface, you can choose to have <strong>Source</strong> <strong>Integrity</strong><br />

create an archive for any file that does not already have one. Archives<br />

can be created either interactively (you will be prompted before the<br />

archive is created) or automatically (default settings will be used).<br />

When you add members using the <strong>Source</strong> <strong>Integrity</strong> Web Interface,<br />

archives are always created for members that do not already have<br />

archives.<br />

<strong>The</strong> command-line interface does not allow you to create archives<br />

automatically as you add members. This must be done by explicitly<br />

checking the members in after you have added them.<br />

To add members to a project in the Windows interface:<br />

1. Choose Project > Add Members, or click (if you previously<br />

added this button to the toolbar).<br />

<strong>The</strong> Add Project Members dialog box appears.<br />

72 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Adding Members to a Project<br />

2. Select one or more files from the displayed file list, navigating to<br />

the desired directory if necessary. You can add all of the files and<br />

subdirectories in the current directory by clicking Select All.<br />

3. Click the Create Archives option to have <strong>Source</strong> <strong>Integrity</strong> create<br />

archives for any files that do not already have one. You may<br />

choose to have the archives created Automatically, in which case<br />

default settings are used, or Interactively, whereby you are<br />

prompted before each archive is created.<br />

4. To recursively add all files in any selected subdirectories, click<br />

Recursive Add.<br />

5. Press or click Add to add the new members to the project.<br />

Note If you want to add a very large number of files (more than 10,000,<br />

for example) from the same directory, you should navigate to the parent<br />

directory, select the directory that contains the files, and click Recursive<br />

Add.<br />

To add members to a project or sandbox using Windows<br />

Explorer:<br />

1. Position the <strong>Source</strong> <strong>Integrity</strong> application window and the<br />

Windows Explorer window so that they are both visible on your<br />

Windows desktop.<br />

2. In Windows Explorer, navigate to the appropriate directory and<br />

select one or more files to add as members. Click and drag the<br />

files onto a Project or Sandbox window in the <strong>Source</strong> <strong>Integrity</strong><br />

application window.<br />

<strong>The</strong> files are added to the project or sandbox. Members added<br />

through Windows Explorer do not have archives created for them<br />

by default. To create archives for these members, check them in.<br />

To add members to a project in the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface:<br />

1. From the Project or Sandbox view, choose Filters > Everything to<br />

display all files in the project or sandbox’s directory or Filters ><br />

Non-Members to display just those files that are not members of<br />

the project or sandbox.<br />

2. In the list of files, select the files you want to add to the project,<br />

and choose Member Commands > Add.<br />

<strong>User</strong> <strong>Guide</strong> 73


Getting Started With Projects, Sandboxes, and Members<br />

3. From the Add Member page, enter an Archive Description and a<br />

Label if desired. If you are adding more than one member, you<br />

can click OK to continue to the next member or choose Apply to<br />

All and then click OK to apply these properties to all of the<br />

members.<br />

<strong>The</strong> files are added to the project as members. If they did not<br />

already have archives, then archives are created for them.<br />

If an archive already exists, the file being added is checked in on a<br />

branch off of the archive’s head revision, to ensure that any<br />

changes to that file are stored in the archive while not creating a<br />

new revision on the trunk.<br />

To add members to a project in the command line interface:<br />

From the project or sandbox directory, use the pj add command. Its<br />

syntax is<br />

pj add [-R] [-rrev] [-ttype] [-Pprojname] [path/]filename<br />

where path is either the absolute path to the file or the path relative to<br />

the project or sandbox directory. Other options include the following:<br />

-R recursively applied this operation to any directories specified<br />

on the command line<br />

-rrev uses rev instead of head revision as the member’s revision<br />

-ttype overrides determination of a member’s type. A member’s<br />

type cannot be set to archived unless the member already has an<br />

archive.<br />

Normally, pj add and other pj commands use the file name of the<br />

working file, not of its archive (archives can be used, but are not<br />

required). <strong>Source</strong> <strong>Integrity</strong> uses the project file (and its own defaults)<br />

to locate archives. If archives exist for members you add, <strong>Source</strong><br />

<strong>Integrity</strong> sets the member revision to the head revision of the archive.<br />

If archives do not exist for members you have just added, you can<br />

create them by checking them in with the pj ci command.<br />

74 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Removing Members From a Project<br />

Removing Members From a Project<br />

If a member has outlived its usefulness or just does not belong in a<br />

project anymore, you can remove it at any time.<br />

After you remove a member from a project, the member is no longer<br />

listed as part of the project, but the member’s working file and<br />

archive remains, in case you need to recreate an earlier version of the<br />

project.<br />

To remove a member in the Windows interface:<br />

1. In a Project or Sandbox window, select one or more members to<br />

remove from the project.<br />

2. Choose Project > Remove Members, or click .<br />

A message box appears asking you to confirm the deletions.<br />

3. To remove the selected member(s), click Yes or Yes to All.<br />

<strong>The</strong> members are removed from the project.<br />

To close the dialog box without removing any members, click No<br />

or No to All.<br />

To remove a member in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. In the Project or Sandbox view, choose the member(s) you want<br />

to remove, and choose Member Commands > Drop.<br />

You are asked for confirmation.<br />

2. Click Yes.<br />

To remove a member in the command line interface:<br />

From the project directory, use the pj drop command. Its syntax is<br />

pj drop [-R] [options] file…<br />

where -R recursively applies this operation to any directories<br />

specified on the command line. <strong>The</strong> command line interface does not<br />

ask for confirmation.<br />

<strong>User</strong> <strong>Guide</strong> 75


Getting Started With Projects, Sandboxes, and Members<br />

Creating a Sandbox<br />

For more information, see<br />

“Freezing Members” on<br />

page 106.<br />

When you want to work in your own workspace without interfering<br />

with the work of others, you create a sandbox of the project you are<br />

working in.<br />

If you create a sandbox of a project that contains frozen subproject<br />

members, the members that populate your sandbox correspond to<br />

the member revisions in the checkpointed frozen revision of the<br />

subproject.<br />

While you can create a sandbox when you create a new project in the<br />

Windows interface, most users will create their own sandboxes to<br />

access the contents of existing projects. <strong>The</strong> Windows interface<br />

provides a wizard to lead you through the process of creating a<br />

sandbox.<br />

To create a sandbox in the Windows interface:<br />

1. Choose File > Create Sandbox, or click .<br />

<strong>The</strong> Step 1 panel of the Create Sandbox Wizard appears.<br />

2. In Step 1, enter the fully qualified name of the Master Project, or<br />

click Browse to locate it. If you have a project currently open, that<br />

project will be the default. Click Next.<br />

<strong>The</strong> Step 2 panel of the Create Sandbox Wizard appears.<br />

76 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For more information, see<br />

“Build Sandboxes” on<br />

page 25.<br />

Creating a Sandbox<br />

3. In the Step 2 panel, enter the Sandbox Name (default is<br />

sandbox.pj), and enter or Browse for the Sandbox Location. If<br />

you want to have working copies of the project’s members copied<br />

to the sandbox workspace, select the Copy Members to Sandbox<br />

option. If this option is not selected, the sandbox is created, but<br />

working copies of member files must then be copied or checked<br />

out to the sandbox workspace. Click Next.<br />

<strong>The</strong> Step 3 panel of the Create Sandbox Wizard appears.<br />

4. In the Step 3 panel, select the type of sandbox you want to create:<br />

Normal Sandbox, one that is based upon the most recent or<br />

head revision of the project. Click Finish.<br />

Variant Sandbox, one that is based upon a specific revision of<br />

the master project and is used for branching off of the main<br />

development path. Click Next.<br />

<strong>The</strong> Step 4 panel of the Create Sandbox Wizard appears,<br />

allowing you to select an Existing Development Path by<br />

specifying the Development Path Name; or a New Development<br />

Path by selecting By Revision or By Label and entering a new<br />

Development Path Name.<br />

Build Sandbox, a static sandbox that is based upon a specific<br />

revision of the master project, but is used for building or<br />

testing the project, not for further development. Click Next.<br />

<strong>User</strong> <strong>Guide</strong> 77


Getting Started With Projects, Sandboxes, and Members<br />

<strong>The</strong> Step 4 panel of the Create Sandbox Wizard appears.<br />

Select a project By Revision or By Label. Click Finish.<br />

<strong>The</strong> wizard dialog box closes, and a Sandbox window appears<br />

displaying the contents of the new sandbox.<br />

If the Create Sandbox option is set in the Recursion panel of the<br />

Personal Configuration dialog box, this command recursively creates<br />

sandboxes for subprojects that are members of the project (or<br />

members of subprojects) a sandbox is being created for. If this option<br />

is not enabled, <strong>Source</strong> <strong>Integrity</strong> prompts you to recurse for each<br />

subproject encountered in the master project.<br />

To create a sandbox in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. Choose Sandbox > Create Sandbox.<br />

<strong>The</strong> Create Sandbox <strong>Guide</strong> appears.<br />

2. To create a sandbox from a registered project, click the select it<br />

link. On the Create Sandbox - Select Project page, select the<br />

desired project (click List Subprojects if you want to select a<br />

subproject), and click OK.<br />

If the desired project is not registered on the server, click the<br />

register it link. On the Create Sandbox - Register Project page,<br />

browse to the location of the desired project, select it, and click<br />

OK.<br />

3. On the Create Sandbox <strong>Guide</strong> page, click the link to select (or<br />

create) the directory where you want to locate the sandbox. On<br />

the Create Sandbox - Locate Sandbox Directory page, type the<br />

path of the desired directory on your local client file system, or<br />

click Browse to locate a path, and click OK. In the <strong>Source</strong> <strong>Integrity</strong><br />

Web Interface, the name of the sandbox file must be the same as<br />

that of the project (for example, project.pj).<br />

4. To choose whether or not to copy the project members to your<br />

local sandbox, click the Choose a populate sandbox option link.<br />

<strong>The</strong> current setting is displayed beside the link.<br />

5. When you are finished setting options, click the create the<br />

sandbox link.<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface then displays the Sandbox<br />

view of your new sandbox.<br />

You cannot create a variant or build sandbox through the <strong>Source</strong><br />

<strong>Integrity</strong> Web Interface.<br />

78 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Creating a Sandbox<br />

To create a sandbox in the command line interface:<br />

Use the pj sandbox command. Its syntax is<br />

pj sandbox [-Ssbxname] -Pprojname<br />

where sbxname is the name of the new sandbox file (must be either<br />

fully qualified or relative to the current directory), and projname is the<br />

fully qualified file name of the master project.<br />

<strong>The</strong> -S argument is usually omitted in favor of the default file name<br />

sandbox.pj, as long as you are in the directory where you want to<br />

create the sandbox. Naming your sandboxes sandbox.pj or<br />

project.pj relieves you from using the -Psbxname argument in pj<br />

commands.<br />

By default, <strong>Source</strong> <strong>Integrity</strong> copies the project member files into the<br />

sandbox directory. If a project member is archived, <strong>Source</strong> <strong>Integrity</strong><br />

copies the revision of the member listed in the project. If the sandbox<br />

directory tree already contains writable copies of project members,<br />

they are not overwritten.<br />

To create a variant sandbox in the command line interface:<br />

Use the pj sandbox command with the syntax<br />

pj sandbox [-krev] -Npathname [-Ssbxname] [-Pprojname]<br />

where<br />

<strong>The</strong> -krev option specifies which revision of an archived project<br />

you want to use as the starting point for your new development<br />

path. A development path is a named diversion from the main<br />

evolution of the project. <strong>The</strong> -krev option automatically<br />

creates a sandbox for a specific revision of the project<br />

rebuilds a sandbox copy of the master project’s directory tree<br />

as it existed when the project was checkpointed<br />

populates the sandbox directory tree with copies of the<br />

appropriate revisions of project members<br />

<strong>The</strong> -Npathname option takes a development path name<br />

parameter. It uses the revision named with -krev as a starting<br />

point, and changes to variant sandboxes based on this path do<br />

not influence the main project (or sandboxes based on it).<br />

Other users can join an existing development path by issuing<br />

pj sandbox with only the -Npathname parameter, not the -krev<br />

option.<br />

<strong>User</strong> <strong>Guide</strong> 79


Getting Started With Projects, Sandboxes, and Members<br />

After creating a new variant sandbox, you should checkpoint the<br />

master project recursively by changing to the master project directory<br />

and issuing the pj checkpoint command<br />

pj -Pprojname -i checkpoint<br />

This step preserves <strong>Source</strong> <strong>Integrity</strong>’s record of the variant sandbox.<br />

For example, suppose you are currently working on Release 2 of a<br />

project; six months ago you finished Release 1, which you<br />

checkpointed and labeled as “Release_1”. Now, a change request has<br />

come in from a user of the Release_1 product and you have to go back<br />

and work on the earlier version.<br />

You create a sandbox just as you would any other, but you use the<br />

-krev option to specify the starting revision of the project, and the<br />

-Ndevname option to specify a development path name that others<br />

may use to follow the same path. For example, to recreate the revision<br />

of the gamble project that was labeled Release_1, enter<br />

pj sandbox -Pp:\gamble\project.pj -N postrm -k<br />

Release_1<br />

This creates a variant sandbox named sandbox.pj in the current<br />

directory that points to the Release_1 revision of the gamble project. It<br />

also creates a new development path, postrm that others can use to<br />

work on the same new direction of development.<br />

To preserve the record of the development path, issue the<br />

pj checkpoint command from the project directory. This checkpoints<br />

the master project, so that all its development paths can be recreated<br />

if necessary.<br />

You can now check out files and make changes in the variant sandbox<br />

of the gamble project.<br />

If others want to participate in the same divergent development, they<br />

can create their own variant sandboxes by specifying the<br />

development path name, without giving a revision.<br />

pj sandbox -Pp:\gamble\project.pj -N postrm<br />

To create a build sandbox in the command line interface:<br />

Use the pj sandbox command with the syntax<br />

pj sandbox -krev [-Ssbxname] [-Pprojname]<br />

where -krev option allows you to specify which revision of an<br />

archived project you want to recreate. It automatically<br />

creates a sandbox for a specific revision of the project<br />

80 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For more information about<br />

build sandboxes, see “Build<br />

Sandboxes” on page 25.<br />

Checking Out a Member<br />

rebuilds a sandbox copy of the master project’s directory tree as it<br />

existed when the project was checkpointed<br />

populates the sandbox directory tree with copies of the<br />

appropriate revisions of project members<br />

Note that you do not specify a development path name when<br />

creating a build sandbox.<br />

To create “Sparse Sandboxes” in the command line interface:<br />

When a sandbox is sparse, only those project members that you check out<br />

are actually copied to the sandbox. This can minimize your local<br />

storage requirements when working with large projects.<br />

You can include a policy option Sparse in SAM to cause <strong>Source</strong><br />

<strong>Integrity</strong> to make sparse sandboxes by default. If the Sparse option is<br />

present in SAM, <strong>Source</strong> <strong>Integrity</strong> does not automatically copy project<br />

members to your sandbox when it is created or refreshed.<br />

<strong>The</strong> pj sandbox command then creates only the sandbox file and a<br />

member usage file.<br />

If SPARSE is not set as the default, you can still create a sparse<br />

sandbox with the command<br />

pj sandbox -Vsparse …<br />

Checking Out a Member<br />

Before you can make changes to a member, you must first check it out<br />

of its archive. When you check out a revision, it is copied to a<br />

working file where you can view or modify its contents.<br />

To check out a project member or revision in the Windows<br />

interface:<br />

1. To check out a project member, select one or more members in a<br />

Sandbox or Project window and choose Member > Check Out, or<br />

click .<br />

To check out from an archive, select a revision in the Archive<br />

window and choose Archive > Check Out, or click .<br />

<strong>The</strong> Check Out dialog box appears.<br />

<strong>User</strong> <strong>Guide</strong> 81


Getting Started With Projects, Sandboxes, and Members<br />

2. Fill in or modify the check-out options, and click OK to check out<br />

the revision or member(s). To cancel the check out without<br />

checking out any files, click Cancel to stop the check out of a<br />

single file, or Cancel All to stop all remaining check out<br />

operations.<br />

Note To be able to perform check-out operations without the Check Out<br />

dialog box appearing, deselect the Show Dialog setting on the Checkout<br />

tab of the Personal Configuation dialog box. If you do this, <strong>Source</strong><br />

<strong>Integrity</strong> will use the settings in your personal configuration, combined<br />

with default settings, when checking out files.<br />

Check-Out Options<br />

You can specify a number of options upon check out, including:<br />

Working File. <strong>The</strong> fully qualified name of the working file the<br />

revision will be checked out to.<br />

If you use the Locked (for editing) option (following), you cannot<br />

set the name and location of the working file because its existing<br />

location is used to establish a link between the archive and its<br />

working file. If a writable file with the selected file name already<br />

exists, you are asked to confirm that it should be overwritten.<br />

If a revision is checked out unlocked from an archive with a strict<br />

locking policy, <strong>Source</strong> <strong>Integrity</strong> does not allow you to check it back<br />

in as a new revision.<br />

Selection of which revision of the member to check out.<br />

Default Rev. Checks out the tip revision of the default branch,<br />

usually the head revision.<br />

82 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Checking Out a Member<br />

Member Rev. Checks out the member revision, that is, the<br />

revision shown in the Sandbox or Project window (this is the<br />

default). This option is not available if you are checking out a<br />

revision from an Archive window that is not project aware.<br />

Revision. Checks out the revision with the specified revision<br />

number.<br />

Label. Checks out the revision with the specified label.<br />

Locked (for editing). Checks out a writable working file, and<br />

ensures no one else can make changes to the revision while you<br />

have it checked out by locking it in your name. If strict locking is<br />

enabled, you must check out a revision locked if you want to<br />

make changes to it. When a revision is checked out locked, the<br />

Working File field cannot be changed.<br />

Restore Timestamp. Sets the timestamp of the working file to the<br />

date and time of the revision in the archive. Otherwise, the<br />

working file’s timestamp is set to the current date and time.<br />

Create Branch. Creates a duplicate revision (that is, creates a<br />

branch in the archive) and checks it out. Note that if Update<br />

Member is not set as well, the working file and member revision<br />

will not match.<br />

All Files. When checking out more than one member, this applies<br />

the current set of options to all subsequent check-out operations.<br />

This option is disabled if only one member is selected.<br />

Expand Keywords. Replaces keywords in the revision with literal<br />

values in the working file. This option is disabled if the revision<br />

contains binary data.<br />

Update Member. When checking out from a project or sandbox,<br />

this causes the revision you check out to become the new member<br />

revision in the project. For example, if the current project member<br />

is listed as Revision 2.3 and you check out Revision 1.7 using this<br />

option, Revision 1.7 replaces Revision 2.3 as the member of the<br />

project.<br />

To check out a member in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. Click the Sandbox view tab to see the contents of your sandbox.<br />

<strong>User</strong> <strong>Guide</strong> 83


Getting Started With Projects, Sandboxes, and Members<br />

2. Select the member(s) you want to check out, and choose Member<br />

Commands > Check Out Locked.<br />

<strong>The</strong> Web Interface locks the sandbox member in your name and<br />

copies the content of the revision into a writable working file.<br />

If the Check Out page informs you that the working file has been<br />

changed, you can click Yes to overwrite the working file, or click<br />

Show Differences to view the differences between the working<br />

file and the revision you are checking out.<br />

To check out a member in the command line interface:<br />

Use the pj co command. Its syntax is<br />

pj co [-l] [-r rev|label] [-Pprofile.pj] [file…]<br />

<strong>The</strong> -l option lets you check out and lock a revision for editing.<br />

When you check out a revision locked, <strong>Source</strong> <strong>Integrity</strong> extracts a<br />

writable copy of the revision to your working directory. While you<br />

hold a lock on a revision, no one else can check out a writable copy of<br />

it; this ensures that only one person at a time makes changes to a<br />

given revision.<br />

A revision that is checked out unlocked is copied to a read-only<br />

working file, if a strict locking policy is in effect for the archive. In<br />

addition, with a strict locking policy, <strong>Source</strong> <strong>Integrity</strong> only lets you<br />

check in a file if it was first checked out locked.<br />

When strict locking is not in effect, check-in operations are<br />

unrestricted, provided no one else has a lock on the revision.<br />

For example, the command<br />

pj co -l filesys.c<br />

checks out a writable copy of the project member filesys.c and<br />

locks it in your name. If the revision is already locked by another<br />

user, you can still check out a read-only copy with<br />

pj co filesys.c<br />

You can check out a revision by specifying its revision number or<br />

label, using the -r option to the pj co command.<br />

For example, the command<br />

pj co -rworking betting.c<br />

84 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Viewing and Editing a Member<br />

checks out a revision with the label “working” from the betting.c<br />

archive. If the revision is not the project’s member revision, the<br />

following message appears:<br />

d:\gamble\src\betting.c: checkout revision 1.1<br />

update project revision from 1.15 to 1.1? [yn](y)<br />

Whether you press y or n, the file is checked out. If you press y, the<br />

project file is changed to use this as the member revision.<br />

Viewing and Editing a Member<br />

Using <strong>Source</strong> <strong>Integrity</strong> commands, you can open a member in your<br />

default editor application (for example, Microsoft Windows Notepad<br />

or <strong>MKS</strong> Toolkit’s vi editor). Whether you can edit or just view the<br />

contents of the member depends upon whether you have read-only<br />

or read-write access to the member. You must have a member locked<br />

in your name to be able to edit it.<br />

In the Windows interface, the Member menu command that is<br />

available depends upon the type of member you have selected.<br />

Member Menu<br />

Command<br />

Selected Member of Type<br />

View Working File Archived or Non-Archived member, with a read-only<br />

working file.<br />

Edit Working File Archived or Non-Archived member, with a writable<br />

working file.<br />

Open Subproject Subproject.<br />

<strong>User</strong> <strong>Guide</strong> 85


Getting Started With Projects, Sandboxes, and Members<br />

<strong>The</strong> preceding commands behave differently depending on the type<br />

of member they act upon.<br />

Member Type Behavior<br />

Archived Opens the member’s working file.<br />

Non-Archived Opens the member file for a master project, or its<br />

sandbox copy.<br />

Subproject Opens a Project window to display the subproject’s<br />

members (Windows interface) or displays the<br />

subproject’s members in the Project view (<strong>Source</strong><br />

<strong>Integrity</strong> Web Interface).<br />

To view a revision of a member (not the working file):<br />

1. Choose Member > Open Member Archive to open the member’s<br />

archive window.<br />

2. Select the revision, and choose Archive > View Revision, or<br />

click . When you view a revision of a member, <strong>Source</strong><br />

<strong>Integrity</strong> copies the revision to a read-only temporary file and<br />

opens it for you. <strong>The</strong> temporary file is not the actual revision, but<br />

rather a read-only copy of it.<br />

To view or edit the working file:<br />

Select the member in the project or sandbox window, and choose<br />

Member > View/Edit Working File.<br />

<strong>The</strong> working file is opened in your default editor, or in the<br />

application associated with the file’s extension.<br />

To set your default editor:<br />

1. In your Personal Configuration dialog box, Preferences panel,<br />

choose either of the two Editor options:<br />

Use File Manager/Explorer File Associations: opens files in the<br />

applications associated with each file’s extension. If you<br />

choose this option, the View/Edit Working File toolbar button<br />

will be an icon that represents the application associated with<br />

the file that you have selected in the Project or Sandbox<br />

window.<br />

Editor: Enter or Browse for the editing application you would<br />

like as your default.<br />

86 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Checking In a Member<br />

Starting a<br />

Branch When<br />

Checking In a<br />

Member<br />

Checking In a Member<br />

2. When finished, click OK to accept changes, or Cancel to close the<br />

dialog box without changing any settings.<br />

To view a member in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

Select a member. From the Project or Sandbox view, choose Member<br />

Commands > View.<br />

To view a revision of a member (not the working file), select a<br />

revision in the Member view and choose View.<br />

To set the default editor in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. From the <strong>Source</strong> <strong>Integrity</strong> Web Interface home page, choose<br />

Configuration.<br />

<strong>The</strong> Configuration <strong>Guide</strong> appears, displaying the current default<br />

editor setting. When <strong>Source</strong> <strong>Integrity</strong> is first installed, it is set to<br />

use Windows Explorer file associations unless you change this<br />

setting.<br />

2. To change this setting, choose Select the default editor.<br />

<strong>The</strong> Select Default Editor page appears.<br />

3. Select the Editor setting and enter or Browse for the editor<br />

application you want to use. Click OK.<br />

When you are satisfied with the changes you have made to a member,<br />

you should check in the member to preserve those changes as a new<br />

revision in the archive. Files should be checked in on a regular basis.<br />

<strong>Source</strong> <strong>Integrity</strong> usually places new revisions at the top of the trunk,<br />

assigning them two-part revision numbers, such as 1.15. <strong>The</strong>re are<br />

times, however, when you do not want your work to be checked into<br />

the trunk. You may be pursuing a line of development that will not be<br />

included in the finished product, for instance, or you may be doing<br />

post-release maintenance while development for the next release<br />

continues on the trunk.<br />

Divergent lines of development in the same archive are managed<br />

through the use of branches. A branch is an independent revision line<br />

that uses an existing revision as its starting point. Members of a<br />

branch revision are identified by their revision numbers. Whereas<br />

<strong>User</strong> <strong>Guide</strong> 87


Getting Started With Projects, Sandboxes, and Members<br />

Assigning<br />

Revision<br />

Numbers<br />

revisions on the trunk are characterized by two-part revision<br />

numbers (for example, 1.2 or 3.5), branch revision numbers are<br />

prefixed with the number of the revision they start from. For<br />

example, if a branch revision is started from revision number 1.2, the<br />

members of that branch is numbered<br />

1.2.1.3<br />

1.2.1.2<br />

1.2.1.1<br />

and so on. <strong>The</strong> first two digits of the number identify the revision<br />

where the branch diverges from the trunk, and the last two represent<br />

a position on the branch.<br />

To start a branch during the check-in operation:<br />

1. Check out a revision (other than the tip of the trunk) locked.<br />

2. Make the desired changes to the working file.<br />

3. Check in the working file, without specifying a new revision<br />

number. By default, <strong>Source</strong> <strong>Integrity</strong> detects that this is a new<br />

branch and assigns an appropriate four-part revision number. For<br />

example, if you have checked out and locked revision 1.2, the<br />

new revision has the number 1.2.1.1 assigned to it. In the<br />

Windows interface, the revision number field is primed with the<br />

appropriate number.<br />

By default, when you check in a file, <strong>Source</strong> <strong>Integrity</strong> automatically<br />

assigns a unique revision number to the new revision. It does this by<br />

incrementing the current revision number by one. For example, if the<br />

previous revision is 1.3, the new revision is assigned number 1.4.<br />

You can choose the revision number of the changes you are checking<br />

in, so long as your revision number<br />

is greater than the last revision number (you cannot use<br />

previously “skipped” revision numbers)<br />

has no leading zeros (zeros as complete revision numbers are<br />

acceptable)<br />

starts a new branch based on an existing revision<br />

If you check in a revision using an already existing revision number,<br />

<strong>Source</strong> <strong>Integrity</strong> attempts to add one to the revision number and<br />

check it in as that revision. If that revision already exists, <strong>Source</strong><br />

<strong>Integrity</strong> then chooses the next available branch number and creates a<br />

new branch.<br />

88 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Assigning<br />

Revision<br />

Descriptions<br />

Checking In a Member<br />

For example, if you are checking in a new revision to an archive<br />

where the head revision is 1.7, the following numbers are valid:<br />

1.8 (greater than head revision)—if you check in a revision as 1.7,<br />

which already exists, <strong>Source</strong> <strong>Integrity</strong> assigns it 1.8<br />

1.10 (greater than head revision)<br />

1.72 (although misleading—none of the numbers between 7 and<br />

72 may be used afterward)<br />

2.0 is valid (zero as a revision number is valid)<br />

1.7.1.1 is valid (if it starts a new branch)<br />

<strong>The</strong> following numbers are invalid:<br />

1.3, even if there was no revision 1.3 previously (<strong>Source</strong> <strong>Integrity</strong><br />

branches the archive and assign 1.3.x.1, where x is the first<br />

available branch number)<br />

1.08 (leading 0 in last portion)<br />

02.1 (leading zero in branch number)<br />

A revision description is a string of text that becomes a permanent part<br />

of the archive’s metadata. It allows you to provide a record of the<br />

changes you made and why you made them. This can be of great<br />

value to you or other team members if it ever becomes necessary to<br />

revise or update the file.<br />

Once a new revision has been checked in, its revision description<br />

cannot be changed, although you can append new information to a<br />

revision description.<br />

To check in a member in the Windows interface:<br />

1. Select one or more files in the Sandbox or Project window and<br />

choose Member > Check In, or click .<br />

<strong>The</strong> Check In dialog box appears.<br />

<strong>User</strong> <strong>Guide</strong> 89


Getting Started With Projects, Sandboxes, and Members<br />

If you check in one or more members that are themselves<br />

subprojects, the Checkpoint dialog box appears instead (see<br />

“Checkpointing a Project” on page 136).<br />

2. Fill in or modify the check-in options (see “Check-In Options”,<br />

below), and click OK to check in the member as a new revision.<br />

To cancel the check-in operation, click Cancel.<br />

To check in a revision in the Windows interface:<br />

1. To check in an archive’s working file, display the appropriate<br />

Archive window and choose Archive > Check In, or click .<br />

<strong>The</strong> Check In dialog box appears.<br />

2. Fill in or modify the check-in options, and click OK to check in the<br />

working file as a new revision.<br />

To cancel the check-in operation, click Cancel.<br />

Check-In Options<br />

Revision Label. A unique text string that identifies the new<br />

revision. Revision labels are usually assigned during check in,<br />

but can be added later, for instance, using the Label command in<br />

the Windows interface.<br />

90 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Checking In a Member<br />

Revision Number. If you do not specify one, <strong>Source</strong> <strong>Integrity</strong><br />

provides a default, usually the next revision number available in<br />

the archive. For instance, if the file you checked out was revision<br />

3.2 and that is the highest revision number on the trunk, <strong>Source</strong><br />

<strong>Integrity</strong> defaults to revision 3.3.<br />

If you choose to override the suggested revision number, the<br />

number you supply must be higher than the head revision<br />

number (if you are checking into the trunk), or the tip revision<br />

number (if you are checking into a branch). If you try to assign an<br />

invalid number, such as 2.01 to a revision, you receive an error<br />

message.<br />

State. A one-word description of a new revision’s status. This<br />

option is necessary for tracking the promotion of the member. If<br />

promotion is turned off, the default for this value is “Exp” (for<br />

Experimental) and can be edited. If promotion is turned on, the<br />

default is the lowest promotion state, and the states cannot be<br />

edited.<br />

Author. <strong>The</strong> name of the person who made the changes to the<br />

new revision. This field may be editable depending upon your<br />

permissions. By default, this is set to your user name.<br />

Locked. Checks in the working file, then immediately locks the<br />

new revision. This allows you to update the project while<br />

retaining control of the revision. Without this option, the working<br />

file is checked in and your lock on it is removed.<br />

Check In Same. Tells <strong>Source</strong> <strong>Integrity</strong> you are intentionally<br />

checking in a file that is unchanged. In the Windows interface, if<br />

this option is not used and no changes have been made, you are<br />

prompted to confirm the check-in operation.<br />

Update Member. Makes the new revision the member revision in<br />

the project, replacing the existing member revision.<br />

Keep Work File. Checks in the file and immediately checks it out<br />

again. If this option is not used, the working file is automatically<br />

deleted when it is checked in.<br />

Replace Label. If the label you choose already exists in the<br />

archive, this option deletes the label from the revision it is<br />

currently attached to and applies it to the new revision. In the<br />

Windows interface, if this option is not used and a labeling<br />

conflict occurs, you are prompted to move the label to the new<br />

revision.<br />

<strong>User</strong> <strong>Guide</strong> 91


Getting Started With Projects, Sandboxes, and Members<br />

For more information on<br />

associating active propoals<br />

and configuring Change<br />

<strong>Integrity</strong> Connect, see<br />

“Integrated Version Control”<br />

on page 437<br />

All Files. If you are checking in more than one file, this option<br />

causes the current set of options to be applied to all subsequent<br />

check-in operations. If you are checking in only one file, this<br />

option is disabled<br />

Active CI Issue. An active issue associated with the member. This<br />

field is greyed out if Change <strong>Integrity</strong> Connect is not enabled.<br />

Revision Description. A long, free-form comment about the new<br />

revision. For example, you can enter a detailed description of<br />

what you changed, what bug in the software the changes were<br />

meant to correct, or instructions for the next person who will<br />

work on the file.<br />

To check in a member in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

Note You can not associate an issue with members in the <strong>Source</strong><br />

<strong>Integrity</strong> Web interface.<br />

Use the Check In command from the Sandbox view.<br />

1. Select the members you want to check in. Choose Locked by Me<br />

or Modified from the Selections menu.<br />

2. From the Member Commands menu, choose Check In.<br />

<strong>The</strong> Check In page appears, listing the member(s) to be checked<br />

in, and the full path of the current project or sandbox.<br />

3. To see the changes you have made before checking them into the<br />

archive, click Show Differences.<br />

<strong>Source</strong> <strong>Integrity</strong> Web Interface displays the differences between<br />

the working file you are about to check in and the revision from<br />

which it was derived, using the Visual Difference utility.<br />

4. Enter your metadata in the fields provided.<br />

Revision Description. Text commenting on the content of, or<br />

reason for, the new revision<br />

Label. Text which can be used to identify the revision. To<br />

move an existing label from a previous revision to the current<br />

revision, select Replace Label.<br />

State. A one-word description of the new revision’s status.<br />

Author. <strong>The</strong> name of the person checking in the revision, by<br />

default your user name.<br />

92 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Checking In a Member<br />

5. Select Keep Locked After Check In to keep the revision locked<br />

after it has been checked in.<br />

6. For multiple members, select Apply to All to apply the metadata<br />

and selected options to all members being checked in.<br />

7. Click OK.<br />

To check a member into a project with the command line<br />

interface:<br />

Use the pj ci command. Its syntax is<br />

pj ci [options] [-l] filename…<br />

where options are zero or more modifying options (see the <strong>Source</strong><br />

<strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong> Reference <strong>Guide</strong> or the online man pages).<br />

By default, the pj ci command releases your lock on the member<br />

revision, allowing other users to make changes to it. However, if you<br />

want to maintain your lock (perhaps you intend to keep working on<br />

the file) you can use the -l option to check it in without releasing<br />

your lock.<br />

pj ci -l filename<br />

For example, to check in a member named nt\filesys.c, you would<br />

enter<br />

pj ci nt\filesys.c<br />

<strong>Source</strong> <strong>Integrity</strong> displays the message:<br />

d:\gamble\nt\filesys.c: checking in revision 1.1<br />

revision is now 1.2<br />

Enter log message:<br />

(Terminated with End-of-File or ‘.’ RETURN:)<br />

>><br />

This message tells you the number of the revision you had checked<br />

out (revision 1.1), and that revision number 1.2 is being assigned to<br />

the new revision. <strong>The</strong> >> prompt allows you to enter a revision<br />

description for the new revision.<br />

Enter the first line of the revision description at the >> prompt and<br />

press . Another >> prompt is displayed. Repeat these steps to<br />

enter as many description lines as you choose.<br />

When you have completed the revision description, enter a single<br />

period “.” at the >> prompt, and press .<br />

<strong>User</strong> <strong>Guide</strong> 93


Getting Started With Projects, Sandboxes, and Members<br />

Assigning<br />

Labels<br />

Assigning a<br />

State<br />

For more information on this<br />

more structured use of state<br />

settings, consult the States<br />

configuration option and the<br />

Promote and Demote SAM<br />

permissions.<br />

Assigning a<br />

Different<br />

Revision<br />

Number<br />

You can assign a label to the new revision at check-in time, using the<br />

-Nlabel option of the pj ci command for project members. To assign a<br />

multi-word label, enclose label in quotes.<br />

To check in the member filesys.c and assign the label “Test<br />

Version” to the new revision, you would enter the command<br />

pj ci -N"Test Version" filesys.c<br />

You can set a revision’s state at check in, using the -s state option to<br />

the check in command.<br />

For example, the command<br />

pj ci -s Review prog.c<br />

checks in the project member prog.c and assigns a state of “Review”<br />

to the new revision. If promotion is turned on, the specified state<br />

must be a valid state in the promotion states list.<br />

State settings can also be used to establish and enforce promotion<br />

policies at your site.<br />

Normally, <strong>Source</strong> <strong>Integrity</strong> assigns the next available revision number<br />

to the revision. If you want to assign a number that is greater than the<br />

next available one, you can use the -rrev option, where rev is your<br />

new revision number. If you want to create a branch at a particular<br />

revision, then specify a revision rev that already exists.<br />

Viewing and Editing Project and Sandbox<br />

Information<br />

<strong>The</strong> Windows and command line interfaces allow you to view, edit,<br />

or delete some important pieces of information about a project or<br />

sandbox, listed below. Those that apply only to the Windows<br />

interface are indicated.<br />

Project/Sandbox Name. <strong>The</strong> fully qualified name of the master<br />

project or the sandbox.<br />

Working Directory. By default, this is the root of the sandbox<br />

directory tree for sandboxes, or the root of the master project’s<br />

directory tree for projects.<br />

Total Members. <strong>The</strong> number of members in the project or<br />

sandbox.<br />

94 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Viewing and Editing Project and Sandbox Information<br />

Locked Members. <strong>The</strong> number of locked members in the project<br />

or sandbox (Windows only).<br />

Revision. <strong>The</strong> master project’s revision number.<br />

SAM Database. <strong>The</strong> location of the SAM database.<br />

Description. A free-form text description of the master project.<br />

This information cannot be modified from a sandbox.<br />

Attributes. <strong>The</strong> attribute settings for the master project (see<br />

“Setting Project or Sandbox Attributes” on page 97). <strong>The</strong> master<br />

project’s attributes cannot be changed in the Sandbox<br />

Information dialog box, but can be overridden by duplicate<br />

Sandbox Attributes (Windows only).<br />

In the Project Information dialog box, you can also view and<br />

delete any development paths associated with it (Windows only).<br />

Note This functionality is not available in the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface.<br />

To view or edit project or sandbox information in the Windows<br />

interface:<br />

1. With a project or sandbox window active, choose Project ><br />

Project/Sandbox Information, or click .<br />

If a master project is active, the Project Information dialog box<br />

appears.<br />

If a sandbox is active, the Sandbox Information dialog box<br />

appears.<br />

<strong>User</strong> <strong>Guide</strong> 95


Getting Started With Projects, Sandboxes, and Members<br />

2. View or modify the project or sandbox information, as required.<br />

3. In the Project Information dialog box, click Development Paths to<br />

show or hide a selectable list of different development paths that<br />

have been created from the current project. To delete a<br />

development path, select one from the list and click Delete.<br />

4. Click OK to accept any changes you have made, or click Cancel to<br />

close the dialog box without making changes.<br />

96 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Setting Project<br />

or Sandbox<br />

Attributes<br />

For more information about<br />

attributes, see the <strong>Source</strong><br />

<strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong><br />

Administrator <strong>Guide</strong>.<br />

Viewing and Editing Project and Sandbox Information<br />

Attribute statements define local variables or set options. You can set<br />

master project attributes that apply across an entire project, or<br />

sandbox attributes that apply only in your workspace, sometimes<br />

overriding project attributes. <strong>The</strong>y have one of the three following<br />

formats:<br />

variable<br />

variable=value<br />

WorkToArch variable=value<br />

For example, the WorkToArch project attribute, which directs <strong>Source</strong><br />

<strong>Integrity</strong> to the correct files, uses the following format:<br />

WorkToArch c:/test=c:/archives/test<br />

To view project and sandbox information in the command line<br />

interface:<br />

Use the pj header command, whose syntax is<br />

pj header [options]<br />

For sandboxes, the name of the sandbox file is also listed and the only<br />

variant project information included is the name of the variant (if<br />

any) used to create the sandbox.<br />

Here is an example of pj header output for a project:<br />

Directory: F:/proj_dir<br />

<strong>User</strong>: sandy<br />

SAM <strong>User</strong>: sandy<br />

SAM Database: P:\mkssi\mkssam\mkssam<br />

Author: sandy<br />

Project: F:/proj_dir/project.pj<br />

Working directory: F:/proj_dir<br />

Repository: F:/proj_dir<br />

Archive: F:/proj_dir\rcs\project.pj<br />

Project on disk: F:/proj_dir/project.pj<br />

Revision: 1.9<br />

Log file: F:/proj_dir/project.trn<br />

Number members: 24<br />

Variant Projects available:<br />

Name: german_version<br />

Revision: 1.3<br />

Project file on disk: F:/proj_dir/project.vpj/<br />

vp0000.pj<br />

Name: i18n_version<br />

Revision: 1.7<br />

<strong>User</strong> <strong>Guide</strong> 97


Getting Started With Projects, Sandboxes, and Members<br />

Project file on disk: F:/proj_dir/project.vpj/<br />

vp0001.pj<br />

Change <strong>Integrity</strong> Connect - context:<br />

Database IP Address: 1.0.3.24<br />

CI <strong>User</strong>: sandy<br />

Active CI Issue(s):<br />

Identifier: Solution_45<br />

Summary: context-sensitive help missing<br />

To edit project and sandbox information in the command line<br />

interface:<br />

Use the pj set, pj unset, and pj delvariant commands.<br />

<strong>The</strong> pj set command sets an attribute name to a value. Its syntax is<br />

pj set name=value [options]<br />

For example,<br />

pj set include=.;/myinclude;/watcom/h<br />

causes this include setting to be used when finding dependencies<br />

with finddep and mkmf. If this command is used on a sandbox, the<br />

sandbox attribute is set, not the project attribute<br />

<strong>The</strong> pj unset command drops a project attribute. Its syntax is<br />

pj unset name [options]<br />

You can only unset one name at a time. If this command is used on a<br />

sandbox, the sandbox attribute is dropped, not the project attribute.<br />

<strong>The</strong> pj delvariant command deletes a development path. Its syntax<br />

is<br />

pj delvariant [-f] [-N devpath] [options]<br />

where -f forces a subproject variant to be deleted (without this<br />

option, only variants of the main project are deleted) and -N devpath<br />

specifies the name of the development path you want to delete. If you<br />

issue this command from a variant sandbox, the -N option is not<br />

required; the variant sandbox’s development path is used.<br />

98 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Comparing the Working File to Its Member Revision<br />

Comparing the Working File to Its Member<br />

Revision<br />

After you have made changes to a member’s working file, you will<br />

usually check those changes back into the member’s archive as a new<br />

revision. But you may also decide that those changes should be<br />

discarded. Before you make this decision, you have to be able to view<br />

the changes that you will be checking in, or those that you will be<br />

discarding if you choose.<br />

If you are using the Windows interface or <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface, use the <strong>Source</strong> <strong>Integrity</strong> Visual Difference utility to view the<br />

differences between the working file and a member revision, or<br />

between any two files.<br />

To compare a working file to its member revision in the Windows<br />

interface:<br />

1. Select a member that has a modified working file (indicated by<br />

the working file delta).<br />

2. Choose Member > Differences.<br />

<strong>The</strong> Visual Difference utility launches and displays the two files<br />

side-by-side, highlighting the differences between them or<br />

informing you that there are no differences between the files.<br />

To compare a working file to its member revision in the <strong>Source</strong><br />

<strong>Integrity</strong> Web Interface:<br />

1. In the Sandbox view, select a member that has a modified<br />

working file (indicated by the working file delta).<br />

2. Choose Member Command > Differences.<br />

<strong>The</strong> Visual Difference utility launches and displays the two files<br />

side-by-side, highlighting the differences between them or<br />

informing you that there are no differences between the files.<br />

When checking in the working file, you can compare it to its member<br />

revision by clicking Show Differences in the Check In page.<br />

To compare a working file to its member revision in the<br />

command line interface:<br />

Use the pj diff command to see a text-based listing of the differences<br />

between the files.<br />

<strong>User</strong> <strong>Guide</strong> 99


Getting Started With Projects, Sandboxes, and Members<br />

Discarding Changes to Working Files<br />

If you are sure you do not want to check in the modified working file,<br />

you can discard it, update the working file with the member revision,<br />

and unlock the member.<br />

To discard changes to a member in the Windows interface:<br />

1. Select one or more members in a Sandbox or Project window that<br />

are locked in your name and choose Member > Undo Checkout.<br />

A confirmation dialog box appears, warning you that any<br />

changes to working files will be lost if you proceed.<br />

2. To proceed with the Undo Checkout for a single file, click Yes (for<br />

multiple files select Yes to All). Otherwise, click No (or No to All<br />

for multiple files).<br />

Click Cancel to abort all remaining Undo Checkout operations.<br />

To discard changes to a member in the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface:<br />

1. Click the working file delta beside the member or select the<br />

member and choose Member Commands > Revert.<br />

<strong>The</strong> Revert Member confirmation dialog box appears.<br />

2. To see the changes you will lose if you revert the member, click<br />

Show Differences to invoke the Visual Difference utility.<br />

3. Once you are done comparing the files in the Visual Difference<br />

utility, choose File > Exit to return to the Revert Working File<br />

confirmation dialog box.<br />

4. Click Yes to abandon the changes you have made since you<br />

checked out the file. Otherwise, click No to cancel the operation.<br />

To discard changes to a member in the command line interface:<br />

1. Use the pj unlock command, which unlocks the specified<br />

member. Its syntax is<br />

pj unlock member<br />

100 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Locking a Member<br />

Locking a Member<br />

2. <strong>The</strong>n use the pj refresh command to refresh the working file of<br />

the specified member, with the following syntax<br />

pj refresh -f member<br />

where -f overwrites the working file even if it is writable. If -f is<br />

not specified, writable files are not overwritten.<br />

When you want to prevent others from changing a member revision<br />

that you are working on, you can lock the member. Normally you<br />

lock a member by using an option while checking the member out of<br />

its project. Sometimes, however, you may have made changes to a<br />

working file that was not checked out in your name first. In this case,<br />

you can set a lock without overriding your changes.<br />

In both the Windows interface and the <strong>Source</strong> <strong>Integrity</strong> Web Interface,<br />

a locked member is denoted with a padlock symbol ( ), along with<br />

the locker’s name and the time the member was locked.<br />

Caution Locking a member does not affect the working file in any way.<br />

<strong>Source</strong> <strong>Integrity</strong> does not make the working file writable if it was readonly,<br />

and does not verify that it corresponds to the revision being locked.<br />

Make sure that the working file corresponds to the revision that you<br />

want to lock.<br />

To lock a member in the Windows interface:<br />

1. Select one or more members in a Sandbox or Project window.<br />

2. Choose Member > Lock or click (if added to the toolbar)<br />

A padlock symbol ( ) appears next to the revision number to<br />

inform you the member has been locked.<br />

To lock a member in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. Select one or more members in the Sandbox view.<br />

2. Choose Member Commands > Lock.<br />

A padlock symbol ( ) appears next to the revision number to<br />

inform you the member has been locked.<br />

<strong>User</strong> <strong>Guide</strong> 101


Getting Started With Projects, Sandboxes, and Members<br />

Unlocking a Member<br />

To lock a member in the command line interface:<br />

Use the pj lock command. Its syntax is<br />

pj lock [-hR] [-r rev] [options] [file…]<br />

with the following options:<br />

-h locks the head revision<br />

-r rev locks the revision rev<br />

-R recursively applies this operation to any directories specified<br />

on the command line<br />

If no files (file…) are specified, this command applies to all project<br />

files with an associated archive. <strong>The</strong> -rrev and -h options do not<br />

update the project setting for the member revision.<br />

When you no longer need the exclusive ability to change a member,<br />

you can unlock it again. This is normally done by default when you<br />

check the member into its archive. You can unlock a member without<br />

checking it in, but your changes will not be recorded if you choose to<br />

do so.<br />

Depending upon what permissions your administrator has defined,<br />

you may be able to unlock a revision that is locked by another user.<br />

Some environments will be set up to require that you send an<br />

electronic message to the person whose lock you are “breaking”. You<br />

should be cautious about breaking locks, since it can result in<br />

confusion and duplication of effort in shared working environments.<br />

To unlock in a member in the Windows interface:<br />

1. Select one or more locked members in a Sandbox or Project<br />

window.<br />

2. Choose Member > Unlock, or click (if added to the toolbar).<br />

<strong>The</strong> revision is unlocked and the padlock symbol (<br />

removed.<br />

) is<br />

To unlock a member in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. Select one or more members in the Project or Sandbox view.<br />

102 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Removing Unused Locks<br />

2. Choose Member Commands > Unlock.<br />

<strong>The</strong> revision is unlocked and the padlock symbol ( ) is removed.<br />

To unlock a member in the command line interface:<br />

Use the pj unlock command. Its syntax is<br />

pj unlock [-hR] [-r rev] [options] [file…]<br />

with the following options:<br />

-h unlocks the head revision<br />

-r rev unlocks the revision rev<br />

Removing Unused Locks<br />

-R recursively applies this operation to any directories specified<br />

on the command line<br />

If no files are specified, this command applies to all project files with<br />

an associated archive. <strong>The</strong> -rrev and -h options do not update the<br />

project setting for the member revision.<br />

If you want to remove all locks you are holding for files you have not<br />

modified in a project, you can do so in the Windows interface with<br />

the Member > Remove Unused Locks command. Invoking this<br />

command causes <strong>Source</strong> <strong>Integrity</strong> to compare all members you have<br />

locked to their working files and unlock the ones you have not<br />

changed.<br />

To remove unused locks in the Windows interface:<br />

Choose Member > Remove Unused Locks.<br />

If the Remove Unused Locks option is set in the Recursion panel of the<br />

Personal Configuration dialog box, this command recursively<br />

removes unused locks in archives of any subprojects that are<br />

members of the project (or members of members) the command is<br />

run on.<br />

<strong>User</strong> <strong>Guide</strong> 103


Getting Started With Projects, Sandboxes, and Members<br />

To remove unused locks in the command line interface:<br />

Use the pj clean command with the -u option. Use the -R option as<br />

well to apply this command recursively through subprojects.<br />

Note This command is not available in the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface.<br />

Detecting Sandbox Members Out of Sync<br />

With the Project<br />

When many users are working from sandboxes based on the same<br />

master project, it is common for the members in an individual<br />

sandbox to become out of sync with the member revisions in the<br />

master project. For example, the member revision of a particular file<br />

may be at 1.5, while you still have revision 1.2 in your sandbox.<br />

When this happens, a delta symbol ( ) appears next to the member<br />

in the Windows interface and <strong>Source</strong> <strong>Integrity</strong> Web Interface,<br />

signaling its status. In the command line interface, you can use the pj<br />

what command to display changes to files and archives.<br />

Resynchronizing Your Project or Sandbox<br />

To resynchronize members of a project or sandbox in the<br />

Windows interface:<br />

Select one or more members, and choose Member > Resynchronize.<br />

This command has no effect on working files that are identical to the<br />

member file or revision.<br />

If the Resynchronize option is set in the Recursion panel of the<br />

Personal Configuration dialog box, this command recursively<br />

resynchronizes subprojects that are members of the project (or<br />

members of members) the command is run on.<br />

104 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Resynchronizing Your Project or Sandbox<br />

To resynchronize members of a project or sandbox in the <strong>Source</strong><br />

<strong>Integrity</strong> Web Interface:<br />

Click the delta symbol, or select the member and choose the Member<br />

Commands > Resynchronize command from the Sandbox view to get<br />

the latest revision of the member.<br />

<strong>The</strong> member in your sandbox is automatically updated to the most<br />

recent revision in the member’s archive.<br />

If the working file is writable, you are asked for confirmation before it<br />

is replaced.<br />

To resynchronize members of a project or sandbox in the<br />

command line interface:<br />

Use the pj refresh command from the project or sandbox directory.<br />

Its syntax is<br />

pj refresh file…<br />

If no files are specified, then this command acts upon all members of<br />

the project. <strong>The</strong> pj refresh command compares sandbox working<br />

files with the current content of the master project members and<br />

checks out a new copy if either of the following is true:<br />

<strong>The</strong> sandbox member is read-only and it differs from the project<br />

member (<strong>Source</strong> <strong>Integrity</strong> leaves files read-only when you have<br />

no lock on them, to prevent making casual, uncontrolled<br />

changes).<br />

<strong>The</strong>re is no copy of a project member in the sandbox directory<br />

tree.<br />

<strong>The</strong> pj refresh command does not replace a writable file in the<br />

sandbox directory tree (unless you specify the -f (force) option), so<br />

your work in progress cannot be overwritten. In addition, if a file is<br />

identical to its master project counterpart, no action is taken; this<br />

ensures your next build does not have to do more work than<br />

required.<br />

<strong>User</strong> <strong>Guide</strong> 105


Getting Started With Projects, Sandboxes, and Members<br />

Freezing Members<br />

When your development team has largely finished some portion of a<br />

project and some project members are in a stable state, you can freeze<br />

individual members within a project. Freezing restricts member<br />

information from being updated, preventing these members from<br />

being changed by accident. For example, if new revisions are checked<br />

into the member’s archive, <strong>Source</strong> <strong>Integrity</strong> does not update the<br />

project’s member revision.<br />

Freezing prevents <strong>Source</strong> <strong>Integrity</strong> from changing member<br />

information in the member’s project file, but does not affect a<br />

member file itself. Revisions can still be checked out, modified, and<br />

checked in.<br />

You can change the label or state of frozen members, but not their<br />

attributes.<br />

Freezing can be used immediately before a checkpoint operation to<br />

ensure that no one changes the project or its members before the<br />

checkpoint is complete.<br />

When you open a frozen subproject member, you get the<br />

checkpointed revision, if it is an archived subproject.<br />

When you want to allow project members to be changed, you can<br />

thaw them (see “Thawing Members” on page 107).<br />

<strong>Source</strong> <strong>Integrity</strong> reports the availability of new revisions when<br />

anyone checks them into the archive. <strong>Source</strong> <strong>Integrity</strong> does not<br />

update the project to the latest revision, so an appropriate person<br />

must make the decision to lift the freeze and update the project.<br />

To freeze a member in the Windows interface:<br />

In an active Project or Sandbox window, select the archived<br />

member(s) you want to freeze and choose Member > Freeze, or<br />

click (if added to the toolbar).<br />

A snowflake symbol ( ) appears beside each selected archived<br />

member in the window.<br />

To make this command act recursively in all subprojects of the<br />

specified member, make sure the Freeze Members option is selected in<br />

the Recursion panel of the Personal Configuration dialog box.<br />

106 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Thawing Members<br />

Thawing Members<br />

To freeze a member in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

In the Project View, select the member you want to freeze and choose<br />

Member > Freeze.<br />

A snowflake symbol ( ) appears beside each selected archived<br />

member in the window.<br />

To freeze a member in the command line interface:<br />

Use the pj freeze command in the project directory. Its syntax is<br />

pj freeze [-mi] filename [-Pproject_file.pj]<br />

where -m alone causes the freeze to be applied to members, but not<br />

subprojects; -i causes the freeze to be applied recursively to<br />

subprojects; and -Pproject_file.pj specifies a project file name if your<br />

project file is not called project.pj. To recursively freeze all<br />

members of all subprojects, use -m and -i together.<br />

Use pj print to confirm the freeze.<br />

When you have decided to allow project members to evolve again,<br />

you can thaw any frozen ones. Thawing removes the restriction on<br />

changing member information in the project.<br />

To thaw a member in the Windows interface:<br />

In an active Project or Sandbox window, select the archived<br />

member(s) you want to thaw (members that have the snowflake<br />

symbol ( ) beside them) and choose Member > Thaw, or click (if<br />

added to the toolbar).<br />

<strong>The</strong> snowflake symbol beside the selected members disappears.<br />

To thaw a member in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

In the Project view, select the member you want to thaw and choose<br />

Member > Thaw.<br />

<strong>The</strong> snowflake symbol beside the selected members disappears.<br />

<strong>User</strong> <strong>Guide</strong> 107


Getting Started With Projects, Sandboxes, and Members<br />

Viewing Member Information<br />

(Windows Only)<br />

To thaw a member in the command line interface.<br />

Use the pj thaw command in the project directory. Its syntax is<br />

pj thaw [-mi] [-Pproject_file.pj] [files…]<br />

where -m alone causes the freeze to be applied to members, but not<br />

subprojects; -i causes the freeze to be applied recursively to<br />

subprojects; and -Pproject_file.pj specifies a project file name if your<br />

project file is not called project.pj. To recursively freeze all<br />

members of all subprojects, use -m and -i together.<br />

Use pj print to confirm that <strong>Source</strong> <strong>Integrity</strong> removed the freeze.<br />

Note Thawing a project does not automatically update the project file to<br />

later revisions of frozen members. Use pj update -h to do this.<br />

<strong>Source</strong> <strong>Integrity</strong> maintains a range of information on each member.<br />

Member. <strong>The</strong> fully qualified name of the member’s working file<br />

in the project.<br />

Working File. <strong>The</strong> fully qualified name of the member’s working<br />

file.<br />

Archive File. <strong>The</strong> fully qualified name of the member’s archive.<br />

Date. <strong>The</strong> timestamp of the member’s revision as stored in its<br />

archive.<br />

Author. <strong>The</strong> name of the person who created the member’s<br />

revision.<br />

Locker. If the member is locked, the name of the person who<br />

holds the lock, as well as the date and time he or she locked the<br />

member.<br />

Type. <strong>The</strong> member’s type. This may be Archived ( ), Non-<br />

Archived ( ), or Subproject ( ).<br />

Revision. <strong>The</strong> revision number of the member.<br />

State. <strong>The</strong> state assigned to the member.<br />

Label. Any labels associated with the member’s revision.<br />

108 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Viewing and<br />

Editing Member<br />

Attributes<br />

Viewing Member Information (Windows Only)<br />

Revision Description. A description of the reason for or purpose<br />

of the revision, especially useful in multi-user environments.<br />

Active CI Issue. An active issue associated with the member.<br />

Active issues appear as hyperlinks with a brief description. To<br />

view the complete issue in the Change <strong>Integrity</strong> Web Interface,<br />

click on the hyperlink.<br />

To view member information in the Windows interface:<br />

1. Select the member whose information you want to see.<br />

2. Choose Member > Member Information, or click .<br />

<strong>The</strong> Member Information dialog box appears.<br />

3. View or make changes to the member information as required.<br />

You cannot change an existing revision description from this<br />

dialog box, but you can append additional comments to it. To do<br />

so, click Advanced, select the Append Revision Description tab,<br />

and enter any supplemental information in the edit box.<br />

Within the Member Information dialog box, you can also add or<br />

remove member attributes that allow you categorize members,<br />

groups of members, or projects and then perform an operation on<br />

them as a group.<br />

For example, you could use the Select Members command to<br />

highlight only those members with the attribute “SYS=DOS” and then<br />

check them out as a group.<br />

<strong>User</strong> <strong>Guide</strong> 109


Getting Started With Projects, Sandboxes, and Members<br />

For more information on<br />

attributes, see the <strong>Source</strong><br />

<strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong><br />

Administrator <strong>Guide</strong>.<br />

Attributes can be added, deleted, or edited using the Variable and<br />

Value fields.<br />

To view or edit member attributes:<br />

1. In the Member Information dialog box, click Advanced to display<br />

the member attributes.<br />

You can add, delete, or edit attributes using the following fields:<br />

Variable. When you select a member attribute in the<br />

Attributes list, the variable portion of the attribute is<br />

displayed in this field. <strong>The</strong> variable portion of the statement<br />

names the attribute. It must start with a letter or underscore,<br />

and may be followed by up to 30 letters, digits, or<br />

underscores. You edit the variable portion of the attribute by<br />

making changes here and clicking Add to update the entry in<br />

the Attributes list. To delete the selected attribute, click Delete.<br />

Value. When you select a member attribute in the Attributes<br />

list, the value portion of the attribute is displayed in this<br />

field. <strong>The</strong> value part may contain only printable ASCII<br />

characters. You edit the value portion of the attribute by<br />

making changes here and clicking Add to update the entry in<br />

the Attributes list. To delete the selected attribute, click Delete.<br />

Attribute list. A selectable list of attributes for the current<br />

member. Attributes can be added, deleted, or edited using<br />

the Variable and Value fields. Every project member can have<br />

any number of Attribute statements which define variables<br />

for the member. Attributes have the format<br />

variable<br />

or<br />

variable=value<br />

2. When you are finished with attributes, click OK to accept the<br />

changes, or Cancel to close the dialog box without making any<br />

changes.<br />

Promoting and Demoting a Member<br />

At particular milestones, project members will be ready to move to<br />

the next stage of their development cycle (for example, from<br />

“Development” to “Testing”). As long as promotion is enabled and<br />

110 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Promoting and Demoting a Member<br />

you have the appropriate SAM permissions, you can promote a<br />

member to a predefined higher state, or demote it back to a lower<br />

state.<br />

If no state is assigned to a revision at check-in, a default value of<br />

“Exp” (for Experimental) is used.<br />

To promote a member in the Windows interface:<br />

1. Select one or more members in a Sandbox or Project window.<br />

2. Choose Member > Promote.<br />

<strong>The</strong> Promote Member dialog box appears.<br />

3. Select a new promotion state from the Promote to state dropdown<br />

list.<br />

4. Click OK to accept the new promotion state, or click Cancel to<br />

close the dialog box without changing the member’s state.<br />

If the Member > Promote command is not available, make sure the<br />

promotion feature is enabled on the Promotion tab of the Personal<br />

Configuration dialog box.<br />

If the Promote and Demote Member option is set in the Recursion<br />

panel of the Personal Configuration dialog box, this command<br />

recursively promotes the members of any subprojects that are<br />

themselves members of the project (or members of members) the<br />

command is run on.<br />

To demote a member in the Windows interface:<br />

1. Select one or more members in a Sandbox window or Project<br />

window<br />

2. Choose Member > Demote.<br />

<strong>The</strong> Demote Member dialog box appears.<br />

<strong>User</strong> <strong>Guide</strong> 111


Getting Started With Projects, Sandboxes, and Members<br />

3. Select a new promotion state from the Demote to state drop-down<br />

list.<br />

4. Click OK to accept the new promotion state, or click Cancel to<br />

close the dialog box without changing the member’s state.<br />

To promote or demote a member in the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface:<br />

Use the Promote and Demote commands from the Member view. If<br />

promotion is turned off in the <strong>Source</strong> <strong>Integrity</strong> Web Interface, a Set<br />

State command appears instead of Promote and Demote.<br />

To promote or demote a member in the command line interface:<br />

Use the pj state command. Its syntax is<br />

pj state [-hR] [-r rev] [options] state [file…]<br />

where state is the new state you would like to change to. If no files are<br />

specified, pj state changes the state of all archived project members<br />

to state, subject to any restrictions imposed by the current promotion<br />

scheme in effect.<br />

-h assigns the state to the head revision of file, not the project’s<br />

member revision<br />

-r rev assigns the state to the given rev<br />

-R recursively applies this operation to any directories specified<br />

on the command line<br />

Note <strong>The</strong> -rrev and -h options do not update the project setting for the<br />

member revision.<br />

112 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Updating to Head Rev<br />

Updating to Head Rev<br />

Within the Windows interface, you can use the Update Member option<br />

when you are checking in to ensure that the most recent revision of<br />

each member is added to the list of members in the project.<br />

If this option is not set, or if you are using the command line<br />

interface, the project list might not reflect the most current revision of<br />

each member’s archive. For instance, if someone checks in a new<br />

revision directly to a member’s archive instead of its project, the<br />

project list is not updated.<br />

For example, if the current project member is revision 2.7 of an<br />

archived file, but a newer revision (revision 2.8) has been added to<br />

the member’s archive, you can update the member to the head<br />

revision.<br />

If the default branch in a member archive is set to a branch off of the<br />

trunk, updating to head revision updates to the tip revision of the<br />

branch rather than the trunk.<br />

To update to head revision in the Windows interface:<br />

Choose Member > Update to Head Rev.<br />

To update to head revision in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

If there is a newer revision available to the project, a delta appears<br />

beside the member name in the Project view. To update the project<br />

with the newer revision, click this delta or select the member in the<br />

Project view and choose Member Commands > Update to Tip Revision.<br />

To update to head revision in the command line interface:<br />

Use the pj update command with the -h option.<br />

Note Updating to the tip revision does not affect the member’s working<br />

file. To update the working file, use the Windows interface’s Member ><br />

Resynchronize command or the <strong>Source</strong> <strong>Integrity</strong> Web Interface’s Member<br />

Commands > Resynchronize command from the Sandbox view.<br />

<strong>User</strong> <strong>Guide</strong> 113


Getting Started With Projects, Sandboxes, and Members<br />

Updating to Tip Revision<br />

When you check out a revision of a file that is not the head of the<br />

trunk, and then make changes to it and check it back in, <strong>Source</strong><br />

<strong>Integrity</strong> requires that you make a branch in the archive.<br />

For example, a project member, myfile.c, is currently at revision<br />

1.10. If you check out, revise, and check back in revision 1.8 of<br />

myfile.c, <strong>Source</strong> <strong>Integrity</strong> defaults to revision number 1.8.1.1. <strong>The</strong><br />

first digits (1.8) represent the early revision that the changes are based<br />

on. “1.8.1.1” identifies the first revision on the first branch starting at<br />

“1.8”. Later revisions become 1.8.1.2, 1.8.1.3, and 1.8.1.4.<br />

Updating to tip revision sets the member revision to the latest<br />

revision along the member’s current branch of development.<br />

To update to tip revision in the Windows interface:<br />

Choose Member > Update to Tip Rev. In the earlier example, the<br />

project member’s revision would be updated from 1.8.1.1 to 1.8.1.4.<br />

To update to tip revision in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

Select the member in the Project view and choose Member Commands<br />

> Update to Tip Revision.<br />

Scanning Your Project for Changes<br />

By default in the Windows interface, <strong>Source</strong> <strong>Integrity</strong> scans each<br />

project member to search for changes (deltas) whenever it opens a<br />

project or sandbox. This feature can be disabled to decrease the time<br />

required to open large projects or sandboxes. <strong>The</strong> <strong>Source</strong> <strong>Integrity</strong><br />

Web Interface always scans for deltas.<br />

To disable the Scan for Changes feature in the Windows<br />

interface:<br />

1. Choose Configuration > Personal and select the Preferences tab.<br />

2. Deselect the Scan Members on Open Project/Sandbox setting and<br />

click OK.<br />

114 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Refreshing Your View<br />

Refreshing Your View<br />

When this feature is disabled, <strong>Source</strong> <strong>Integrity</strong> displays a question<br />

mark in the delta column for each unscanned member upon opening<br />

a project or sandbox. As well, a message “Member not scanned for<br />

changes” appears in the status bar at the bottom of the window.<br />

To scan a project for changes manually in the Windows<br />

interface:<br />

If the Scan for Changes option has been disabled, choose Member ><br />

Scan for Changes.<br />

To scan a project for changes in the command line interface:<br />

Use the pj what command.<br />

<strong>The</strong> information in a Project, Sandbox, or Archive window can<br />

become “out of sync” with the actual condition of member data. If<br />

another user locks (or deletes) a member after you open a project, this<br />

information is not immediately reflected in your Sandbox window.<br />

To update your view of the currently active Project, Sandbox, or<br />

Archive window in the Windows interface:<br />

Choose Window > Refresh.<br />

To update your view of projects, sandboxes, and archives in the<br />

<strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

Choose one of the following commands:<br />

Project Commands > Refresh Project in the Project view<br />

Sandbox Commands > Refresh Sandbox in the Sandbox view<br />

Refresh in the Member or History view<br />

<strong>User</strong> <strong>Guide</strong> 115


Getting Started With Projects, Sandboxes, and Members<br />

Assigning Labels to Members<br />

For more information about<br />

changing member<br />

information, see “Viewing<br />

Member Information<br />

(Windows Only)” on<br />

page 108.<br />

Labels are unique text that describe and refer to a revision in an<br />

archive. Labels can be based on the product release the revision was<br />

included in, on the content of the revision, on changes made to the<br />

revision, or any other sort of information that would be useful in<br />

identifying that particular revision.<br />

Although you generally assign a label to a new revision upon check<br />

in, there may be times when you want to add an additional label or<br />

change the label assigned to a revision.<br />

To set a member’s state or label in the Windows interface:<br />

1. Select one or more archived members in a Sandbox or Project<br />

window.<br />

2. Choose Member > Label, or click (if added to the toolbar).<br />

<strong>The</strong> Label Members dialog box appears.<br />

3. Fill in or select the Label Members options.<br />

4. Click OK to accept the new label and/or state settings, or click<br />

Cancel to close the dialog box without modifying the settings.<br />

You can also use the Member Information dialog box to set the<br />

member’s label.<br />

If the Label option is set in the Recursion panel of the Personal<br />

Configuration dialog box, this command recursively adds labels to<br />

subprojects that are members of the project (or members of members)<br />

the command is run on.<br />

To set a member’s label in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

In the Member view, select the revision you want to add a label to,<br />

and select Add Label from the list of available commands.<br />

116 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Deleting a Member’s Label<br />

Deleting a Member’s Label<br />

To set a member’s label in the command line interface:<br />

Use the pj label command. Its syntax is<br />

pj label label -hR -rrev filename<br />

where -h applies the label to the head revision, -R applies the label<br />

recursively to any directories specified, and -rrev applies the label to<br />

revision rev.<br />

If no filename is specified, the label is applied to all project members<br />

with associated archives.<br />

For example, to add the label “Complete” to revision 1.6 of the<br />

filesys.c member, enter<br />

pj label Complete -r 1.6 filesys.c<br />

When the command terminates, <strong>Source</strong> <strong>Integrity</strong> displays the<br />

message<br />

d:\gamble\src\filesys.c: revision 1.6 given label<br />

Complete<br />

<strong>The</strong>re may be times when you want to delete a label from a revision.<br />

For instance, you may decide the label no longer accurately reflects<br />

that particular revision. Also, if you have assigned the same label to a<br />

number of members, you might want to remove them all with one<br />

command.<br />

To delete the label from one or more members in the Windows<br />

interface:<br />

1. Select one or more archived members in a Sandbox or Project<br />

window.<br />

2. Choose Member > Remove Label.<br />

<strong>The</strong> Remove Label dialog box appears.<br />

<strong>User</strong> <strong>Guide</strong> 117


Getting Started With Projects, Sandboxes, and Members<br />

For more information about<br />

changing member<br />

information, see “Viewing<br />

Member Information<br />

(Windows Only)” on<br />

page 108.<br />

Building a Project<br />

Calculating<br />

Dependencies<br />

3. Enter the label to remove and click OK, or click Cancel to close the<br />

dialog box without removing the label.<br />

You can also use the Member Information dialog box to delete a label.<br />

To delete a member’s label in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

In the Member view, select the revision whose label you want to<br />

remove and choose Delete Label from the list of available commands.<br />

To delete a member’s label in the command line interface:<br />

Use the !label option to the pj label command.<br />

For example, to delete the working label from the betting.c<br />

member, enter<br />

pj label !working betting.c<br />

Since each label is unique, you do not need to specify the revision<br />

number.<br />

Along with configuration management and source code control<br />

features, <strong>Source</strong> <strong>Integrity</strong> also allows you to coordinate your build<br />

procedure.<br />

In the Windows interface, you can use the Member > Dependencies<br />

and Project > Build commands to generate a list of files necessary to<br />

compile a member and run your make file.<br />

Note This functionality is not available in the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface.<br />

<strong>The</strong> first step in building a project is determining what files a given<br />

member needs before it can be compiled.<br />

In the Windows interface, the Member > Dependencies command<br />

recursively scans a project member for #include statements and<br />

generates a list of files necessary to compile the member. It searches<br />

the following types of files for #include statements:<br />

118 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


C and C++ files<br />

Pascal files<br />

Fortran files<br />

Microsoft RC files<br />

Building a Project<br />

Assembler files<br />

You can add the resulting list of files to an existing make file with the<br />

Project > Build command.<br />

To calculate a member’s dependencies:<br />

1. Select the member in a Sandbox or Project window.<br />

2. Choose Member > Dependencies.<br />

<strong>The</strong> Member Dependencies dialog box appears.<br />

3. Fill in or modify these options:<br />

Path. A list of directories to search in for files listed in the<br />

member’s #include statements. This list uses the DOS PATH<br />

format, a list of paths separated by semi-colons.<br />

Get From Compiler File. If this option is selected, the include<br />

path from the compiler file is used instead of the Path field;<br />

you also choose a Compiler File Type from the dropdown<br />

menu.<br />

File name. <strong>The</strong> path and name of the compiler file. Enter or<br />

browse for the name.<br />

<strong>User</strong> <strong>Guide</strong> 119


Getting Started With Projects, Sandboxes, and Members<br />

Using the Build<br />

Command<br />

(Windows)<br />

Exclude Path. Paths that you do not want to be searched<br />

when looking for #include files. This is useful if the include<br />

path is taken from a compiler file and you do not want to<br />

look in all the listed directories.<br />

4. To recalculate the member’s dependencies, click Recalculate.<br />

5. To check that all files in the dependency list are also members of<br />

the project and add those that are not, click Add Missing Files.<br />

6. When you are done, click OK to save the list of dependencies. To<br />

close the Member Dependencies dialog box without saving the list<br />

of dependencies, click Cancel.<br />

To calculate dependencies in the command-line interface:<br />

You use the pj finddep command. Its syntax is<br />

pj finddep [-fR] [-w dir] [options] [file…]<br />

where -f forces dependencies to be added to the project; -R<br />

recursively applies this operation to any directories specified on the<br />

command line; and -w dir uses the directory dir as the project<br />

directory.<br />

This command finds and lists the dependencies of the specified files<br />

and prompts the user to add to the project each file used that is not a<br />

member of the project. If no files are specified, pj finddep operates<br />

on all project members.<br />

If a file is found to be needed (included) and that file is not a member<br />

of the project, you will be asked if you want to add it to the project.<br />

Enter y to add a file to the project, n to ignore the file, or q to<br />

terminate. Dependencies are cached in a file with the name<br />

project.use in the sandbox or project repository directory, where<br />

project is the file name of the project file.<br />

To build a project:<br />

1. Choose Project > Build, or click .<br />

<strong>The</strong> Build Project dialog box appears.<br />

120 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Building a Project<br />

2. Fill in the Build options (see “Make Program Options”, “Make<br />

File Options”, and “Dependencies Options” on page 121).<br />

3. Click Run Make to make the project.<br />

4. When you are ready, click OK to save the Build option settings<br />

and close the dialog box.<br />

To close the Build Project dialog box without saving the option<br />

settings, click Cancel.<br />

Make Program Options<br />

Filename. <strong>The</strong> name of the Make program to run (for example,<br />

c:\bin\make.exe). Enter or browse for the name.<br />

Optional Parameters. Parameters to be passed to the Make<br />

program. If %f is specified, <strong>Source</strong> <strong>Integrity</strong> replaces it with the<br />

name of the makefile specified in the Filename field.<br />

Startup Directory. <strong>The</strong> directory the Make program is run in.<br />

Make File Options<br />

Filename. <strong>The</strong> name of the makefile. Enter or browse for it. Click<br />

View to view the makefile in your default text editor.<br />

Dependencies Options<br />

Add to Makefile. Click to add member dependencies to the<br />

makefile.<br />

<strong>User</strong> <strong>Guide</strong> 121


Getting Started With Projects, Sandboxes, and Members<br />

Using pj build<br />

Recalculate. Click to recalculate the member dependencies.<br />

For example, consider a project containing members foo.c and<br />

bar.c in which foo.c contains the line<br />

#include "rcsbase.h"<br />

If you specify that member dependencies should be added to the<br />

makefile, the following lines are added to the makefile:<br />

### <strong>Source</strong> <strong>Integrity</strong> generated dependencies<br />

follow, do not remove/change this line<br />

foo.obj : rcsbase.h<br />

This tells the Make program to rebuild foo.obj whenever<br />

rcsbase.h is newer than foo.obj.<br />

Add Missing Files. Click to check that all files in the dependency<br />

list are also members of the project. If they are not already<br />

members, the missing files are added to the project.<br />

Ignore Non-Members When Calculating. When this option is<br />

selected, files that are not members of the current project are not<br />

scanned when recalculating dependencies.<br />

For example, suppose a project contains the files foo.c and<br />

bar.c, and foo.c contains the line<br />

#include "rcsbase.h"<br />

<strong>Source</strong> <strong>Integrity</strong> normally adds rcsbase.h to the dependency list<br />

for foo.c. However, if the Ignore Non-Members When Calculating<br />

option is selected, rcsbase.h is not be added to the dependency<br />

list.<br />

Run Make. Click to run the specified Make program, using the<br />

current Build Project options.<br />

In the command line interface, you use the pj build command. Its<br />

syntax is<br />

where<br />

pj build [-i] [-Mmakefile] [-Ttemplate] [-w dir] [options]<br />

-i performs builds of included subprojects before building<br />

parent (including) project.<br />

-Mmakefile writes new makefile to file makefile. If not specified, pj<br />

build uses project or sandbox makefile=val setting; if that<br />

setting is not provided, filename makefile is used.<br />

122 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Using pj mkmf<br />

Building a Project<br />

-Ttemplate expands the makefile template by interpreting the<br />

template and writing it to new makefile. If not specified, pj<br />

build uses project or sandbox MakeTemplate=val setting; if that<br />

setting is not provided, filename make.t is used.<br />

-w dir uses directory dir as the project directory.<br />

In the command line interface, use the pj mkmf command to calculate<br />

the dependencies of project members and generate a makefile before<br />

you build your project. <strong>The</strong> generated makefile can be created from<br />

scratch, or be based on an existing makefile or template. <strong>The</strong><br />

command’s syntax is<br />

where<br />

pj mkmf [-fR] [-Mmakefile] [-Ttemplate] [-wdir] [options]<br />

[file…]<br />

-f forces pj mkmf to ignore any saved information and rebuild all<br />

dependencies before creating the new makefile.<br />

-Mmakefile updates makefile rather than generating a new<br />

makefile.<br />

-Ttemplate uses template as a template to generate a new makefile.<br />

-R recursively applies this operation to any directories specified<br />

on the command line.<br />

-wdir uses the directory dir as the project directory.<br />

file … is a list of filenames of one or more project members for<br />

which dependencies will be calculated. If file is omitted, all<br />

project members are used.<br />

If -Mmakefile is not specified, the value of the project attribute<br />

makefile is used. If neither of these is defined, the makefile is written<br />

to a file named makefile in the current directory.<br />

When the -Ttemplate option is not used to generate a makefile, a<br />

marker line is inserted in the makefile immediately before the<br />

generated dependencies. <strong>The</strong> marker takes the form<br />

### <strong>MKS</strong> SI generated dependencies follow,<br />

do not remove/change this line<br />

If pj mkmf encounters a marker line while updating a makefile, all<br />

lines after the marker are replaced with the newly calculated<br />

dependencies.<br />

<strong>User</strong> <strong>Guide</strong> 123


Getting Started With Projects, Sandboxes, and Members<br />

<strong>The</strong> Reporter Utility<br />

For information on accessing<br />

the reporting features through<br />

the command line interface,<br />

see “Creating Reports with the<br />

Command Line Interface” on<br />

page 128.<br />

About the<br />

Report<br />

Information<br />

About Graphs<br />

In the Windows interface, the <strong>Source</strong> <strong>Integrity</strong> Reporter utility<br />

analyzes projects, their members, or individual archives, and allows<br />

you to generate a variety of reports and graphs based on its findings.<br />

Reports and graphs can be printed or viewed on the screen. To use<br />

the Reporter utility, you must have a default printer installed.<br />

Note <strong>The</strong> Reporter is not available in the <strong>Source</strong> <strong>Integrity</strong> Web Interface.<br />

<strong>The</strong> Reports command (from either the Project or Archive menu)<br />

creates database tables, from which the Reporter utility generates<br />

status and activity summaries for projects (including sandboxes) and<br />

archives. <strong>The</strong> Reporter calculates a summary of the changes to a<br />

project or archive, then displays or prints the summary as text or, for<br />

some reports, as a graph. Customized reports, created using<br />

Microsoft Access, can also be produced.<br />

<strong>The</strong> Reporter’s data files (containing the results of its project or<br />

archive analysis) can be saved as text files that can be read by most<br />

database applications.<br />

This utility generates<br />

changes introduced by individual authors<br />

changes between the member revision and a revision with a<br />

particular label<br />

changes between the member revision and any other revision<br />

which members are locked, and by whom<br />

which revisions have a particular label or state<br />

project member history (including revision descriptions) by file<br />

Whenever graphs are available in the Reporter, you are given the<br />

option of displaying the report in a text version (the default) or as a<br />

graph. If you display a report as a graph, you can define how you<br />

want it to look. Using graphs, you can give reports a custom look to<br />

suit your preferences or for quick, project-specific identification.<br />

124 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Report Types<br />

<strong>The</strong> Reporter Utility<br />

<strong>The</strong> Reports command allows you to generate different types of<br />

reports based on the information <strong>Source</strong> <strong>Integrity</strong> maintains about<br />

project members and revisions in the archives. <strong>The</strong> <strong>Source</strong> <strong>Integrity</strong><br />

Reporter can generate the following report types:<br />

Sandbox, Project, and Archive Reports<br />

changes grouped by author<br />

summary of changes grouped by author<br />

list of locked revisions<br />

list of revisions associated with labels<br />

list of revisions associated with particular states<br />

Sandbox and Project Reports<br />

list of revisions newer than the member revision<br />

changes from the member revision to a revision with a particular<br />

label<br />

changes from the member revision to a particular revision<br />

number<br />

project member history<br />

Changes by Author<br />

This type of report lists changes to members or revisions grouped by<br />

the person who made them. For example, if both Fred and Ethel<br />

made changes to several members, the report would include two<br />

sections; one for Fred and one for Ethel. Each section of the report<br />

shows<br />

name of the member<br />

revision number of changed revisions<br />

date the change was made<br />

number of lines (or bytes for binary files) that were added or<br />

deleted<br />

This type of report offers two additional options.<br />

<strong>The</strong> report can be on a single, specified author, or all authors.<br />

It can be restricted to changes made before or after a specified<br />

date.<br />

<strong>User</strong> <strong>Guide</strong> 125


Getting Started With Projects, Sandboxes, and Members<br />

Summary of Changes by Author<br />

This type of report shows a brief summary of changes made by each<br />

user. Each type of project member (Text, Binary, Auto-Detect) appears<br />

in a separate section of the report, subdivided according to the person<br />

who made the changes. <strong>The</strong> information summarized includes<br />

name of the member<br />

total number of revisions changed by each person<br />

total number of lines (or bytes for binary files) that were added or<br />

deleted by each person<br />

This report type offers two additional options.<br />

<strong>The</strong> report can be on a single, specified author, or all authors.<br />

It can be restricted to changes made before or after a specified<br />

date.<br />

Locked Revisions<br />

This report lists all locked revisions in a project or archive. For each<br />

locked revision, the report lists<br />

name of the member<br />

revision number<br />

person who has it locked<br />

Revisions with Labels<br />

This report scans the archives of all project members and extracts any<br />

labels they contain. For each label it finds, the report lists<br />

name of the label<br />

name of the member’s archive<br />

revision number the label is associated with<br />

Revisions with States<br />

This report scans the archives of all project members and extracts any<br />

state settings they contain. For each state setting it finds, the report<br />

lists<br />

state setting<br />

name of the member’s archive<br />

most recent revision with which the state is associated<br />

126 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Revisions Newer Than Member Revision<br />

<strong>The</strong> Reporter Utility<br />

This report tells you which members have more recent revisions<br />

available. For example, if a member revision is revision number 1.3,<br />

but the archive contains revisions numbered 1.4, 1.5, and 1.6, this<br />

report lists the newer available revisions and information about each,<br />

including<br />

name of the member<br />

revision numbers of newer revisions in the archive<br />

date of the newer revisions<br />

revision description for each newer revision<br />

Changes From Member Revision to Label<br />

This report lists all revisions in a member’s archive between the<br />

member revision and another revision with a specified label. This<br />

report can be generated for a single member, or for all project<br />

members. For each member, the report shows<br />

name of the member<br />

revision numbers of all the revisions between the member and<br />

the labeled revision<br />

author of each revision<br />

date of each revision<br />

revision description for each revision<br />

Changes From Member Revision to Revision Number<br />

This report lists all revisions in the member’s archive between the<br />

member revision and another revision with a specified revision<br />

number. This report can be generated for a single member, or for all<br />

project members. For each member, the report shows<br />

name of the member<br />

revision numbers of all the revisions between the member<br />

revision and the selected revision number<br />

author of each revision<br />

date of each revision<br />

revision description for each revision<br />

Project Member History<br />

This report displays all the revisions of a specified project member.<br />

For each revision, it shows<br />

<strong>User</strong> <strong>Guide</strong> 127


Getting Started With Projects, Sandboxes, and Members<br />

Creating<br />

Reports with<br />

the Command<br />

Line Interface<br />

revision number<br />

revision date<br />

revision description<br />

When you choose the member to report on, you can specify that the<br />

information should be sorted according to Revision Number or<br />

Revision Date, in either ascending or descending order.<br />

<strong>The</strong> command line interface’s report command produces commadelimited<br />

text files with data from a wide range of queries to<br />

sandbox, project and archive files. Its syntax is<br />

report [options] file…<br />

where options is zero or more command-line options, and file is the<br />

name of one or more sandbox, project, and archive files (files are<br />

treated as archives, unless they have a .pj extension).<br />

To generate reports, move to the appropriate sandbox or project<br />

directory and enter the report command. <strong>The</strong> command generates a<br />

set of six information files for each file queried. By default, the<br />

basename of the files is taken from the source file (that is, the<br />

sandbox, project, or archive file being examined), and the extension<br />

indicates the type of information in the file.<br />

Extension Information<br />

.txa Archive information<br />

.txr Revision information<br />

.txp Project information<br />

.txm Member information<br />

.txs Assigned labels<br />

.txx Access information<br />

128 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Using Keywords<br />

Using Keywords<br />

In the information files, fields are separated by commas, and text<br />

within fields is delimited by double quotes. For each set of source<br />

files, the ArchId and the ProjId fields are guaranteed to be unique,<br />

so they can be used as keys for relational database operations.<br />

Note If you specify an archive file instead of a project or sandbox file,<br />

report still generates six files, although the project and member<br />

information files are empty.<br />

Keywords are placeholders that can be inserted into text-based<br />

working files. <strong>Source</strong> <strong>Integrity</strong> updates them with information about<br />

the revision or archive.<br />

To use a keyword, simply include it in a working file, surrounded by<br />

dollar signs (for example, $Date$) and check the file back into its<br />

archive.<br />

<strong>The</strong> next time you check out the revision, <strong>Source</strong> <strong>Integrity</strong> scans it for<br />

keywords and replaces them with the appropriate information, if<br />

keyword expansion is turned on.<br />

For example, if the $Date$ keyword is encountered, the date and<br />

time of the revision (assigned at check in) is added to the working file<br />

as part of the keyword. When expanded, the entry would look<br />

something like<br />

$Date: 1999/06/12 10:25:32$<br />

This method of adding or updating information in a keyword is<br />

called keyword expansion.<br />

Here’s another example. If the file main.c has the keywords<br />

$Author$ and $State$ embedded within it, checking out main.c<br />

and issuing the command<br />

returns<br />

ident main.c<br />

main.c:<br />

$author: paula_t $<br />

$state: Exp $<br />

<strong>User</strong> <strong>Guide</strong> 129


Getting Started With Projects, Sandboxes, and Members<br />

Locating<br />

Keywords<br />

In the Windows interface, keyword expansion is turned on or off with<br />

the KeywordExpand option in SAM or your Personal Configuration<br />

dialog box (Checkout tab).<br />

Note Keyword expansion applies to text files only. It is disabled for<br />

binary files.<br />

Text before and after the keyword is preserved, making them suitable<br />

for use within expressions, as above, and within comments.<br />

If keyword expansion is turned on and you are checking out a text<br />

file that contains the string<br />

$Revision$<br />

<strong>Source</strong> <strong>Integrity</strong>, when it encounters this string, automatically adds<br />

the value of the keyword $Revision$ in the format<br />

$Revision: value $<br />

where value is the appropriate value of the keyword (in this case, the<br />

revision number).<br />

For example, including the statement<br />

char revnum[] = "$Revision$";<br />

in a C source file creates a character string named revnum containing<br />

the file’s revision number. <strong>The</strong> program can then be configured to<br />

display this string when it starts up, automatically presenting the<br />

current revision of the program’s source file.<br />

Using the $Revision$ keyword to obtain the revision number of a<br />

file is one of the common applications of keywords. Following are<br />

some others.<br />

<strong>The</strong> $Header$ keyword provides a one-line summary of useful<br />

information associated with a revision. Including this<br />

information in a comment makes the information available to<br />

anyone looking at the file.<br />

<strong>The</strong> $Log$ keyword supplies the same sort of information as<br />

$Header$ plus the revision description. <strong>The</strong> $Log$ keyword<br />

provides a complete list of changes that have been made to the<br />

file over time.<br />

You can use the ident command line interface command to locate<br />

and display keywords (expanded or unexpanded) in one or more<br />

files.<br />

130 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For more information about<br />

the ident command, see the<br />

<strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong><br />

<strong>Edition</strong> Reference <strong>Guide</strong> or the<br />

online man pages.<br />

Removing<br />

Keyword Values<br />

Table of<br />

Keywords<br />

Using Keywords<br />

This command displays the name of each file that contains keywords,<br />

as well as the keywords themselves. This provides an easy way to<br />

extract identification information from source files, as well as<br />

compiled object files.<br />

In the <strong>Source</strong> <strong>Integrity</strong> Web Interface, keywords are expanded on the<br />

server before being sent to the client. <strong>The</strong>refore, path information in<br />

keywords will be server-side paths and date and time information<br />

will be server-side dates and times.<br />

In the command line interface, at check-out time, you can remove the<br />

value portion of keywords from a revision by specifying the -K<br />

option to the co command.<br />

For example, if a revision in the brochur.txt archive contains a<br />

keyword expansion<br />

$Author: fred $<br />

and it is checked out without keyword expansion, the keyword in the<br />

working file reads<br />

$Author$<br />

<strong>Source</strong> <strong>Integrity</strong> maintains several keywords that can be used in<br />

working files. <strong>The</strong> following table describes each keyword and what<br />

it expands to.<br />

Note Keywords are case-sensitive.<br />

Keyword Expands To<br />

$Author$ <strong>The</strong> author name of the user who checked in<br />

the revision.<br />

$Date$ <strong>The</strong> check in date and time of the revision<br />

(assigned at check in). <strong>The</strong> time is shown in<br />

Greenwich Mean Time (GMT/UTC).<br />

$Header$ <strong>The</strong> fully qualified file name of the archive, as<br />

well as the revision number, date and time,<br />

author, state and locker (if locked).<br />

$Id$ <strong>The</strong> same as $Header$, except that the<br />

archive’s file name is not qualified.<br />

$Locker$ <strong>The</strong> user name of the user who locked the<br />

revision (empty if not locked).<br />

<strong>User</strong> <strong>Guide</strong> 131


Getting Started With Projects, Sandboxes, and Members<br />

Keyword Expands To<br />

$Log$ <strong>The</strong> revision description supplied during check<br />

in, preceded by the archive’s file name,<br />

revision number, author and revision date.<br />

Repeated check-out operations append<br />

revision descriptions, rather than replacing<br />

existing ones.<br />

$Name$ <strong>The</strong> revision label (or labels) attached to a<br />

revision.<br />

$ProjectName$ <strong>The</strong> fully qualified name of the project of which<br />

the archive is a member.<br />

$ProjectRevision$ <strong>The</strong> revision number of the project with which<br />

the archive is related.<br />

$RCSfile$ <strong>The</strong> archive’s unqualified file name.<br />

$Revision$ <strong>The</strong> revision number.<br />

$<strong>Source</strong>$ <strong>The</strong> archive’s fully qualified file name.<br />

$State$ <strong>The</strong> revision’s state setting.<br />

132 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Managing Projects and<br />

Sandboxes<br />

5<br />

<strong>Source</strong> <strong>Integrity</strong> allows you to archive your projects just as you do<br />

your members, so you can always reproduce complete project<br />

configurations (including the files and the directory trees in which<br />

they reside) at any time in the future. This ability to replicate projects<br />

precisely is essential to successful post-release maintenance.<br />

This chapter describes how to<br />

freeze projects to prevent changes, and thaw them to allow<br />

changes<br />

checkpoint projects to provide a snapshot of their contents at<br />

particular points<br />

promote and demote projects from one state to another through a<br />

development cycle<br />

log transactions that have been performed on projects<br />

view changes from one version of a project to another<br />

restore a project to previous checkpointed version<br />

delete variant projects<br />

<strong>User</strong> <strong>Guide</strong> 133


Managing Projects and Sandboxes<br />

Freezing a Project<br />

If you decide that a project has advanced to the point where further<br />

changes may destabilize it, you can freeze the project.<br />

At the project level, freezing prevents<br />

adding, updating, or deleting any project members<br />

changes to project attributes and configuration options<br />

any changes to event triggers that are part of the project file<br />

Freezing a project extends an “implied” freeze to all the members in<br />

the project. However, members in a frozen project cannot be thawed<br />

or frozen individually. You first have to thaw the project. Because of<br />

this, when the current project is frozen, freeze and thaw member<br />

commands in the Windows interface are not available.<br />

<strong>The</strong> state of being frozen is inherited. If a frozen project contains a<br />

subproject, the subproject too is frozen and, in turn, all of its archived<br />

members.<br />

In the Windows interface and <strong>Source</strong> <strong>Integrity</strong> Web Interface, a frozen<br />

project is denoted with a snowflake symbol ( ).<br />

Note <strong>The</strong> ability to freeze or thaw projects can be controlled through<br />

SAM. <strong>The</strong>refore, administrators with responsibility for <strong>Source</strong> <strong>Integrity</strong><br />

may have restricted the use of freezing or thawing through SAM<br />

permissions. Consult the SAM documentation or the person responsible<br />

for administering SAM.<br />

To freeze a project in the Windows interface:<br />

With a Project or Sandbox window active, choose Project > Freeze<br />

Project, or click (if added to the toobar).<br />

<strong>Source</strong> <strong>Integrity</strong> freezes the project and places a snowflake symbol<br />

( ) beside each member in the Sandbox or Project window, to<br />

remind you that the project is frozen and that changes are not<br />

allowed.<br />

<strong>The</strong> word “Frozen” also appears in the window title.<br />

To make this command act recursively in all subprojects of the active<br />

project, make sure the Freeze Project option is selected in the<br />

Recursion panel of the Personal Configuration dialog box.<br />

134 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Thawing a Project<br />

Thawing a Project<br />

To freeze a project in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

In the Project view, choose Project > Freeze Project. If this project<br />

contains subprojects, you are asked whether or not you want to<br />

recurse into them.<br />

To freeze a project in the command line interface:<br />

Use the pj freezeproject command from the project directory. Its<br />

syntax is<br />

pj freezeproject [-i] [-Pprojfile.pj]<br />

where -i causes the freeze to be applied recursively to all subprojects,<br />

and -Pprojfile.pj specifies a project file name if your project file is not<br />

called project.pj.<br />

Use the pj vars or pj header commands to confirm the freeze.<br />

Note Invoking pj print reveals that all the project members have been<br />

frozen, but it does not reveal that the project itself is frozen.<br />

If you decide that a project no longer needs to be frozen, you can thaw<br />

it, thus removing the restriction on changing member information in<br />

the project.<br />

Thawing a project removes the “implied” freeze on member files,<br />

except for those that were previously frozen individually. Thawing a<br />

project also permits changes to project attributes, configuration<br />

language blocks, and event triggers in the project file.<br />

If a member or subproject of a frozen project has been previously<br />

frozen, you must thaw the project before you thaw the member or<br />

subproject.<br />

To thaw a project in the Windows interface:<br />

With a Project or Sandbox window active, choose Project > Thaw<br />

Project, or click (if added to the toolbar).<br />

<strong>Source</strong> <strong>Integrity</strong> thaws the project and removes the snowflake symbol<br />

( ) from beside each member in the Sandbox or Project window.<br />

This indicates that changes to the project are allowed once again.<br />

<strong>User</strong> <strong>Guide</strong> 135


Managing Projects and Sandboxes<br />

Checkpointing a Project<br />

<strong>The</strong> word “Frozen” also disappears from the window title.<br />

To thaw a project in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

In the Project view, choose Project > Thaw Project.<br />

<strong>Source</strong> <strong>Integrity</strong> thaws the project and removes the snowflake symbol<br />

( ) from beside each member in the Sandbox or Project window.<br />

This indicates that changes to the project are allowed once again.<br />

If the project contains subprojects, a prompt appears asking if you<br />

want to thaw subprojects as well.<br />

To thaw a project in the command line interface:<br />

Use the pj thawproject command from the project directory. Its<br />

syntax is<br />

pj thawproject [-i] [-Pprojfile.pj]<br />

Include the -P parameter with your project file name if your project<br />

file is not project.pj. Include the -i parameter to have <strong>Source</strong><br />

<strong>Integrity</strong> recursively thaw all subprojects.<br />

Use pj vars or pj header to confirm that <strong>Source</strong> <strong>Integrity</strong> has<br />

removed the project freeze.<br />

Just as you check in a source file to preserve the changes that are<br />

made to it from one revision to another, you must also be able to track<br />

the evolution of a project. In <strong>Source</strong> <strong>Integrity</strong>, this process is called<br />

checkpointing.<br />

Checkpointing saves a copy of the project file in the project archive as<br />

a revision, including the list of members along with their revision<br />

numbers and project attributes (including configuration statements<br />

and event triggers).<br />

You can use the project’s revision number to keep track of your<br />

projects. But to simplify post-release maintenance, use a label to<br />

identify significant project development milestones when you<br />

checkpoint a project.<br />

For example, if you checkpoint a project and label it with a release<br />

identifier (for example, “Release 6.2”), you be able to find and<br />

recreate that particular development state more easily.<br />

136 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Checkpointing a Project<br />

Remember that checkpointing a project affects the project file only; it<br />

does not check in every member of the project.<br />

If you are working in a sandbox, issuing a checkpoint command<br />

checkpoints the sandbox’s master project.<br />

If you want to create a variant sandbox or build sandbox, you must<br />

have a checkpointed project to start with.<br />

To checkpoint a project in the Windows interface:<br />

1. With a Project or Sandbox window active, choose Project ><br />

Checkpoint Project.<br />

If the Checkpoint Project option is set in the Recursion panel of<br />

the Personal Configuration dialog box, this command recursively<br />

checkpoints subprojects that are members of the project the<br />

command is run on.<br />

<strong>The</strong> Checkpoint dialog box appears.<br />

2. Fill in the options as you like, and click OK to create a new<br />

revision of the project. Following are the options you can set:<br />

Label. Enter a revision label (unique text that identifies the<br />

new revision) in this field. You may want to label significant<br />

checkpoints with a product release number, to aid in postrelease<br />

maintenance.<br />

Number. This field is primed with a suggested revision<br />

number for the new revision. You may accept this<br />

recommendation or enter another number of your choice. If<br />

you choose to override the suggested revision number, the<br />

<strong>User</strong> <strong>Guide</strong> 137


Managing Projects and Sandboxes<br />

number you supply must be higher than the head revision<br />

number (if you are checkpointing the main project), or the tip<br />

revision number (if you are checkpointing a variant project).<br />

State. This field holds a one-word summary describing the<br />

status of the new revision. For example, if the revision is an<br />

early version of the work, you might assign it a state of<br />

“Experimental”. When later revisions are checked in and the<br />

work is ready to be viewed by other team members, a state of<br />

“Testing” can be assigned.<br />

Initially, the State field is primed with a value of “Exp” (for<br />

Experimental), or the lowest promotion state setting, if<br />

promotion is turned on. Blank spaces or punctuation marks<br />

may not be included in the State field. This field may not be<br />

left blank.<br />

If promotion is enabled, you can choose from a list of all<br />

available promotion states.<br />

Author. This field is used to identify the person who made the<br />

changes to the new revision. By default, this box is primed<br />

with the author name defined in your configuration, but you<br />

are free to change it to any name you choose.<br />

Apply Label To All Members. This option lets you apply the<br />

label you enter to all members in the current project. <strong>The</strong><br />

label is applied recursively if the Label option is selected in<br />

the Recursion panel of the Personal Configuration dialog box.<br />

Apply State To All Members. This option lets you apply the<br />

state you choose to all members in the current project. <strong>The</strong><br />

state is applied recursively if the Promote and Demote<br />

Member option is selected in the Recursion panel of the<br />

Personal Configuration dialog box.<br />

Replace Label. If the label you choose already exists in the<br />

archive, this option tells <strong>Source</strong> <strong>Integrity</strong> to delete the label<br />

from the revision it is currently attached to and apply it to the<br />

new revision.<br />

Update Member. If you are checking in a subproject member<br />

to a project or sandbox, this option lets you update the<br />

revision number of the subproject member to that of the<br />

newly checked-in revision.<br />

All Subprojects. If you are checking in more than one<br />

subproject member, the Checkpoint dialog box appears with<br />

this option available. Selecting this option causes the current<br />

set of options to be applied to all subsequent check-in<br />

operations.<br />

138 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Checkpointing a Project<br />

To checkpoint a project in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. From the Project view, select the project file and choose the<br />

Checkpoint Project command.<br />

<strong>The</strong> Checkpoint page appears, displaying the full path of the<br />

project file to be checked in.<br />

2. Enter your metadata in the fields provided, remembering that the<br />

metadata entered is applied to the revision of the project, not its<br />

members.<br />

Revision Description. Text commenting on the content, or<br />

members, of the project revision<br />

Label. Text which can be used to identify the project revision<br />

To move an existing label from a previous revision to the<br />

current revision, select Replace Label. To attach the label<br />

entered to all member revisions in the project, select Apply<br />

Label to All Members.<br />

State. A one-word description of the new revision’s status.<br />

Author. <strong>The</strong> name of the person checkpointing the project, by<br />

default your user name.<br />

3. Click OK to checkpoint the project.<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface creates a new revision of the<br />

project in the project’s archive. If the project has subprojects, they<br />

are automatically checkpointed as well.<br />

To checkpoint a project in the command line interface:<br />

Use the pj checkpoint command. Its syntax is<br />

pj checkpoint [-Nlabel] [-sstate] [-rrev] [-t<br />

[mesg|@mesgfile]] [-i] [options]<br />

where label is a label (if it exists, it is moved up to this revision), rev<br />

specifies a revision to be checkpointed, mesg is an archive description<br />

(if this is the first time you are checkpointing a particular archive),<br />

and mesgfile is a file containing text for the archive description.<br />

<strong>User</strong> <strong>Guide</strong> 139


Managing Projects and Sandboxes<br />

Opening a Project Archive<br />

When naming a symbolic label, you should not use periods (.) in the<br />

name, since this can create ambiguous situations when labels are<br />

used to specify a revision. Labels cannot contain colons (:), square<br />

brackets ([ ]), or leading spaces. <strong>The</strong>y also may not resemble a<br />

revision number.<br />

Note <strong>MKS</strong> strongly recommends you use the -i option, which causes<br />

all subprojects to also be checkpointed.<br />

When you want to view the revision history of a project, you can<br />

open its project archive. Opening the project archive of a sandbox is<br />

the same as opening the project archive of its master project.<br />

To open a project’s archive in the Windows interface:<br />

With a Sandbox or Project window active, choose Project > Open<br />

Project Archive.<br />

<strong>The</strong> project’s archive opens and displays in an Archive window.<br />

To open a project’s archive in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

Go to the Project view and choose Project Commands > Open History<br />

View, or click History on the toolbar. This shows the checkpoint<br />

history of the project.<br />

Promoting and Demoting a Project<br />

Just as you can with a project member, you can promote or demote the<br />

project itself (change its state, in other words) as long as promotion is<br />

enabled and you have the necessary SAM permissions. This can assist<br />

in management of an entire project through a development cycle,<br />

especially if the promotion and demotion functions are restricted to<br />

key project personnel.<br />

Normally, you promote or demote a project (set its state) when you<br />

checkpoint it, but you can do so at any time.<br />

140 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Promoting and Demoting a Project<br />

If you promote or demote a sandbox, the master project is promoted<br />

or demoted. Only the project file is promoted or demoted, not the<br />

members of the project.<br />

To promote a project in the Windows interface:<br />

1. With a Sandbox window or Project window active, choose Project<br />

> Promote Project.<br />

<strong>The</strong> Promote Project dialog box appears.<br />

2. Select a new promotion state from the Promote to state dropdown<br />

list.<br />

3. Click OK to accept the new promotion state, or click Cancel to<br />

close the dialog box without changing the project’s state.<br />

If the Project > Promote Project command is not available, make sure<br />

the promotion feature is enabled on the Promotion tab of the Personal<br />

Configuration dialog box.<br />

To demote a project in the Windows interface:<br />

1. With a Sandbox window or Project window active, choose Project<br />

> Demote Project.<br />

<strong>The</strong> Demote Project dialog box appears.<br />

2. Select a new promotion state from the Demote to state drop-down<br />

list.<br />

3. Click OK to accept the new promotion state, or click Cancel to<br />

close the dialog box without changing the project’s state.<br />

<strong>User</strong> <strong>Guide</strong> 141


Managing Projects and Sandboxes<br />

To promote or demote a project in the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface:<br />

Use the Promote and Demote commands from the History view.<br />

To promote or demote a project in the command line interface:<br />

Use the rcs command as follows: with the -sstate option. Its syntax is<br />

rcs -sstate[:rev] file<br />

where state is the new state you would like to change to.<br />

Logging Project Transactions<br />

For information about logging<br />

archive transactions, see<br />

“Logging Archive<br />

Transactions” on page 193.<br />

Cleaning Up<br />

Log Files<br />

<strong>Source</strong> <strong>Integrity</strong> keeps track of the transactions it performs upon<br />

projects in a file called project.trn, where project is the name of the<br />

.pj file for your project.<br />

To view the transaction log in the Windows interface:<br />

Choose Project > View Log.<br />

Your default editor is launched with the log file open in it.<br />

<strong>The</strong> Log file has the same name as the project (.pj) file, but with a<br />

.trn extension, and is stored in the project directory.<br />

You can also open a text editor, browse to your project directory, and<br />

open the .trn file from there.<br />

<strong>The</strong> easiest way to clean up a log file is to delete the file. <strong>Source</strong><br />

<strong>Integrity</strong> automatically creates a new one the next time it records a<br />

project transaction. You can also open the log file in a text editor and<br />

delete transaction records. For instance, you could delete transaction<br />

records that are greater than a particular number of days or weeks<br />

old.<br />

142 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Viewing Changes to a Project<br />

Viewing Changes to a Project<br />

When you checkpoint a project, you are actually saving a revision of<br />

the project file itself (for example, project.pj). <strong>The</strong> project file<br />

contains information that can help you manage and understand the<br />

progress of your projects as they move through the development<br />

cycle. This information includes<br />

revision number of the current project<br />

names and locations of all project members<br />

revision numbers of all project members<br />

any project attributes<br />

member attributes<br />

project-specific event triggers<br />

As you work with the project and its members, the content of the<br />

project file changes.<br />

<strong>The</strong> revision number of the project is updated every time you<br />

checkpoint it (that is, check in the project).<br />

As you check in individual members, their revision numbers<br />

change.<br />

Members may be added or deleted.<br />

Project attributes may be added or deleted.<br />

<strong>Source</strong> <strong>Integrity</strong>, in its Windows and command line interfaces, allows<br />

you to view the changes that have occurred between two versions of<br />

the project file.<br />

Note This functionality is not available in the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface.<br />

To view changes to a project in the Windows interface:<br />

1. With a Project or Sandbox window active, choose Project > View<br />

Project Changes.<br />

<strong>The</strong> View Project Changes dialog box appears.<br />

<strong>User</strong> <strong>Guide</strong> 143


Managing Projects and Sandboxes<br />

2. Select which revisions of the project you want to compare.<br />

Compare the current version of the project with its last<br />

checkpointed revision.<br />

Compare the current version of the project with a specific<br />

revision or label.<br />

If you select this option, select the specific revision by<br />

Revision number or by Label.<br />

Compare two revisions or labels of the project.<br />

If you select this option, select the two specific revisions by<br />

Revision number or by Label.<br />

3. Click OK.<br />

If no changes to the project have occurred, a box appears to<br />

inform you. If changes have occurred, the Project Changes dialog<br />

box appears, displaying the changes that have occurred.<br />

144 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Viewing Changes to a Project<br />

4. To copy the text in the dialog box to your Windows clipboard,<br />

select the text you want to copy and press .<br />

5. When you are finished, click OK or Cancel.<br />

To view changes to a project in the command line interface:<br />

Use the pj mods command. Its syntax is<br />

pj mods [-k rev1] [-k rev2] [options]<br />

where rev1 and rev2 define the range of project revisions to be<br />

compare.<br />

<strong>The</strong>re are three ways you can compare project revisions:<br />

If you use no -k options, the most current revision of the project<br />

file is compared with the working file in the project directory. In<br />

other words, it shows all of the changes to the project file since<br />

the last time it was checkpointed.<br />

If you specify only one -k option, pj mods compares the specified<br />

revision with the current project working file.<br />

For example, the command<br />

pj mods -k 1.2<br />

compares revision 1.2 of the project file to the project file in the<br />

project directory.<br />

If you specify both -k options, the two specified revisions are<br />

compared.<br />

For example, the command<br />

pj mods -k 1.3 -k 1.5<br />

compares revision 1.3 of the current project to revision 1.5 of the<br />

same project. Its output might look something like<br />

d:\gamble\handler.c: revision changed: was 1.12,<br />

now 1.15<br />

This information tells you that when you checkpointed revision 1.3 of<br />

the project, the member named handler.c was at revision 1.12, and<br />

in project revision 1.5 the member had moved to revision 1.15.<br />

<strong>User</strong> <strong>Guide</strong> 145


Managing Projects and Sandboxes<br />

Restoring a Project’s Member List<br />

<strong>The</strong> Restore Project Member List feature restores the member list of a<br />

previously checkpointed revision of a project. This feature modifies<br />

the project’s working file on the current development path to reflect<br />

the member list of the restored project revision, allowing<br />

development in the project to proceed from that point.<br />

Note If you want to create a branch for new development from a<br />

previously checkpointed project revision, you should create a variant<br />

sandbox (see “Creating a Sandbox” on page 76).<br />

If the project file has changed since the last checkpoint, this command<br />

checkpoints the current project file before restoring the member list.<br />

If the Restore Member List option is set in the Recursion panel of the<br />

Personal Configuration dialog box, this command recursively<br />

checkpoints subprojects that are members of the project (or members<br />

of members) the command is run on.<br />

Some items cannot be restored using the Restore Project Member List<br />

feature, including:<br />

Project attributes, because they represent current development<br />

practices that are probably still in effect even after you have<br />

restored a previous version of a project. <strong>The</strong>y include<br />

<strong>Source</strong> <strong>Integrity</strong> configuration policies<br />

project mappings<br />

project build variables<br />

project-related event triggers<br />

user-defined project variables.<br />

Members that have a type of “other”, indicating that they are<br />

non-archived.<br />

Note <strong>MKS</strong> strongly recommends that you archive all members when<br />

adding them to a project.<br />

Revision locks, revision state, and revision labels.<br />

146 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Restoring a Project’s Member List<br />

To restore the project member list in the Windows interface:<br />

1. Choose Project > Restore Member List.<br />

<strong>The</strong> Restore Project Member List dialog box appears.<br />

2. Select the revision you want to restore By Revision, By Label, or<br />

By Development path.<br />

3. Optionally, enter a comment in the Description field.<br />

4. Click OK to restore the project member list, or click Cancel to<br />

close the dialog box without making changes.<br />

To restore the project member list in the command-line<br />

interface:<br />

Use the pj restore command, specifying which project to restore by<br />

its revision, label, or development path. Its syntax is<br />

pj restore -rrev | -rlabel | -Ndevpath [-i]<br />

where rev is a revision number, label is a label assigned to the project,<br />

and devpath is the project’s development path. To recursively restore<br />

the subprojects of the specified project, use the -i option.<br />

<strong>User</strong> <strong>Guide</strong> 147


Managing Projects and Sandboxes<br />

Importing Files<br />

For complete details, see the<br />

online command reference for<br />

the sccs2rcs, pvcs2rcs,<br />

and vss2rcs commands.<br />

For information on syntax of<br />

vss2rcs command, see<br />

“Importing Visual <strong>Source</strong>Safe<br />

Files” on page 150.<br />

If you are already using a revision control system (for example, SCCS,<br />

PVCS, or Visual <strong>Source</strong>Safe) and you want to move to <strong>Source</strong> <strong>Integrity</strong>,<br />

you can import your existing archives and automatically convert<br />

them to <strong>Source</strong> <strong>Integrity</strong> format.<br />

This functionality does not exist in the <strong>Source</strong> <strong>Integrity</strong> Web Interface.<br />

To import a PVCS or SCCS archive in the Windows interface:<br />

Use the File > Import Archives command.<br />

To import an archive in the command line interface:<br />

Use the pvcs2rcs (for PVCS files), sccs2rcs (for SCCS files), and<br />

vss2rcs (for Visual <strong>Source</strong>Safe) commands.<br />

<strong>The</strong> pvcs2rcs and sccs2rcs commands use the same syntax:<br />

pvcs2rcs -Fflist | file…<br />

sccs2rcs -Fflist | file…<br />

where flist is a file list containing the names of the files to import (one<br />

per line), and file is one or more files to import into <strong>Source</strong> <strong>Integrity</strong>.<br />

Note <strong>The</strong> pvcs2rcs and sccs2rcs commands do not work on files that<br />

reside on secure servers (such as one secured by the <strong>MKS</strong>SI NT Security<br />

Service or Novell NLM). To convert such files, first copy them to an<br />

unsecured file system. Perform the conversion there and copy the newly<br />

created <strong>Source</strong> <strong>Integrity</strong> archives to the secured server (and secure<br />

them).<br />

Example<br />

<strong>The</strong> command<br />

sccs2rcs sample01.txt sample02.txt sample03.txt<br />

imports the three named files, while<br />

sccs2rcs -Ffiles.lst<br />

imports all the files listed in the file files.lst.<br />

Importing files preserves virtually all the file and revision<br />

information contained in the PVCS or SCCS file formats. <strong>The</strong>re are,<br />

however, some differences in the way various revision control<br />

148 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Importing SCCS<br />

Files<br />

Importing PVCS<br />

Files<br />

Importing Files<br />

systems express specific aspects of the process. <strong>The</strong> following<br />

sections describe the way <strong>Source</strong> <strong>Integrity</strong> handles these differences,<br />

as well as other features unique to <strong>Source</strong> <strong>Integrity</strong>.<br />

<strong>Source</strong> <strong>Integrity</strong> imports SCCS files as follows:<br />

SCCS files are not deleted.<br />

<strong>The</strong> state of all revisions is set to “Exp”.<br />

On DOS systems, if the SCCS file has its working file name (m)<br />

flag set, the <strong>Source</strong> <strong>Integrity</strong> archive takes the name specified by<br />

the m flag; otherwise, it takes the name of the SCCS file, with the<br />

.s suffix (if present) removed.<br />

Note On UNIX systems, the name of the <strong>Source</strong> <strong>Integrity</strong> archive is the<br />

same as the SCCS input file, with the .s suffix removed.<br />

If the SCCS file has its default revision flag set, the default branch<br />

in the <strong>Source</strong> <strong>Integrity</strong> archive is set to the corresponding<br />

revision.<br />

If MR (Modification Request) numbers are provided with any<br />

SCCS revisions, these numbers are added to the revision<br />

descriptions of the corresponding <strong>Source</strong> <strong>Integrity</strong> revisions.<br />

Locks are not preserved. Revisions locked under SCCS are not<br />

locked when imported into <strong>Source</strong> <strong>Integrity</strong>.<br />

<strong>Source</strong> <strong>Integrity</strong> imports PVCS files as follows:<br />

PVCS files are not deleted.<br />

<strong>The</strong> state of all revisions is set to “Exp”.<br />

<strong>The</strong> sequence of revision numbers is preserved, but since PVCS<br />

revision numbers start at 1.0 and <strong>Source</strong> <strong>Integrity</strong> revision<br />

numbers start at 1.1, all components of PVCS revision numbers<br />

(except the first character) are incremented by one. For example,<br />

PVCS revision number 1.0 becomes <strong>Source</strong> <strong>Integrity</strong> revision<br />

number 1.1; 1.3.2.5 becomes 1.4.3.6, and so on.<br />

If the CHECKLOCK option is specified in the PVCS input file, strict<br />

locking is enabled by <strong>Source</strong> <strong>Integrity</strong>.<br />

If the WRITEPROTECT option is specified in the PVCS input file, the<br />

<strong>Source</strong> <strong>Integrity</strong> archive is created as a read-only file.<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> archive takes the name of the PVCS working<br />

file.<br />

<strong>User</strong> <strong>Guide</strong> 149


Managing Projects and Sandboxes<br />

Importing<br />

Visual<br />

<strong>Source</strong>Safe<br />

Files<br />

<strong>The</strong> vss2rcs command’s syntax is<br />

vss2rcs [-D] [-B branch] [-a SI_workdir] [-s VSS_path]<br />

[-f filelist] [vssfile …]<br />

<strong>The</strong> working file for the converted archive is placed in the current<br />

directory. <strong>The</strong> actual archive is placed in the directory indicated by<br />

the RCSPATH SAM configuration variable. Often, this will be<br />

SI_workdir/rcs/vssfile.<br />

Note You must have Visual <strong>Source</strong>Safe installed on the machine on<br />

which you are running the conversion, and you must be logged into<br />

Windows as a valid Visual <strong>Source</strong>Safe user.<br />

vss2rcs accepts the following options:<br />

-a SI_workdir specifies the directory in which to place the<br />

working file for the converted archive.<br />

-B branch creates the converted archive on the specified branch.<br />

-D displays debugging messages. When this option is specified,<br />

conversion is slowed down.<br />

-f filelist provides an alternate way to specify archives to be<br />

converted. <strong>The</strong> given filelist contains a list of Visual <strong>Source</strong>Safe<br />

archives to be converted along with the information on the Visual<br />

<strong>Source</strong>Safe project path and the directory for <strong>Source</strong> <strong>Integrity</strong><br />

working files which is normally specified by -s and -a options,<br />

respectively.<br />

<strong>The</strong> filelist file has the following format:<br />

A line starting with SS-SI-PROJECT followed by a space and<br />

the full path name of the Visual <strong>Source</strong>Safe project containing<br />

the archives to be converted.<br />

A line starting with SS-SI-WORKDIR followed by a space<br />

and the path name of the directory containing the <strong>Source</strong><br />

<strong>Integrity</strong> working file.<br />

Several lines, each of which specifies the name of a Visual<br />

<strong>Source</strong>Safe archive from the project specified by the SS-SI-<br />

PROJECT that you wish to convert.<br />

You can convert multiple projects with one filelist by repeating<br />

this format one or more times.<br />

-s VSS_path specifies the path name of the Visual <strong>Source</strong>Safe<br />

project that contains the archive being converted.<br />

150 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Using Existing<br />

RCS Archives<br />

Example<br />

<strong>The</strong> command<br />

vss2rcs $/proj1/proj2/file1<br />

Importing Files<br />

converts the Visual <strong>Source</strong>Safe archive file1 from the project<br />

$/proj1/proj2 and places the resulting <strong>Source</strong> <strong>Integrity</strong> working file<br />

in the current directory. <strong>The</strong> corresponding archive is placed in a<br />

location determined by the value of the RCSPATH configuration<br />

variable.<br />

Similarly,<br />

vss2rcs -s $/proj1/proj2 file1 file2<br />

converts the Visual <strong>Source</strong>Safe archives file1 and file2 and places<br />

the resulting working files in the current directory.<br />

With the -a option, you can have the <strong>Source</strong> <strong>Integrity</strong> working files<br />

created in a location other the current directory. For example,<br />

vss2rcs -a c:/temp $/proj1/file1 $/proj1/file2<br />

places the working files created from the Visual <strong>Source</strong>Safe archives<br />

$/proj1/file1 and $/proj2/file2 in the c:/temp directory.<br />

<strong>Source</strong> <strong>Integrity</strong> accepts traditional RCS archives without conversion.<br />

<strong>Source</strong> <strong>Integrity</strong> will, however, begin to add proprietary information<br />

to the archives to accommodate its specialized functionality.<br />

<strong>Source</strong> <strong>Integrity</strong> provides the configuration option VanillaRCS to<br />

allow compatibility with traditional RCS. When VanillaRCS is set in<br />

a project, or in your Personal Configuration, any new archives<br />

created will be made RCS-compatible.<br />

Note Other RCS systems, such as GNU RCS, are not able to take<br />

advantage of <strong>Source</strong> <strong>Integrity</strong> project information.<br />

<strong>User</strong> <strong>Guide</strong> 151


Managing Projects and Sandboxes<br />

Accessing Project Information With the<br />

Command Line Interface<br />

One of the features of <strong>Source</strong> <strong>Integrity</strong> is the project and member<br />

metadata (that is, information about projects and their members) it<br />

stores and maintains. At the project level, the metadata it saves or can<br />

generate includes<br />

a list of project members<br />

a record of all the changes made to project members<br />

a record of changes made to the project itself<br />

You can also use the report command to generate archive and<br />

project information in a form that can be imported and manipulated<br />

by most database programs.<br />

List of Members <strong>The</strong> pj print command can search out and display information<br />

about a project and its members. Using the -S format option, you can<br />

specify the type of information it displays.<br />

For example, the command<br />

pj print -S “%n %r %t”<br />

Changed<br />

Members<br />

displays the name, revision number, and type of all project members.<br />

In fact, the above format string does not need to be supplied, as it is<br />

the default format.<br />

Here’s a sample of output from this command<br />

p:\gamble\handler.c 1.14 archived<br />

p:\gamble\init.c 1.9 archived<br />

p:\gamble\makefile 1.10 archived<br />

p:\gamble\nt\filesys.c 1.22 archived<br />

with an entry for every member of the project. By changing the format<br />

modifier with the -S option, you can display a wide variety of project<br />

and member information.<br />

<strong>The</strong> pj what command displays the status of project members and<br />

any differences between project members and their working files. It<br />

can report if<br />

a member’s archive is missing or corrupt<br />

there is a newer revision available for a member<br />

a member is locked<br />

a member’s working file is missing or inaccessible<br />

152 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Variables and<br />

Attributes<br />

Project and<br />

Sandbox<br />

Information and<br />

System Settings<br />

Attributes<br />

a member’s working file has changed<br />

Accessing Project Information With the Command Line Interface<br />

a member’s working file is newer than its revision<br />

You can use the -T criteria option to specify the information you want<br />

to see.<br />

For example, the command<br />

pj what -T changed,touched<br />

tells you which members’ working files have been changed, and<br />

whether they are newer than the project member revision.<br />

By modifying the criteria portion of the -T option, you can generate a<br />

range of reports to help you manage and analyze the progress of your<br />

projects.<br />

You can use the pj vars command to view all variables and attributes<br />

accessible from a project or sandbox. Its syntax is:<br />

pj vars [-ceEg]<br />

where -c shows local configuration only, -e shows project<br />

configuration only, -E shows sandbox configuration only, and -g<br />

shows global configuration only.<br />

You can view current project and sandbox information and system<br />

settings with the pj header command. Its syntax is:<br />

pj header [options]<br />

where options are the standard pj options.<br />

Attributes are settings that persist between sessions of <strong>Source</strong><br />

<strong>Integrity</strong>. Depending on the attribute, they are stored in the project or<br />

the sandbox.<br />

Member Attributes<br />

Any member of a <strong>Source</strong> <strong>Integrity</strong> project can be assigned attributes,<br />

which can be used to locate and identify individual members—or<br />

groups of members—and to direct project commands to members<br />

with a particular attribute.<br />

Member attributes are set with the pj addrule command. Its syntax<br />

is<br />

pj addrule var[=value] [file…]<br />

<strong>User</strong> <strong>Guide</strong> 153


Managing Projects and Sandboxes<br />

For more information about<br />

the -v option, see the online<br />

reference for the pj command.<br />

where var is the name of an attribute, value is the value it is set to, and<br />

file is one or more project members the attribute will be assigned to. If<br />

file is omitted, the attribute is assigned to all project members.<br />

Example<br />

You might use attributes to identify the components needed to build<br />

the NT and OS/2 versions of the gamble project.<br />

You could accomplish this by creating an attribute named “SYS” for<br />

all project members and assigning appropriate values for individual<br />

members.<br />

Files that are used to build both versions of the command (for<br />

example, header and most code files) are assigned a value of<br />

“Both”.<br />

Files used only for the NT version are assigned a value of “NT”.<br />

Files used only for the OS/2 version are assigned a value of<br />

“OS2”.<br />

<strong>The</strong> easiest way to implement this for the gamble project is as follows:<br />

1. Use the pj addrule command to assign the SYS attribute to all<br />

project members, with a value of “Both”.<br />

pj addrule SYS=Both<br />

2. Run the command twice more to change the value of SYS for<br />

those members used for only one operating system<br />

pj addrule SYS=NT nt\filesys.c<br />

pj addrule SYS=OS2 os2\filesys.c<br />

Note To change a member attribute, simply run pj addrule again and<br />

assign a new value.<br />

With these attributes in place, you can use the -v option to the project<br />

commands to specify that they should operate only on members with<br />

a particular attribute, or an attribute set to a certain value.<br />

For example, to print information about all project members with the<br />

SYS attribute, enter<br />

pj print -v SYS<br />

To see the same information about only those members associated<br />

with the NT platform, you would enter<br />

pj print -v SYS=NT<br />

154 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Accessing Project Information With the Command Line Interface<br />

You remove member attributes with the pj droprule command.<br />

For example, to remove the SYS attribute from all gamble project<br />

members, enter<br />

pj droprule SYS<br />

Note Member attributes are case sensitive; “SYS” and “Sys” are<br />

interpreted as different attributes.<br />

Project Attributes<br />

You can assign attributes to projects, which then define local settings<br />

for the project as a whole.<br />

You can create and set any project attributes you choose, provided<br />

they conform to the rules of the <strong>Source</strong> <strong>Integrity</strong> configuration<br />

language.<br />

Note Some attributes are predefined and understood by <strong>Source</strong><br />

<strong>Integrity</strong>. In this capacity, they are called Policy Options, because of their<br />

special meaning and additionally their availability in SAM.<br />

<strong>Source</strong> <strong>Integrity</strong> does not permit multiple attributes with the same<br />

name. <strong>The</strong>re are a few exceptions: some configuration options can be<br />

set several times, with different values or settings. <strong>The</strong> most common<br />

example is the AutoAction option, which is set once for each event<br />

trigger to be defined.<br />

Project attributes (and policy options) are created and set with the<br />

pj set command. Its syntax is<br />

pj set var[=value]<br />

where var is the name of the attribute and value is the value assigned<br />

to it.<br />

If your settings have spaces in them, remember to use quotes. This is<br />

important for several types of settings. For example<br />

pj set my_flag<br />

pj set approved=checked_by_kz<br />

<strong>User</strong> <strong>Guide</strong> 155


Managing Projects and Sandboxes<br />

pj set “states=new changed approved final”<br />

pj set “worktoarch c:\proj=c:\rcs\proj”<br />

Note You can view the list of project attributes with the pj vars<br />

command. For a description of pj vars, see the online command<br />

reference or the <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong> Reference <strong>Guide</strong>.<br />

You can remove project attributes with pj unset. When unsetting<br />

attributes, remember to quote them if they include spaces. For<br />

example<br />

pj unset my_flag<br />

pj unset approved<br />

pj unset states<br />

pj unset “worktoarch c:\proj”<br />

Example<br />

You can specify the utility the pj build command uses to build the<br />

project by setting the reserved project option Build.<br />

pj set Build=c:\wcc\bin\make.exe<br />

To remove the Build attribute from the current project you would<br />

enter<br />

pj unset Build<br />

After setting several WorktoArch statements<br />

pj set “worktoarch c:\proj=c:\rcs\proj”<br />

pj set “worktoarch c:\other=d:\archives\other”<br />

you must specify the WorktoArch statement to delete<br />

pj unset “worktoarch c:\proj”<br />

pj unset “worktoarch c:\other”<br />

Note Project attributes are not case sensitive; “SYS” and “Sys” are<br />

interpreted as the same attributes. Member attributes, on the other hand,<br />

are case sensitive.<br />

156 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Editing Code Blocks<br />

Accessing Project Information With the Command Line Interface<br />

Before using the pj set command to create a new AutoAction<br />

statement, you may want to use the pj editblock command to create<br />

a new code block, or replace an existing one within a project or<br />

sandbox. Its syntax is<br />

pj editblock [options] [-m [“block” | [@]blockfile]]<br />

blockname<br />

where<br />

options is zero or more valid project command options.<br />

block is the text of a code block, entered on the command line.<br />

This text should be enclosed in quotes.<br />

-m[@]blockfile is a file containing the new text for the code block<br />

blockname. Use the @ sign to indicate that blockfile is a file name. If<br />

you omit the @ sign, blockfile is treated as code block text.<br />

If you omit the -m option, your default editor opens with a<br />

temporary file that is empty if your block is new, or contains the<br />

current contents of the block if it already exists. Edit the block,<br />

save the file, and exit to add it to the project.<br />

blockname is the name of the code block to add or replace.<br />

For example, the command<br />

pj editblock -m @block.txt NotifyChange<br />

replaces a code block named NotifyChange with the contents of the<br />

file named block.txt.<br />

You delete an existing code block with the pj dropblock command.<br />

For example, the command<br />

pj dropblock NotifyChange<br />

deletes a code blocked named NotifyChange from the project file.<br />

<strong>User</strong> <strong>Guide</strong> 157


Managing Projects and Sandboxes<br />

Deleting Variant Projects<br />

If a development path within a project has become obsolete, you can<br />

remove it without disturbing the main trunk or other development<br />

paths in the project. This functionality is only available in the<br />

Windows and command line interfaces.<br />

You can only perform this operation on development paths created<br />

through variant sandboxes. <strong>Source</strong> <strong>Integrity</strong> does not support<br />

removing the main trunk of a project.<br />

Caution Take care when using this command. This command removes<br />

a development path from within a master project. Doing this will<br />

invalidate and make useless the variant sandboxes of anyone else<br />

following this development path.<br />

To delete a development path in the Windows interface:<br />

1. With a Project window active, choose Project > Project<br />

Information.<br />

<strong>The</strong> Project Information dialog box appears.<br />

2. Click Development Paths to expand the dialog box to show the list<br />

of development paths.<br />

3. From the list of development paths, select one or more and click<br />

Delete.<br />

To delete a development path in the command line interface:<br />

From within the master project directory, use the pj delvariant<br />

command. Its syntax is<br />

pj delvariant -Ndevpathname<br />

where devpathname is the name of the development path you want to<br />

eliminate.<br />

You can also delete a variant sandbox from its own directory rather<br />

than the project directory. Give the command<br />

pj delvariant [-Psbxname.pj]<br />

without specifying the development path name. <strong>Source</strong> <strong>Integrity</strong><br />

removes the development path referenced by the variant sandbox.<br />

Include the -P parameter if your sandbox is not named sandbox.pj.<br />

158 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Cleaning Up Working Files<br />

For example, if you create a variant sandbox with the pj sandbox<br />

command<br />

pj sandbox -Pmyproj.pj -N mydevpath -k 1.3<br />

you can remove the development path mydevpath by issuing the<br />

command<br />

pj delvariant -N mydevpath<br />

from the master project (myproj.pj) directory, or<br />

pj delvariant<br />

from the directory of the new sandbox.<br />

Cleaning Up Working Files<br />

For a detailed description, see<br />

the online reference for the pj<br />

clean command.<br />

Note This command makes your variant sandbox invalid. It does not<br />

remove the sandbox files or copies of member files—they may still be<br />

read-only, and may therefore need to be chmod’ed or attrib’ed before<br />

you can delete them.<br />

<strong>The</strong> pj clean command compares the most recent revision of a file to<br />

its working file and deletes the working file if it has not changed<br />

since it was checked out. To clean up unused working files in an<br />

archive, use rcsclean.<br />

<strong>The</strong> syntax for pj clean is<br />

pj clean file…<br />

where file is one or more files to be examined.<br />

<strong>Source</strong> <strong>Integrity</strong> normally makes a working file writable when you<br />

have a lock on the revision it was generated from. If pj clean finds<br />

the working file is read-only, it assumes you do not have a lock on the<br />

revision, and so removes the working file if it has not changed. If you<br />

had explicitly locked the revision (using pj lock or rcs -l), pj clean<br />

does not clear this lock.<br />

Note This functionality is available only in the command line interface.<br />

<strong>User</strong> <strong>Guide</strong> 159


Managing Projects and Sandboxes<br />

Encrypting Files<br />

Automatic<br />

Encryption<br />

Explicit<br />

Encryption<br />

<strong>Source</strong> <strong>Integrity</strong> can encrypt archives to supplement security. When<br />

an archive is encrypted, <strong>Source</strong> <strong>Integrity</strong> requires you to supply a<br />

encryption key before performing any operation on the archive.<br />

Note <strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface does not support encryption. If<br />

archives are to be used by both the <strong>Source</strong> <strong>Integrity</strong> Web Interface and<br />

either <strong>Source</strong> <strong>Integrity</strong>’s Windows or command line interfaces, you<br />

should not use encryption. In this case, you can use a third-party<br />

encryption scheme. For the implications of this, see “Encryption and<br />

Other Applications” on page 162.<br />

You can automatically encrypt all newly created archives by setting<br />

the Encrypt option in SAM or a Personal Configuration file.<br />

Note Existing archives (that is, those created before the Encrypt option<br />

was set) are not affected.<br />

In the Windows interface, you can encrypt new archives when you<br />

create them by selecting the Encrypted option in the Create Archive<br />

dialog box.<br />

You can also encrypt existing archives by selecting the Encrypted<br />

option in the Archive Information dialog box.<br />

<strong>The</strong> -Z[key] option to the ci, pj ci, and rcs commands modifies an<br />

archive so all existing and/or subsequent revisions are encrypted. Its<br />

syntax is<br />

ci -Z[key] file…<br />

rcs -Z[key] file…<br />

pj ci -Z[key] file…<br />

where key is the encryption key for one or more archives named in<br />

file. If key is omitted, <strong>Source</strong> <strong>Integrity</strong> prompts you to supply an<br />

encryption key.<br />

For example, the command<br />

ci -Zpuck prog.c<br />

160 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Choosing an<br />

Encryption Key<br />

Encrypting Files<br />

checks in a new revision to prog.c and encrypts the archive, using<br />

the encryption key “puck”.<br />

Likewise, the command<br />

rcs -Zpuck prog.c<br />

encrypts prog.c using the same encryption key. Once an archive is<br />

encrypted, you are required to supply the encryption key to perform<br />

any operation that reads from or writes to the archive, such as a check<br />

in or check out.<br />

You can permanently decrypt an encrypted archive with the -z[key]<br />

option to the rcs command.<br />

For example, the command<br />

rcs -zpuck prog.c<br />

decrypts prog.c. If key is omitted, <strong>Source</strong> <strong>Integrity</strong> prompts you for<br />

the encryption key.<br />

When you run a <strong>Source</strong> <strong>Integrity</strong> command on an encrypted archive,<br />

<strong>Source</strong> <strong>Integrity</strong> asks you to provide its encryption key, which is used<br />

to encrypt and decrypt the file.<br />

<strong>The</strong> encryption key can be up to eight characters long; it may contain<br />

any alphanumeric character, but no spaces. <strong>The</strong> case of characters in<br />

an encryption key is significant.<br />

<strong>The</strong> first time you specify an encryption key you are asked to enter it<br />

twice, to ensure that the entry is correct. <strong>The</strong> two entries must be<br />

identical for the encryption key to be accepted.<br />

Here are some tips for choosing an encryption key:<br />

Choose a key that is at least six characters long.<br />

Do not use a common word or acronym.<br />

Replacing selected letters in a common word with digits<br />

discourages dictionary-based attacks.<br />

<strong>User</strong> <strong>Guide</strong> 161


Managing Projects and Sandboxes<br />

Changing the<br />

Encryption Key<br />

Working With<br />

Encryption<br />

For more information on file<br />

lists, see “File Name<br />

Arguments” on page 63.<br />

Encryption and<br />

Other<br />

Applications<br />

Mix uppercase and lowercase characters with punctuation.<br />

To make the key easier to remember, you can base it on a<br />

mnemonic phrase.<br />

Caution Do not forget your encryption key! If you forget it, the<br />

contents of the archive are as good as lost. Furthermore, there is no way<br />

to determine an archive’s encryption key, since it is not stored in the<br />

archive.<br />

You change an archive’s encryption key by decrypting the archive,<br />

then encrypting it again, using a different encryption key.<br />

Example<br />

To change the encryption key for the archive prog.c, enter the<br />

command<br />

rcs -zpuck prog.c<br />

to decrypt the archive. Next, enter the command<br />

rcs -Zfeste prog.c<br />

to encrypt the archive with the new encryption key “feste”.<br />

You can use any <strong>Source</strong> <strong>Integrity</strong> command on an encrypted archive;<br />

you must supply its encryption key, however, before you can see its<br />

contents.<br />

If you have a body of existing archives you want to encrypt, use the<br />

-Z option to the rcs command, and a file list containing the names of<br />

all the files.<br />

If you use <strong>Source</strong> <strong>Integrity</strong> with applications that support security<br />

schemes of their own, <strong>MKS</strong> recommends you use <strong>Source</strong> <strong>Integrity</strong>’s<br />

encryption feature rather than those of your applications.<br />

When you check in a file, <strong>Source</strong> <strong>Integrity</strong> determines the differences<br />

between it and the previous revision, then saves only the differences.<br />

In some cases, two revisions will differ by only a single line. If the<br />

files are checked in before encryption, <strong>Source</strong> <strong>Integrity</strong> identifies the<br />

single different line, encrypts that line, and saves only the encrypted<br />

line in the archive.<br />

162 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Encrypting Files<br />

However, if the files are encrypted by another program before check<br />

in, the differences between the file and the previous revision will be<br />

substantial, forcing <strong>Source</strong> <strong>Integrity</strong> to save all the differences and<br />

resulting in a much larger revision.<br />

<strong>User</strong> <strong>Guide</strong> 163


Managing Projects and Sandboxes<br />

164 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Managing Archives<br />

and Revisions<br />

6<br />

While sandboxes and projects allow you to manage and access<br />

project members, the contents of individual member files—and the<br />

history of changes you make to them—are saved in the archives.<br />

<strong>Source</strong> <strong>Integrity</strong> lets you save—and recreate—every stage (or<br />

revision) in the development of every file you use.<br />

When you make changes to a project member and then check it back<br />

in, your changes are automatically added to the member’s archive. If<br />

you ever need to see that version of the file again, just check out the<br />

appropriate revision, and <strong>Source</strong> <strong>Integrity</strong> rebuilds an exact copy for<br />

you. Not only can every file in a project be archived, the project itself<br />

can be archived (checkpointed), allowing you to rebuild the entire<br />

project configuration at any time.<br />

While the archive commands are as safe and easy to use as their<br />

project-oriented counterparts, they do not communicate their<br />

activities to your projects. For example, if you normally access a file<br />

through a Project window, but another developer uses the archive<br />

commands to check out the file, makes changes to it, and checks it<br />

back into the archive, the project is not automatically updated. <strong>MKS</strong><br />

therefore recommends that you usually work through projects and<br />

sandboxes.<br />

<strong>User</strong> <strong>Guide</strong> 165


Managing Archives and Revisions<br />

Opening a Project’s Archive<br />

To open a project’s archive in the Windows interface:<br />

With a Project or Sandbox window active, choose Project > Open<br />

Project Archive.<br />

<strong>The</strong> project’s archive (either the current project or the master project<br />

of the current sandbox) opens and appears in an Archive window.<br />

Opening a Member’s Archive<br />

To open a project’s archive in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

From the Project view, choose Project Commands > Open History View.<br />

To open a member’s archive in the Windows interface:<br />

1. Select an archived member in a Sandbox or Project window.<br />

2. Choose Member > Open Member Archive or press +.<br />

<strong>The</strong> member’s archive appears in an Archive window. <strong>The</strong> title of<br />

the Archive window includes the statement<br />

(from projname)<br />

after the archive file name, where projname is the file name of the<br />

sandbox or project the Open Member Archive command was<br />

invoked from. This lets you know the archive is “project aware”<br />

and will ignore the WorkToArch, ArchivePath, and WorkPath<br />

constructs when checking out to, or checking in from working<br />

files.<br />

166 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Creating Archives<br />

Creating Archives<br />

To open an archive directly without a project or sandbox in the<br />

Windows interface:<br />

1. Choose File > Open Archive, or click .<br />

<strong>The</strong> Open Archive file browser appears.<br />

2. If the archive you want to open is not in the current directory, use<br />

the Drives and Directories boxes to navigate to the proper<br />

location.<br />

3. Select one or more archives (or their corresponding working files)<br />

and press , or click OK.<br />

An Archive window appears for each file.<br />

To open a member’s archive in the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface:<br />

Select the member in the Project or Sandbox view and choose Member<br />

Commands > Open Member View.<br />

Archives are usually created when you create a project or add<br />

members to a project. However, if you need to create an archive<br />

outside the project context, you can do so. Standalone archives (ones<br />

that have no projects associated with them) can be added to projects<br />

at a later time.<br />

Note <strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Web Interface does not support standalone<br />

archives.<br />

To create an archive in the Windows interface:<br />

1. Choose File > Create Archive or click .<br />

<strong>The</strong> Create Archive file browser appears.<br />

<strong>User</strong> <strong>Guide</strong> 167


Managing Archives and Revisions<br />

2. If the file you want to bring under version control is not in the<br />

current directory, navigate to the appropriate directory.<br />

3. Select one or more files you want to create archives for, and click<br />

OK.<br />

<strong>The</strong> Create Archive dialog box appears.<br />

4. Fill in the Create Archive dialog box options as you like, and click<br />

OK to create the new archives.<br />

When creating an archive, you can set a number of options (see<br />

“Archive Settings” on page 169 and “Revision Settings” on page 169)<br />

that determine how the archives are managed, whether an initial<br />

revision should be checked in, and what revision details will be<br />

recorded.<br />

168 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For more information about<br />

SAM permissions, see the<br />

<strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong><br />

<strong>Edition</strong> Administrator <strong>Guide</strong> or<br />

ask your system<br />

administrator.<br />

Creating Archives<br />

<strong>The</strong> availability and functionality of options depends on your SAM<br />

permissions.<br />

Archive Settings<br />

Strict Locking. Selecting this option causes the new archive to use<br />

a strict-locking policy, which forces you to lock a member if you<br />

want to edit it and check it in. This option might be unavailable if<br />

a locking policy is enforced.<br />

Compressed. Selecting this option causes the archive to be saved<br />

in compressed format, which is especially useful if you are<br />

working with large files, or if disk space is at a premium. This<br />

option might be unavailable if a compression policy is enforced.<br />

Data Type. Use this option to set the type of data you will be<br />

storing in the archive. You may select one of three possible data<br />

types:<br />

Binary. A file containing unprintable characters, or lines too<br />

long to be handled by text editors.<br />

Text. A file that is always saved in a format expected by<br />

standard text editors (for example, Notepad or vi).<br />

Auto Detect. <strong>The</strong> default setting, which can be used safely<br />

with any file. <strong>Source</strong> <strong>Integrity</strong> determines the type of the file<br />

and creates an appropriate archive for it.<br />

Encrypted. Selecting this option causes <strong>Source</strong> <strong>Integrity</strong> to<br />

encrypt the archive when it creates it. This option requires an<br />

encryption password.<br />

Caution Do not forget the encryption password! Without it, data in<br />

the archive is unrecoverable. This option might be unavailable if an<br />

encryption policy is enforced.<br />

Archive Description. Enter a free-form description of the archive.<br />

You may include any information you want here.<br />

Open Archive. Selecting this option causes <strong>Source</strong> <strong>Integrity</strong> to<br />

open the new archive in the application window.<br />

Revision Settings<br />

Check In. This option checks in the selected file as the first<br />

revision in the archive. If this option is not set, an empty archive<br />

is created.<br />

<strong>User</strong> <strong>Guide</strong> 169


Managing Archives and Revisions<br />

Locked. This option creates the new archive and immediately<br />

locks the first revision, allowing you to retain control of the first<br />

revision while creating the archive. If this option is not set, the<br />

first revision is checked in unlocked.<br />

Label. Enter unique text that identifies the new revision for the<br />

first revision in the new archive. Labels can be viewed or<br />

modified later.<br />

Number. This is the revision number for the first revision of the<br />

new archive. <strong>The</strong> default is 1.1.<br />

All Files. This option applies the option settings for the current<br />

archive to all subsequent archives, if more than one archive is<br />

being created.<br />

Keep Work File. This option creates the archive, checks in the file,<br />

and immediately checks it out again. If this option is not set, the<br />

working file is deleted when the archive is created.<br />

State. A one-word flag describing the status of the new revision.<br />

Default is “Exp” (for Experimental), or the lowest promotion<br />

state setting, if promotion is turned on.<br />

Author. Identifies the person who creates the new revision. <strong>The</strong><br />

default is the author name specified in your Personal<br />

Configuration, but you can set it to another name.<br />

To create archives in the command line interface:<br />

Check in the first revision with the ci archive command; you do not<br />

have to explicitly create the archive. Its syntax is<br />

ci [options] file…<br />

where file is one or more files archives will be created for.<br />

<strong>The</strong> first time you check in a file, <strong>Source</strong> <strong>Integrity</strong><br />

determines whether it is binary (<strong>Source</strong> <strong>Integrity</strong> considers a file<br />

to be binary if it contains nulls, or lines too long to be handled by<br />

text editors)<br />

creates an archive of the appropriate format (binary or auto)<br />

adds the content of the working file as the first revision<br />

Unlike the pj ci command, the default behavior of the ci archive<br />

command is to delete the original file when it checks it in. This can be<br />

avoided by using the -l or -u options.<br />

170 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Importing Archives<br />

If you use the -l option when creating a new archive, <strong>Source</strong><br />

<strong>Integrity</strong> locks the first revision in your name and leaves a writable<br />

copy of the working file on your disk. With the -u option, the revision<br />

is not locked and a read-only copy of the working file is left.<br />

Example<br />

Importing Archives<br />

For more information, see<br />

“Importing Files” on page 148.<br />

To create a new archive for the prog.c file and retain a writable<br />

working copy of the file, enter<br />

ci -l prog.c<br />

This presents the message<br />

rcs\prog.c ><br />

<strong>The</strong> first line tells you an archive named prog.c will be created in the<br />

rcs directory of the current directory. <strong>The</strong> second line tells you the<br />

first revision will have revision number 1.1 and will be locked in your<br />

name.<br />

<strong>The</strong> rest of the message advises you can enter a description of the<br />

new archive by entering it at the >> prompt. <strong>The</strong> archive description<br />

can be of any length, and should describe the contents and purpose of<br />

the new archive.<br />

When you have entered the first line of the archive description, press<br />

. This presents another >> prompt where you can continue<br />

the description. To end the archive description, enter a single period<br />

at the >> prompt and press .<br />

If you are already using a revision control system such as SCCS or<br />

PVCS and want to move to <strong>Source</strong> <strong>Integrity</strong>, you can import your<br />

existing archives and convert them automatically to <strong>Source</strong> <strong>Integrity</strong><br />

format. Importing files preserves virtually all of the file and revision<br />

information contained in the SCCS or PVCS file format.<br />

You can also convert <strong>Source</strong> Safe archives to <strong>Source</strong> <strong>Integrity</strong> format.<br />

For more information, see the <strong>Source</strong> Safe to <strong>Source</strong> <strong>Integrity</strong><br />

conversion documentation on your CD-ROM.<br />

<strong>User</strong> <strong>Guide</strong> 171


Managing Archives and Revisions<br />

Checking Out Revisions From Archives<br />

When a revision is checked out from a sandbox or project, the<br />

location of the working file is determined at the project level. When<br />

you check out a revision directly from an archive, however, the<br />

location of the working file is calculated from the WorkToArch, or<br />

Archive Path and WorkPath settings.<br />

To check a revision out of an archive in the Windows interface:<br />

Use the Archive > Check Out command. You can specify the same<br />

check-out options that are available when you check out a member<br />

from a project (see “Checking Out a Member” on page 81).<br />

To check a revision out of an archive using the command line<br />

interface:<br />

Use the co command. Its syntax is<br />

co [options…] [-Pprojname] file…<br />

where options is zero or more modifying options (see the <strong>Source</strong><br />

<strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong> Reference <strong>Guide</strong> or the online man pages),<br />

-Pprojname is the name of the <strong>Source</strong> <strong>Integrity</strong> project file is a member<br />

of, and file is one or more files to check out. Named files may contain<br />

any level of path qualification.<br />

If the file being checked out is a member of a <strong>Source</strong> <strong>Integrity</strong> project,<br />

the -Pprojname option uses project file mapping information to locate<br />

archives. Whenever possible, use pj co when dealing with members<br />

of a project or sandbox.<br />

A revision can be checked out in one of two modes: locked or<br />

unlocked. If you intend to make changes to the revision, you should<br />

use the -l option to check it out locked; if you plan only to view or<br />

process the revision (for example, to build a software release), simply<br />

use co without the lock option.<br />

A revision that is checked out unlocked is copied to a read-only<br />

working file if a strict locking policy is in effect for the archive. In<br />

addition, with a strict locking policy, <strong>Source</strong> <strong>Integrity</strong> only lets you<br />

check in a file if it was first checked out locked.<br />

When strict locking is not in effect, check-in operations are<br />

unrestricted, provided no one else has a lock on the revision.<br />

For example, the command<br />

co prog.c<br />

172 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Checking Out<br />

by Revision<br />

Number or<br />

Label<br />

displays the message<br />

Checking Out Revisions From Archives<br />

rcs\prog.c --> prog.c<br />

revision: 1.4<br />

done<br />

<strong>The</strong> first line of the message tells you a revision was checked out of<br />

the prog.c archive (in the rcs directory of the current directory), and<br />

was copied to a working file named prog.c in the current directory.<br />

<strong>The</strong> second and third lines indicate the number of the revision that<br />

was checked out (that is, revision 1.4), and that the operation<br />

completed successfully.<br />

If you use the command<br />

co -l prog.c<br />

the second line of the message reads<br />

revision: 1.4 (locked)<br />

indicating the revision was checked out locked. When you check out<br />

a revision locked, <strong>Source</strong> <strong>Integrity</strong> copies it to an editable working<br />

file.<br />

By default, the co command checks out the head revision from an<br />

archive. <strong>The</strong> head revision is the most recent revision along the main<br />

development path of an archive. If you want to check out an earlier<br />

revision, use the -rrev option to the co command. Its syntax is<br />

co -rrev [-Pprojname] file…<br />

where rev is the revision number or label of the revision you want to<br />

check out.<br />

For example, to check out and lock the first revision in the prog.c<br />

archive, you would use the command<br />

co -r1.1 -l prog.c<br />

To check out the revision labeled “Release_1”, you would enter<br />

co -rRelease_1 -l prog.c<br />

Note If the revision number you specify is not found in the archive,<br />

<strong>Source</strong> <strong>Integrity</strong> checks out the revision whose revision number is closest<br />

to—and lower than—the number you supply.<br />

<strong>User</strong> <strong>Guide</strong> 173


Managing Archives and Revisions<br />

Checking Out<br />

by State Setting<br />

You can check out a particular revision by its state setting. You do this<br />

with the -sstate option to the co command. Its syntax is<br />

co [options] [-sstate] file<br />

where state is the state setting of a revision in the archive.<br />

Because state settings may not be unique within the archive, <strong>Source</strong><br />

<strong>Integrity</strong> scans the archive and checks out the revision closest to the<br />

default revision with this state setting.<br />

For example, to check out the most recent revision of prog.c with the<br />

state setting “proposed” you would enter<br />

co -sproposed prog.c<br />

Checking In Revisions to Archives<br />

When you are finished making changes to a working file that you<br />

checked out directly from the archive, you can archive the changed<br />

file as a new revision. If <strong>Source</strong> <strong>Integrity</strong> cannot find an archive for<br />

the file, it creates a new archive and adds the file as the first revision.<br />

To check a revision into an archive in the Windows interface:<br />

Use the Archive > Check In command. You can specify the same<br />

check-in options that are available when you check a member into a<br />

project (see “Checking In a Member” on page 87).<br />

To check a revision into an archive using the command line<br />

interface:<br />

Use the ci command. Its syntax is<br />

ci [options] [-Pprojname] file…<br />

where options is zero or more modifying options (see the <strong>Source</strong><br />

<strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong> Reference <strong>Guide</strong> or the online man pages),<br />

projname is the name of the <strong>Source</strong> <strong>Integrity</strong> project file belongs to, and<br />

file is one or more files to check in. Named files may contain any level<br />

of path qualification.<br />

If the file being checked in is a member of a <strong>Source</strong> <strong>Integrity</strong> project,<br />

the -Pprojname option updates the project in a manner similar to the<br />

pj ci command. Whenever possible, use pj ci to check in members<br />

of a project or sandbox.<br />

174 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Checking In—<br />

Setting Labels<br />

Checking In Revisions to Archives<br />

For example, to check in and lock a file named prog.c, which is also a<br />

member of a project in the current directory, you would enter<br />

ci -l -Pproject.pj prog.c<br />

This presents the message<br />

rcs\prog.c ><br />

<strong>The</strong> message reports the revision numbers of both the new revision<br />

and the previous revision.<br />

<strong>Source</strong> <strong>Integrity</strong> asks you to enter a description for the new revision.<br />

<strong>The</strong> revision description allows you to provide a record of changes as<br />

you make them and to explain why they were made.<br />

You add the revision description by entering it at the >> prompt and<br />

pressing . This presents another >> prompt. Repeat the<br />

process to enter as many lines of description as you choose.<br />

When you have completed the revision description, enter a single<br />

period at the >> prompt, and press .<br />

<strong>The</strong> -l option<br />

leaves a writable copy of the working file<br />

locks the revision in your name, so you can continue to make<br />

changes to it, but other users cannot<br />

You should use the -u option if you do not intend to edit the file<br />

immediately; this leaves a read-only copy of the file available. If<br />

neither option is used, <strong>Source</strong> <strong>Integrity</strong> checks in and immediately<br />

deletes the working file.<br />

For example, to check in prog.c and assign revision number 2.0 to<br />

the new revision, use the command<br />

ci -r2.0 prog.c<br />

You can set a label at check-in with the -N option to the ci command,<br />

or at any other time with the -N option to the rcs command.<br />

<strong>The</strong> -Nlabel option removes label from the revision it is currently<br />

attached to, and assigns it to the new revision being checked in. This<br />

operation has no other impact on the original revision.<br />

<strong>User</strong> <strong>Guide</strong> 175


Managing Archives and Revisions<br />

Checking In—<br />

State Settings<br />

For more information on this<br />

more structured use of state<br />

settings, consult the States<br />

configuration option and the<br />

Promote and Demote SAM<br />

permissions.<br />

For example, the following command reassigns the label “Revised” to<br />

the revision being checked in to prog.c archive.<br />

ci -u -NRevised prog.c<br />

To reassign a label from one existing revision to another in an archive,<br />

use the rcs command. To reassign the label “Revised” from another<br />

revision of prog.c to revision 1.1 of the same file, enter the command<br />

rcs -NRevised:1.1 prog.c<br />

At check-in time, state settings are added with the -sstate option to<br />

the ci command, where state is the state setting for the new revision.<br />

State settings can also be used to establish and enforce promotion<br />

policies at your site.<br />

For example, the command<br />

ci -sReview prog.c<br />

checks in prog.c and sets the state of the new revision to “Review”.<br />

Viewing and Editing Archive Information<br />

Just as it maintains metadata about each project member, <strong>Source</strong><br />

<strong>Integrity</strong> also maintains extra information about each archive, called<br />

archive information.<br />

In the Windows interface, you can view and edit information about<br />

an archive using the Archive > Archive Information command. Unlike<br />

most <strong>Source</strong> <strong>Integrity</strong> commands, which can be accessed from<br />

sandboxes and projects, this command is available only when an<br />

Archive window is active.<br />

To see an archive’s information:<br />

1. With an Archive window active, choose Archive > Archive<br />

Information, or click .<br />

<strong>The</strong> Archive Information dialog box appears.<br />

176 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


2. View or make changes to the archive information.<br />

Viewing and Editing Archive Information<br />

3. Click OK to save your changes, or Cancel to close the dialog box<br />

without making changes.<br />

You can view, but not change, the following archive information:<br />

Working File. <strong>The</strong> fully qualified name of the working file<br />

associated with the archive.<br />

Archive File. <strong>The</strong> fully qualified file name of the archive whose<br />

information is displayed.<br />

Labels. A listing of all revision labels in the archive and their<br />

associated revision numbers.<br />

Locks. A list of all users who have locks on revisions in the<br />

archive, the revisions they have locked, and the lock time.<br />

Projects. A list of all projects which use this archive as a member<br />

archive.<br />

You can edit the following options:<br />

Strict Locking. Selecting this option turns on strict locking for the<br />

archive.<br />

Compressed. Selecting this option causes the archive to be<br />

compressed.<br />

<strong>User</strong> <strong>Guide</strong> 177


Managing Archives and Revisions<br />

Encrypted. Selecting this option encrypts the archive. If you do<br />

so, when you click OK to leave the Archive Information dialog box,<br />

another box prompts you for an encryption password.<br />

Caution Do not forget the encryption password! Without it, data in<br />

the archive is unrecoverable.<br />

Data Type. Select the type of data stored in the archive. For a list<br />

of data types, see “Creating Archives” on page 167.<br />

Default Branch. Select the starting point of the default branch.<br />

Archive Description. Select text that describes the archive.<br />

Store By Reference. Selecting this option causes each revision to<br />

be saved to a separate file, instead of saving the entire archive to<br />

one file. This feature improves performance for archives that<br />

contain large binary files.<br />

Viewing and Editing Revision Information<br />

<strong>Source</strong> <strong>Integrity</strong> maintains detailed information for each revision in<br />

an archive. In the Windows interface, this revision information is<br />

displayed in columns in the Archive window. It can also be viewed<br />

and modified with the Revision Information command.<br />

To view and edit revision information in the Windows interface:<br />

1. Select a revision in the Archive window.<br />

2. Choose Archive > Revision Information, or click .<br />

<strong>The</strong> Revision Information dialog box appears.<br />

178 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Viewing and Editing Revision Information<br />

3. View or make changes to the archive information.<br />

4. Click OK to accept your changes, or Cancel to close the dialog box<br />

without making changes.<br />

Any changes you make are reflected in the Archive window.<br />

You can view, but not change, the following revision information:<br />

Revision. <strong>The</strong> revision number of the selected revision.<br />

Date. <strong>The</strong> revision timestamp.<br />

Author. <strong>The</strong> name of the user who checked in the revision.<br />

Locker. If the revision is locked, the name of the user who owns<br />

the lock appears here, as well as the date and time locked.<br />

You can edit the following options:<br />

State. <strong>The</strong> revision’s state appears here. You can assign a state to<br />

any revision, indicating the status of its content.<br />

Label. A list of labels assigned to the revision. When you check in<br />

a revision you have the option of assigning it a revision label.<br />

Labels allow you to describe a revision more fully than the<br />

revision number alone can do. Although revisions in the same<br />

archive cannot have identical labels, labels can be used to crossreference<br />

revisions in different archives.<br />

Revision Description. When you check in a revision, you can enter<br />

a free-form description of its purpose and function. This<br />

description can be used to provide context for the changes made<br />

to a file and is especially helpful in multi-user projects. You can<br />

append new comments onto a revision description. <strong>The</strong> date and<br />

user name are also included.<br />

<strong>User</strong> <strong>Guide</strong> 179


Managing Archives and Revisions<br />

For more information on<br />

using active issues, see<br />

“Integrated Version Control”<br />

on page 437.<br />

Viewing<br />

Revision<br />

Metadata With<br />

Archive<br />

Commands<br />

Active CI Issue. An active issue associated with the member<br />

revision. Active issues appear as hyperlinks with a brief<br />

description. To view the complete issue in the Change <strong>Integrity</strong><br />

Web interface, click on the hyperlink.<br />

You can view archive and revision metadata with the rlog command<br />

(there is an similar project command, pj rlog). Its syntax is<br />

rlog [options] file…<br />

where options is zero or more modifying arguments, and file is the<br />

name of one or more files whose metadata you want to see. <strong>The</strong> file<br />

entry may point to either working files or archives.<br />

When it is run with no options, the rlog command shows you all the<br />

archive and revision information contained in an archive.<br />

You can choose to view only archive related metadata by specifying<br />

the -t or -h options to the rlog command. <strong>Source</strong> <strong>Integrity</strong> can<br />

display the following pieces of information about each archive:<br />

name of the archive<br />

name of the associated working file<br />

revision number of the head revision<br />

number of the default branch (if defined)<br />

archive’s locking policy (strict or non-strict)<br />

names of users with locks on revisions<br />

names of users on the archive’s access list<br />

any labels assigned to revisions in the archive<br />

comment leader symbol<br />

total number of branches in the archive<br />

total number of revisions in the archive<br />

total number of branch revisions<br />

archive’s file format (text or binary)<br />

archive’s delta storage format (RCS or Reference)<br />

archive description<br />

Example<br />

For example, to see all the metadata about the prog.c archive and the<br />

revisions it contains, you would enter<br />

rlog prog.c<br />

180 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Viewing and Editing Revision Information<br />

<strong>The</strong> information displayed by this command would look something<br />

like the following (some text is wrapped):<br />

Archive file: C:/dev/prog\rcs\prog.c;<br />

Working file: C:/dev/prog/stories.txt<br />

head: 1.2<br />

branch:<br />

locks: SIUSER: 1.2; strict<br />

access list:<br />

symbolic names: Dev_1: 1.2;<br />

comment leader:<br />

total revisions: 2; branches: 0; branch revisions: 0<br />

file format: text<br />

revision storage: RCS reverse deltas<br />

project: C:/dev/prog/project.pj;<br />

description:<br />

This archive contains the routines for the product<br />

demo.<br />

--------------------------revision<br />

1.2 locked by: SIUSER;<br />

date: 1998/06/09 18:38:44; author: SIUSER; state: Exp;<br />

lines: +4 -0<br />

Added some features<br />

--------------------------revision<br />

1.1<br />

date: 1998/06/09 15:31:01; author: SIUSER; state: Exp;<br />

Initial revision<br />

--------------------------selected<br />

revisions: 2<br />

====================================================<br />

<strong>The</strong> first fourteen lines show the archive information, including the<br />

names of anyone who holds a lock on a revision, any labels in use,<br />

and the archive description.<br />

<strong>The</strong> remainder of the message shows metadata for each revision in<br />

the archive, including its timestamp, state, locker, and revision<br />

description. <strong>The</strong> information for each revision is separated by lines of<br />

dashes to make them easier to read.<br />

<strong>The</strong> last line of the rlog message shows the total number of revisions<br />

about which information was displayed (in this case, all of them).<br />

To see only the archive information for the prog.c archive, use the -t<br />

option with rlog.<br />

<strong>The</strong> -h option presents an abbreviated version of the archive<br />

information, leaving out the archive description.<br />

<strong>User</strong> <strong>Guide</strong> 181


Managing Archives and Revisions<br />

Locked<br />

Revisions<br />

<strong>The</strong> -H option restricts rlog output to information about the head<br />

revision of an archive.<br />

<strong>The</strong> -T option restricts rlog output to one line with basic information<br />

about the archive.<br />

For example, the command<br />

rlog -HT prog.c<br />

returns the message<br />

C:/dev/prog/prog.c 1.4 1995/05/29 10:46:40 SIUSER<br />

Release_1<br />

To determine which archives are currently undergoing change, you<br />

can look for those archives that contain locked revisions. This is<br />

accomplished with the -L[locker1[,locker2]] option to the rlog<br />

command.<br />

<strong>The</strong> -L option can be used alone, or modified with the names of one<br />

or more users. If it is used without user names, it presents archive and<br />

revision information for only those archives that contain locked<br />

revisions.<br />

For example, if you run the command<br />

rlog -L *<br />

rlog shows archive and revision information for every archive that<br />

contains one or more locked revisions. It produces the same long<br />

output displayed by rlog with no options.<br />

If one or more user names are specified with the -L option, rlog<br />

presents information for only those archives with revisions locked by<br />

the named users.<br />

For example<br />

rlog -Lsiuser *<br />

shows information for only those archives “Siuser” holds a lock in.<br />

Note <strong>The</strong> information returned by rlog can be abbreviated by including<br />

the -T option: rlog -TLsiuser *<br />

182 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Assigning Labels to Revisions<br />

Assigning Labels to Revisions<br />

Labels are unique text that describe and refer to a revision in an<br />

archive. Labels can be based on the product release the revision was<br />

included in, on the content of the revision, on changes made to the<br />

revision, or any other sort of information that would be useful in<br />

identifying that particular revision.<br />

Although you generally assign a label to a new revision upon check<br />

in, there may be times when you want to add an additional label, or<br />

change the label assigned to a revision.<br />

To view, add, change, or delete a revision’s label (or view or<br />

change a revision’s state) in the Windows interface:<br />

Use the Revision Information dialog box, as described in “Viewing<br />

and Editing Revision Information” on page 178.<br />

To add a label to a revision in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. Switch to the Member view for the selected member.<br />

2. Select the revision you want to add a label to, and select Add<br />

Label from the list of available commands.<br />

To delete a revision’s label in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. Switch to the Member view for the selected member.<br />

2. Select the revision with the label you want to delete, and select<br />

Delete Label from the list of available commands.<br />

To add a label to a revision in the command line interface:<br />

Use the -nlabel[:rev] option to the rcs command. Its syntax is<br />

rcs [options] [-nlabel[:rev]] [-P[projname]] file…<br />

where label is a unique revision label to assign to revision rev of file,<br />

and where rev is number of the revision label will be assigned to. If<br />

:rev is omitted, label is deleted from the archive of file.<br />

If label is already associated with another revision in the archive, rcs<br />

returns an error.<br />

For example, to add the label “Release_1” to revision 1.3 of the<br />

prog.c archive, you would enter<br />

rcs -nRelease_1:1.3 prog.c<br />

<strong>User</strong> <strong>Guide</strong> 183


Managing Archives and Revisions<br />

When the revision is updated with the new label, the rcs command<br />

displays the message<br />

done<br />

To assign a revision label to the head revision, simply specify the<br />

revision label followed by a colon (omitting the revision number).<br />

rcs -nRelease_1: prog.c<br />

To add a label that contains a space, place quotation marks around<br />

the label text.<br />

rcs -n “Release 1.x”:1.4 prog.c<br />

To delete a label from a revision in the command line interface:<br />

Use the -n option to the rcs command.<br />

For example, to delete the label “working” from the betting.c<br />

archive in the project.pj project, enter<br />

rcs -Pproject.pj -nworking betting.c<br />

Viewing and Editing the Working File or<br />

Revision<br />

When an Archive window is open in the Windows interface, you can<br />

view the contents of the working file or any revision in the list by<br />

double clicking it, or by selecting it and choosing the View Revision or<br />

View/Edit Working File command from the Archive or context menu, or<br />

from the toolbar.<br />

When the Archive window selector bar is over the working<br />

file, the View Revision command in the Archive menu changes<br />

to Edit Working File (or View Working File if it is read-only).<br />

To display a file or revision, the View Revision command launches<br />

your default editor and loads the working file or revision. <strong>The</strong> editor<br />

that gets launched depends on your Personal Configuration.<br />

Although it can be used to show the contents of any revision in an<br />

archive, this command is best used with the working file, since it<br />

provides a mechanism to open and edit the file without leaving the<br />

<strong>Source</strong> <strong>Integrity</strong> application environment.<br />

184 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Promoting and Demoting a Revision<br />

When you view a revision, <strong>Source</strong> <strong>Integrity</strong> copies the revision to a<br />

read-only temporary file and opens it for you.<br />

Note <strong>The</strong> temporary file is not the revision. If you make changes to the<br />

file and want to save it, you must give it a new file name since the<br />

original revision is read-only.<br />

To view a working file in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

Select the working file from the Sandbox view and choose Member<br />

Commands > View.<br />

To view a revision in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

Select the revision in the Member view and choose Commands > View.<br />

Promoting and Demoting a Revision<br />

If promotion is turned on, you can promote a revision to the next<br />

state of development or demote it to a lower state.<br />

In the Windows interface, if you select more than one member and<br />

promote or demote them, the state change is based on the first<br />

selected member. If the selected members are at different states from<br />

the first member, all members are brought to the new state.<br />

To promote a revision in the Windows interface:<br />

1. Select a revision in the Archive window.<br />

2. Choose Archive > Promote Revision.<br />

<strong>The</strong> Promote Revision dialog box appears.<br />

3. Select a new promotion state from the Promote to state dropdown<br />

list.<br />

<strong>User</strong> <strong>Guide</strong> 185


Managing Archives and Revisions<br />

4. Click OK to accept the new promotion state.<br />

To close the dialog box without changing the revision’s state,<br />

click Cancel.<br />

To demote a revision in the Windows interface:<br />

1. Select a revision in the Archive window.<br />

2. Choose Archive > Demote Revision.<br />

<strong>The</strong> Demote Revision dialog box appears.<br />

3. Select a new promotion state from the Demote to state drop-down<br />

list.<br />

4. Click OK to accept the new promotion state.<br />

To close the dialog box without changing the revision’s state,<br />

click Cancel.<br />

To promote or demote a revision in the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface:<br />

Select a revision from the Member view and choose Promote or<br />

Demote.<br />

To promote or demote a revision in the command line interface:<br />

Use the rcs command with the -s option. Its syntax is<br />

rcs -sstate[:rev]<br />

where rev is the revision number and state is the state. If rev is a<br />

branch number, the latest revision on that branch is assumed. If rev is<br />

omitted, the latest revision on the default branch is assumed.<br />

186 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Locking Revisions<br />

Unlocking Revisions<br />

Locking Revisions<br />

Revisions are normally locked at check-out time, but you can lock a<br />

revision without checking it out of the archive. Locking a revision<br />

ensures you alone are allowed to modify the revision.<br />

To lock a revision in the Windows interface:<br />

1. Select a revision in the Archive window.<br />

2. Choose Archive > Lock Revision.<br />

A padlock symbol ( ) appears next to the revision number to<br />

inform you the revision is locked, and your user name appears in<br />

the Locker column.<br />

To lock a revision in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

Select it in the Sandbox or Member view and choose Lock.<br />

To lock a revision in the command line interface:<br />

Use the rcs command with the -l option. Its syntax is<br />

rcs -l[rev]<br />

where rev is the revision number. If a branch is given, the latest<br />

revision on that branch is locked. If rev is omitted, the latest revision<br />

on the default branch is locked. Locking prevents overlapping<br />

changes.<br />

You can also unlock a revision without checking it back into the<br />

archive, but you will lose any changes you have made to the locked<br />

revision.<br />

If you attempt to unlock a revision that is locked by another user, a<br />

message warns you that you are about to break someone else’s lock.<br />

Breaking another user’s lock on a system that is enabled with<br />

<strong>User</strong> <strong>Guide</strong> 187


Managing Archives and Revisions<br />

Microsoft’s Messaging Application Program Interface results in a<br />

mail notification dialog box that lets you send email to the user<br />

whose lock you are breaking.<br />

Note Although you may not be prohibited from breaking some else’s<br />

lock, you should be cautious about doing so, since it can result in<br />

confusion and duplication of effort in shared working environments. For<br />

information on permissions, see “Security and Administration” on<br />

page 34.<br />

To unlock a revision in the Windows interface:<br />

1. Select a locked revision in the Archive window, one that has a<br />

padlock symbol ( ).<br />

2. Choose Archive > Unlock Revision or click .<br />

<strong>The</strong> padlock symbol and the name of the user who had the<br />

revision locked both disappear.<br />

To unlock a revision in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

Select a locked revision in the Member, Sandbox, or Project views and<br />

choose Unlock.<br />

To unlock a revision in the command line interface:<br />

Use the rcs command with the -u option. Its syntax is<br />

rcs -u[rev]<br />

where rev is the revision number. If a branch is given, the latest<br />

revision on that branch is unlocked. If rev is omitted, any revision<br />

locked by the user is unlocked. If no such revision exists, the most<br />

recent lock that has been set is removed, if there is one.<br />

188 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Deleting Revisions<br />

Deleting Revisions<br />

If you know you will not use a revision again, you can delete it.<br />

Caution Only delete a revision when you are absolutely certain you<br />

will never need it again. Once you delete a revision, it cannot be<br />

retrieved. A revision cannot be deleted if it locked or the starting point<br />

(root) of a branch. You should never delete the head revision of an<br />

archive.<br />

To delete a revision in the Windows interface:<br />

1. In the Archive window, select one or more revisions that you<br />

want to delete.<br />

2. Choose Archive > Delete Revision.<br />

A message box asks you to confirm the deletion.<br />

3. To remove the selected revision(s), click Yes or Yes to All.<br />

<strong>Source</strong> <strong>Integrity</strong> removes the revision(s) from the archive and<br />

updates the Archive window to show the revision(s) have been<br />

deleted from the archive.<br />

To remove the message box without deleting any revisions, click<br />

No or No to All.<br />

To delete a revision in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

Select the revision in the Member view and choose the Delete<br />

command.<br />

To delete a revision in the command line interface:<br />

Use -o option to the rcs command. Its syntax is<br />

rcs -o[range] file…<br />

where range specifies the revisions to be deleted, and file is one or<br />

more archives. <strong>The</strong> range modifier can take one of four forms:<br />

rev is the number of the revision to delete. For example, to delete<br />

revision 1.2 in the archive prog.c, enter<br />

rcs -o1.2 prog.c<br />

<strong>User</strong> <strong>Guide</strong> 189


Managing Archives and Revisions<br />

Comparing Revisions<br />

rev1-rev2 deletes all revisions from revision number rev1 to<br />

revision number rev2, inclusive, provided they are all on the same<br />

branch. For example<br />

rcs -o1.2-1.4 prog.c<br />

deletes revisions 1.2, 1.3 and 1.4 in the archive prog.c.<br />

rev1- deletes all revisions from rev1 to the end of the branch. If the<br />

tip revision of the branch is 1.2.1.3, the command<br />

rcs -o1.2.1.2- prog.c<br />

deletes revisions 1.2.1.2 and 1.2.1.3 in the archive prog.c.<br />

-rev2 deletes all revisions from the beginning of the branch<br />

containing rev2, up to and including revision number rev2. For<br />

example<br />

rcs -o-1.2.1.3 prog.c<br />

deletes revisions 1.2.1.1, 1.2.1.2 and 1.2.1.3 in the archive prog.c.<br />

When you are working with an evolving body of source files, you<br />

must be able to compare two files to see exactly how one differs from<br />

another. This can become necessary when you are developing on a<br />

branch or new development path, or when two people are working<br />

independently on the same problem.<br />

With <strong>Source</strong> <strong>Integrity</strong> you can compare<br />

any two text-based revisions in an archive<br />

a text-based revision and its associated working file in a sandbox,<br />

project, or archive<br />

any two text files<br />

<strong>The</strong> commands discussed in this section use the Visual Difference<br />

utility, which calculates the differences between files or revisions and<br />

displays them side by side in their own window, along with a<br />

summary of the differences between them. Using the Visual<br />

Difference utility, you can also interactively merge two files or<br />

revisions.<br />

Unlike most features of <strong>Source</strong> <strong>Integrity</strong>, the Visual Difference utility<br />

is not presented in the application window, but is a standalone<br />

Windows application that compares and merges files and revisions.<br />

190 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


To compare two revisions in the Windows interface:<br />

Comparing Revisions<br />

1. Select two revisions, or a revision and the working file from an<br />

Archive window. To select two revisions, select the first revision<br />

as usual, then hold down the key and click a second<br />

revision.<br />

2. Choose Archive > Differences > Compare, or click .<br />

<strong>The</strong> Visual Difference utility appears. Both revisions and a<br />

summary of the differences between them are shown in the<br />

Visual Difference window.<br />

To compare two revisions in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

In the Member view, select two revisions and choose Compare Two<br />

Revisions.<br />

To compare two revisions in the command line interface:<br />

Use the rcsdiff command. See the <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong><br />

<strong>Edition</strong> Reference <strong>Guide</strong> or the online command reference for the full<br />

syntax.<br />

<strong>User</strong> <strong>Guide</strong> 191


Managing Archives and Revisions<br />

Merging Revisions<br />

You can also use the Visual Difference utility to merge two revisions.<br />

To merge two revisions in the Windows interface:<br />

1. Select two revisions, or a revision and the working file from an<br />

Archive window. To select two revisions, select the first revision<br />

as usual, then hold down the key and click a second<br />

revision.<br />

2. Choose Archive > Differences > Merge, or click .<br />

<strong>The</strong> Visual Difference utility appears. Both revisions and a<br />

summary of the differences between them are shown in the<br />

Visual Difference window.<br />

To merge two revisions in the <strong>Source</strong> <strong>Integrity</strong> Web Interface:<br />

1. Switch to the Sandbox view (if you are not already there).<br />

A delta symbol appears next to the member revision in the<br />

Sandbox, signaling that the revision in your Sandbox does not<br />

match the member revision in the Project (because you checked<br />

out a previous revision and therefore made it the current revision<br />

in your Sandbox).<br />

2. Select Merge from the list of available commands.<br />

<strong>The</strong> Merge Working File dialog box appears, displaying the name<br />

of the current member, and the full path of the sandbox it is a<br />

member of.<br />

3. Confirm that you want to merge the working file with the<br />

member revision by clicking Yes in the Merge Working File dialog<br />

box.<br />

<strong>Source</strong> <strong>Integrity</strong> Web Interface invokes the Visual Difference<br />

utility to display the differences between the two working files<br />

side-by-side.<br />

In both the Windows interface and <strong>Source</strong> <strong>Integrity</strong> Web Interface, a<br />

working file delta now appears next to the revision in the Sandbox<br />

view, signaling that the working file has changed as a result of the<br />

merge. To preserve these changes, check them in as a new revision in<br />

the member’s archive.<br />

192 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Logging Archive Transactions<br />

To merge two revisions in the command line interface:<br />

Use the rcsmerge command. See the <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong><br />

<strong>Edition</strong> Reference <strong>Guide</strong> or the online command reference for the full<br />

syntax.<br />

Logging Archive Transactions<br />

For information about logging<br />

project transactions, see<br />

“Logging Project<br />

Transactions” on page 142.<br />

<strong>Source</strong> <strong>Integrity</strong> keeps track of the transactions it performs upon<br />

archives, as long as you have a log file named in the SAM database<br />

or your personal configuration.<br />

Most sites turn it on within SAM to ensure standard logging<br />

procedures are applied site wide. By default, logging is turned off. To<br />

have it turned on site wide, contact your SAM administrator.<br />

This archive transaction log includes contains a record of all check-in<br />

and check-out (locked) operations on revisions of archives.<br />

Note This functionality is not available in the <strong>Source</strong> <strong>Integrity</strong> Web<br />

Interface.<br />

To enable logging locally in the Windows interface:<br />

1. Choose Configuration > Personal and click the Logging tab.<br />

2. Select the Enable Logging checkbox.<br />

3. Enter the name of the log file in the Filename box. <strong>The</strong> name can<br />

be fully qualified or relative to the current directory. Using a fully<br />

qualified, absolute file name ensures only one log file is created to<br />

log <strong>Source</strong> <strong>Integrity</strong> operations.<br />

4. Click OK to accept these settings, or Cancel to close the dialog box<br />

without making any changes.<br />

To enable logging locally in the command line interface:<br />

Use the pj set command as follows:<br />

pj set “logfile=filename”<br />

where filename is either fully qualified or relative to the current<br />

directory. Using a fully qualified, absolute file name ensures only one<br />

log file is created to log <strong>Source</strong> <strong>Integrity</strong> operations.<br />

<strong>User</strong> <strong>Guide</strong> 193


Managing Archives and Revisions<br />

Log File Format<br />

You can also insert the following line in your local configuration file<br />

(rcs.rc or rcs.c):<br />

logfile=filename<br />

Each archive transaction recorded in a log file occupies a single line,<br />

or record. Information within each record is divided into fields, each<br />

describing one aspect of the archive transaction.<br />

You can customize logfile records with the LogFormat configuration<br />

option in SAM or in your personal configuration.<br />

By default, archive transactions contain six fields.<br />

Field Description<br />

Field 1 <strong>The</strong> operation performed (for example, ci or co, same<br />

for command line interface, Windows interface, or<br />

<strong>Source</strong> <strong>Integrity</strong> Web Interface).<br />

Field 2 <strong>The</strong> user’s login name.<br />

Field 3 <strong>The</strong> revision number affected by the command.<br />

Field 4 <strong>The</strong> name of the affected archive.<br />

Field 5 <strong>The</strong> current date and time in the format<br />

yyyy.mm.dd hh:mm:ss<br />

Field 6 <strong>The</strong> name of the person who holds the lock on the<br />

affected revision.<br />

This corresponds to the default LogFormat value of<br />

%C %u %r %f %D %l<br />

Typical output from this initial setting appears as<br />

ci siuser 2.4 prog.c 1999.03.12 14:21:32 siuser<br />

You can alter the LogFormat value to record different information.<br />

For example, the following LogFormat statement could be used to<br />

record the command that was executed, the archive file name and<br />

revision number involved, and the date of the revision.<br />

LogFormat=%C: %f Rev %r on %d<br />

<strong>The</strong> output from this entry would appear as<br />

ci: prog.c Rev 2.4 on 99/06/12 09:21:32<br />

194 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Cleaning Up<br />

Log Files<br />

Cleaning Up Working Files<br />

For a detailed description, see<br />

the online reference for the<br />

rcsclean command.<br />

Cleaning Up Working Files<br />

<strong>The</strong> easiest way to clean up a log file is to delete the file. <strong>Source</strong><br />

<strong>Integrity</strong> automatically creates a new one the next time it records an<br />

archive transaction. You can also open the log file in a text editor and<br />

delete transaction records. For instance, you could delete transaction<br />

records that are greater than a particular number of days or weeks<br />

old.<br />

<strong>The</strong> rcsclean command compares the most recent revision of a file<br />

to its working file and deletes the working file if it has not changed<br />

since it was checked out. To clean up unused working files in a<br />

sandbox or project, use pj clean.<br />

<strong>The</strong> syntax for rcsclean is<br />

rcsclean file…<br />

where file is one or more files to be examined.<br />

<strong>Source</strong> <strong>Integrity</strong> normally makes a working file writable when you<br />

have a lock on the revision it was generated from. If rcsclean finds<br />

the working file is read-only, it assumes you do not have a lock on the<br />

revision and so removes the working file, if it has not changed. If you<br />

had explicitly locked the revision (using pj lock or rcs -l),<br />

rcsclean will not clear this lock.<br />

Note This functionality is available only in the command line interface.<br />

<strong>User</strong> <strong>Guide</strong> 195


Managing Archives and Revisions<br />

Storing Binary Files in Reference Format<br />

If you want to store large binary files in your archives, using <strong>Source</strong><br />

<strong>Integrity</strong>’s traditional RCS archive format will result in very large<br />

archives and decreased performance. When storing binary files in<br />

archives, you should use the Reference archive format instead. With<br />

the Reference format, <strong>Source</strong> <strong>Integrity</strong> stores complete revisions<br />

instead of just deltas between revisions. It also stores each revision in<br />

a separate file; the archive itself contains only header and summary<br />

information. Archives stored in this format require more disk space,<br />

but have improved performance.<br />

To change archive formats in the Windows interface:<br />

Select the Store By Reference option in the Archive Information dialog<br />

box.<br />

To change archive formats in the command line interface:<br />

Use the rcs command to change archive formats.<br />

rcs -S RCS|Reference file<br />

196 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Using Extensions<br />

For instructions on installing<br />

extensions and a complete list<br />

of the supported host<br />

environments, see the <strong>Source</strong><br />

<strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong><br />

Administrator <strong>Guide</strong>.<br />

7<br />

<strong>Source</strong> <strong>Integrity</strong> Extensions transparently blend the <strong>Source</strong> <strong>Integrity</strong><br />

functionality into the Integrated Development Environments (IDEs)<br />

you use, allowing you to work within your favorite development<br />

environment. <strong>Source</strong> <strong>Integrity</strong> Extensions enable you to access the<br />

functionality available in the core product, right from within the host<br />

environment.<br />

This chapter explains how <strong>Source</strong> <strong>Integrity</strong> interacts with your IDEs,<br />

and gives more specific information about interacting with the<br />

following host environments:<br />

Microsoft Developer Studio 97 (Visual C++, Visual J++, Visual<br />

Basic, Visual FoxPro)<br />

Borland Delphi and 3.0 and 4.0<br />

Microsoft Windows Explorer<br />

<strong>User</strong> <strong>Guide</strong> 197


Using Extensions<br />

Introduction to <strong>Source</strong> <strong>Integrity</strong> Extensions<br />

<strong>Source</strong> <strong>Integrity</strong> Extensions provide seamless access to many<br />

features, including:<br />

Create Project<br />

Take files that form a single body of work and group them in a<br />

related project. <strong>Source</strong> <strong>Integrity</strong>’s project-oriented approach to<br />

configuration management makes it easier to control the<br />

evolution of your files.<br />

Create Sandbox<br />

A reflection of the master project, a sandbox provides a way for<br />

you to work in a personal, protected workspace without<br />

interfering with the master project. This way, changes can be<br />

made and tested before being merged into the master project.<br />

Create Variant Sandbox<br />

If you want to work with a particular revision of the project to<br />

maintain past releases of a product, you can create a variant<br />

sandbox and work without interference on your own<br />

development path.<br />

Add Members<br />

Manage files not in the IDE project. Help files, databases, and<br />

other related files can be added to the same project as your IDE<br />

files.<br />

Check In<br />

Add a new revision of the file to its archive. <strong>The</strong> new revision<br />

becomes the archive’s head revision unless you check in the file<br />

to a revision other than the head revision, in which case a new<br />

branch is created. For IDEs that have associated files such as .FRM<br />

and .FRX files in Visual Basic, or .DFM and .PAS files in Borland<br />

Delphi, <strong>Source</strong> <strong>Integrity</strong> ensures all related files are checked in<br />

and out together.<br />

Check Out<br />

Extract the contents of a revision in an archive and copy it to a<br />

working file. Any revision can be checked out by its revision<br />

number or label. After being checked out, working files are<br />

automatically reloaded in the host environment or IDE.<br />

Configuration<br />

Customize the Extensions to work the way you want them to<br />

work, right from within each host environment or IDE. For<br />

example, you can decide whether or not the Check Out command<br />

198 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> Project<br />

Window<br />

Introduction to <strong>Source</strong> <strong>Integrity</strong> Extensions<br />

automatically checks out the selected files, or if a dialog box is<br />

displayed for each file, allowing you to check out old revisions.<br />

Run <strong>Source</strong> <strong>Integrity</strong><br />

If you require functionality not available through the <strong>Source</strong><br />

<strong>Integrity</strong> extensions, open the <strong>Source</strong> <strong>Integrity</strong> application with<br />

the <strong>Source</strong> <strong>Integrity</strong> project associated with your current IDE<br />

project already loaded.<br />

Context-sensitive Help<br />

Get Help for individual controls and fields within each dialog<br />

box. You can also choose to view useful hints as your mouse<br />

pointer passes over dialog box fields and functions.<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> Project Window gives you control over the<br />

<strong>Source</strong> <strong>Integrity</strong> Project associated with your current IDE project,<br />

from within the IDE. Operations on the <strong>Source</strong> <strong>Integrity</strong> project and<br />

its members are synchronized between the <strong>Source</strong> <strong>Integrity</strong> project<br />

window and the IDE, allowing you to focus on the <strong>Source</strong> <strong>Integrity</strong><br />

project without losing touch with the related IDE project. <strong>The</strong> tool bar<br />

provides quick access to the most commonly used functions in the<br />

<strong>Source</strong> <strong>Integrity</strong> project window.<br />

If you want to hide the toolbar while you work on your IDE project,<br />

de-select Toolbar in the View menu. Simply select Show Toolbar to<br />

display the toolbar once again.<br />

<strong>The</strong> project window contains a list of members in the sandbox or<br />

project, with fields you can easily sort. <strong>Source</strong> <strong>Integrity</strong> subprojects<br />

are now supported within the extensions, allowing you to treat a<br />

<strong>Source</strong> <strong>Integrity</strong> project as a member of the current project.<br />

<strong>User</strong> <strong>Guide</strong> 199


Using Extensions<br />

Using Filters Within the Project Window<br />

As your <strong>Source</strong> <strong>Integrity</strong> projects grow, you will find it increasingly<br />

difficult to find and select the specific members you need to work<br />

with at a given time. In addition to sorting by fields, the project<br />

window offers an optional drop-down list of built-in filters that allow<br />

you to focus your view on a particular subset of project members you<br />

are currently interested in. Once you select a particular filter, only<br />

those members that meet the criteria specified by the filter are<br />

displayed.<br />

Here is a list of the built-in filters provided, and what it means to<br />

apply each of them.<br />

All Members displays all members in the current project or<br />

sandbox (the default).<br />

Modified Members displays all members that have a working file<br />

that has been modified.<br />

Out-Of-Synch members displays all members whose member<br />

revision is not currently at head revision.<br />

Locked displays all members that are currently locked.<br />

Locked By Me displays all members that are currently locked in<br />

your name.<br />

Frozen Members displays all members that are currently frozen.<br />

Subprojects displays all members that are projects themselves.<br />

Members With Label displays all members that currently have a<br />

particular label associated with them. After choosing this filter,<br />

specify the label you want to base your selection on by selecting it<br />

from the drop-down list of available labels.<br />

Members With State displays all members that are currently<br />

associated with a particular state. After choosing this filter,<br />

specify the state you want to base your selection on by selecting it<br />

from the drop-down list of available states.<br />

200 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Introduction to <strong>Source</strong> <strong>Integrity</strong> Extensions<br />

<strong>The</strong> member list provides the following information on each member:<br />

Field Description<br />

Type Project members may be one of three file types:<br />

Archived (under revision control)<br />

Non-Archived (not under revision control); nonarchived<br />

members can only be added from within<br />

the <strong>Source</strong> <strong>Integrity</strong> application<br />

Subproject<br />

If you freeze a member, a snowflake alerts you to the<br />

state of the file. <strong>The</strong> description “Frozen Member” also<br />

appears at the bottom of the window. Freezing prevents<br />

member information from being updated. Thawing<br />

removes the frozen state so changes can again be<br />

made to the project file or member information.<br />

When there is a delta symbol in a member listing, this<br />

means the member’s archive or working file has<br />

changed.<br />

This delta symbol means your working file has<br />

changed.<br />

This delta symbol means the member archive has<br />

later revisions available.<br />

A question mark in the delta field means the member<br />

has not been scanned for changes, a Configuration<br />

option in the Preferences panel. Select the member and<br />

choose Member > Scan For Changes to search for<br />

any changes to the member archive or working file, or<br />

choose Window > Refresh to scan all members of a<br />

project for changes.<br />

Member Name <strong>The</strong> full path name of the member’s working file.<br />

Locked If the member revision is locked, the name of the<br />

locker appears beside a padlock symbol.<br />

Revision <strong>The</strong> revision number associated with the member<br />

revision in your sandbox or master project.<br />

State <strong>The</strong> development state associated with the member<br />

revision.<br />

Labels Any labels assigned to the member revision.<br />

<strong>User</strong> <strong>Guide</strong> 201


Using Extensions<br />

<strong>The</strong> Information Area below the list of members displays information<br />

about a selected member. For example, if the member revision’s<br />

working file has been updated but not checked in, a message alerts<br />

you that the working file is newer than the member revision. Other<br />

information displayed includes: locker name, member frozen, and<br />

member not scanned for changes.<br />

If you want to hide this Information Area while you work on your<br />

IDE project, de-select Information Area from the View menu.<br />

Member Menu Commands<br />

<strong>The</strong> Member menu contains commands that act upon members.<br />

Member-specific functionality is also accessible using the right-click<br />

context menu. Select a member and click your right mouse button to<br />

display a pop-up menu of actions you can perform on the selected<br />

item.<br />

Note Commands that are not available in the SCC Project window are<br />

marked with the text “Not in SCC” in the margin.<br />

Not in SCC. Check In checks in all selected files to their archive, provided they<br />

are locked by you.<br />

Not in SCC. Check Out checks out all selected files. If you already have a<br />

selected file checked out, you will be asked if you want to<br />

overwrite your working copy. If you choose to do so, any changes<br />

made in your original working copy will be lost.<br />

Not in SCC. Undo Checkout unlocks a revision that was previously checked<br />

out locked (in your name), and resynchronizes it, so the working<br />

file once again reflects the member revision.<br />

Not in SCC. Resynchronize reverts selected files you have checked out to their<br />

state prior to modification and reflects the change in your IDE.<br />

Select selects all, locked, or changed members.<br />

Label adds a label to the member revision of the selected file. If<br />

multiple files are selected for this operation, the label chosen will<br />

apply to all files.<br />

Differences opens the Visual Difference utility on the selected text<br />

file. You can determine where the file has changed since check<br />

out, by displaying a side-by-side comparison of the selected file<br />

with another revision.<br />

202 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Introduction to <strong>Source</strong> <strong>Integrity</strong> Extensions<br />

Not in SCC. Unlock removes a lock you own from the member revision of a<br />

selected member without changing the member revision or<br />

working file.<br />

Scan for Changes scans selected members to search for any<br />

changes to the member archive or working file. If<br />

<strong>Source</strong> <strong>Integrity</strong> detects changes in either the member archive or<br />

working file, the appropriate delta symbol appears next to the<br />

changed member.<br />

By default, <strong>Source</strong> <strong>Integrity</strong> scans each project member to search<br />

for changes. You can disable this feature by de-selecting the Scan<br />

Members on Open Project/Sandbox option in the Preferences<br />

panel of the Personal Configuration dialog box.<br />

Upon opening a project or sandbox with this option disabled,<br />

<strong>Source</strong> <strong>Integrity</strong> displays a question mark in the delta column,<br />

and reports “Member not scanned for changes” in the<br />

Information Area at the bottom of the Project window.<br />

Choose Window > Refresh to scan all members of a project for<br />

changes.<br />

Open Member Archive opens a member’s Archive window,<br />

allowing you to view and compare all revisions.<br />

Member Information opens a dialog box that displays the project<br />

or sandbox the member is a part of, and the full path of both the<br />

working file and archive location.<br />

You may also use the Member Information dialog box to append<br />

the Revision Description associated with the revision, and add,<br />

edit, or delete labels associated with the revision.<br />

Member Report opens a window that presents information stored<br />

in the archive about the selected member. See who created a new<br />

revision, when it was created, its state, any labels assigned to the<br />

revision, the master project or sandbox it is a part of, and the full<br />

path of the archive location.<br />

Open Subproject displays the members of the selected subproject<br />

in the Project window.<br />

Promote promotes the state of the selected member revisions to a<br />

state you choose. You must define the promotion states in<br />

Personal Configuration (Promotion panel) in order to make them<br />

available in the Promote Member dialog box’s drop-down list.<br />

Your SAM administrator can also define promotion states.<br />

This command is available only when promotion is enabled in<br />

Configuration.<br />

<strong>User</strong> <strong>Guide</strong> 203


Using Extensions<br />

Demote demotes the state of the selected member revisions to a<br />

state you choose. You must define the promotion states in<br />

Configuration (Promotion panel), in order to make them available<br />

in the Demote Member dialog box’s drop-down list.<br />

This command is available only when promotion is enabled in<br />

Configuration.<br />

Freeze freezes the member in its current state to prevent changes<br />

being made to the member revision. For example, you cannot<br />

update the member revision or change the member type for a<br />

frozen member. You can still check in and check out frozen<br />

members, but the member revision in the master project or<br />

sandbox will not change.<br />

Thaw removes freezing so changes can be made to the member<br />

revision in the master project or sandbox.<br />

Not in SCC. Lock locks the member revision of selected members, without<br />

changing the member revision or working file (that is, without<br />

checking out the revision to a working file). This prevents others<br />

from modifying the file.<br />

Not in SCC. Unlock removes a lock from a revision without checking it in (and<br />

thereby creating a new revision). Since strict locking is enforced<br />

in the IDE Extensions, you can only remove a lock you own. By<br />

removing a lock on a file that is checked out and modified, you<br />

risk losing these modifications. If the file is checked out again<br />

before it is checked in, the user receives the unmodified revision.<br />

Not in SCC. Remove Unused Locks removes any locks you own from files that<br />

have not changed since you locked them. This allows you to<br />

safely free up files for other people to work on.<br />

Not in SCC. Update to Tip Rev, for all selected members, replaces the member<br />

revision with the latest revision in the branch your member<br />

revision is on.<br />

Not in SCC. Update to Head Revision, for all selected members, replaces the<br />

member revision with the latest revision from the main branch of<br />

that member’s archive.<br />

Project Menu Commands<br />

All of these commands appear in the SCC Project window.<br />

Open Project Archive opens the current project’s Archive window,<br />

allowing you to view and compare project revisions.<br />

Checkpoint Project saves the current state of your project. You can<br />

restore it later by creating a variant sandbox.<br />

204 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Introduction to <strong>Source</strong> <strong>Integrity</strong> Extensions<br />

Project Information displays the master project name, the project<br />

name, the number of members, the number of locked members, a<br />

project description, and a list of development paths.<br />

Project Report opens a window that displays information stored<br />

in the archive about the <strong>Source</strong> <strong>Integrity</strong> project.<br />

Promote Project promotes the state of the project to a state you<br />

choose.<br />

Demote Project demotes the state of the project to a state you<br />

choose.<br />

Freeze Project freezes a project in its current state. You cannot add<br />

or remove project members, or change Configuration settings for<br />

a frozen project. You can still check out and check in members of<br />

a frozen project, but the member revision in the master project or<br />

sandbox will not change.<br />

Thaw Project removes freezing so changes can be made to the<br />

project.<br />

Add Members allows you to add files to the <strong>Source</strong> <strong>Integrity</strong><br />

project.<br />

Remove Members removes the member selected in the member<br />

list from the <strong>Source</strong> <strong>Integrity</strong> project. <strong>The</strong> working file and the<br />

member archive remains, but the file is no longer treated as part<br />

of the project.<br />

Open Parent opens the parent project associated with the<br />

subproject currently selected in the Project window.<br />

Window Menu Command<br />

Refresh updates both the Project Window and any files open in<br />

your IDE with the latest information.<br />

Right-click a project member or revision to display a pop-up menu of<br />

actions you can perform on the selected item.<br />

<strong>User</strong> <strong>Guide</strong> 205


Using Extensions<br />

<strong>The</strong> Archive<br />

Window<br />

When you open an archive, <strong>Source</strong> <strong>Integrity</strong> displays information<br />

about the revisions in the archive. <strong>The</strong> Archive window contains a<br />

selectable list with entries for the working file (if one exists), and each<br />

revision in the archive.<br />

<strong>The</strong> toolbar provides quick access to the most commonly used<br />

functions in the Archive Window. If you want to hide the toolbar<br />

while you work on your IDE project, de-select Toolbar in the View<br />

menu.<br />

In the Archive window, you can view and compare revisions, as well<br />

as launch the <strong>Source</strong> <strong>Integrity</strong> application. Right-click on an archive<br />

revision in an Archive window to display a pop-up menu of actions<br />

you can perform on the selected item.<br />

206 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Introduction to <strong>Source</strong> <strong>Integrity</strong> Extensions<br />

Each entry in the list contains information about a single revision in<br />

the archive. This information is displayed in columns with the<br />

following heading:<br />

Column Description<br />

Revision Revision number.<br />

Author <strong>User</strong> who checked in the revision.<br />

Date Date and time the revision was checked in.<br />

Locked <strong>User</strong> name of the person who locked the revision.<br />

State Revision’s state setting.<br />

Labels Labels attached to the revision.<br />

<strong>The</strong> Information area below the list of revisions displays the Revision<br />

Description for the currently selected revision.<br />

If you want to hide the toolbar while you work on your IDE project,<br />

de-select Toolbar in the View menu.<br />

<strong>The</strong> first entry in the Archive Window is the archive’s working file (if<br />

one exists). <strong>The</strong> entry shows the path name of the working file.<br />

If the working file can be edited, the entry is preceded by a pencil<br />

icon ( ). If the working file is read-only, the pencil icon is crossed<br />

out in red.<br />

<strong>User</strong> <strong>Guide</strong> 207


Using Extensions<br />

Archive Menu Commands<br />

Note Commands that are not available in the SCC Archive window are<br />

marked with the text “Not in SCC” in the margin.<br />

Not in SCC. Check In checks in the selected working file to an archive,<br />

provided the revision is locked by you.<br />

Not in SCC. Check Out checks out the selected revision from its archive,<br />

provided the revision is not locked by someone else. If you<br />

already have a revision checked out, you will be asked if you<br />

want to overwrite your working copy. If you choose to do so, any<br />

changes made to your original working file will be lost.<br />

Not in SCC. Undo Check Out unlocks a revision that was previously checked<br />

out locked (in your name), and resynchronizes it, so the working<br />

file once again reflects the member revision.<br />

View Revision displays the contents of the selected revision in its<br />

associated application (for example, Notepad).<br />

Compare Revisions opens the Visual Difference utility and<br />

displays a side-by-side comparison of the selected revisions. This<br />

allows you to visually determine the differences between the two<br />

revisions. You can also compare the working file to a revision by<br />

selecting the working file and a revision.<br />

Not in SCC. Lock Revision allows you to place a lock on the selected revision,<br />

without checking it out of the archive. This prevents others from<br />

modifying the revision.<br />

Not in SCC. Unlock Revision removes a lock from a revision without checking<br />

it in to the archive (and thereby creating a new revision). Since<br />

strict locking is enforced in the IDE Extensions, you can only<br />

remove a lock that you own. By removing a lock on a revision<br />

that is checked out and modified, you risk losing these<br />

modifications. If the revision is checked out again before it is<br />

checked in, the user receives the unmodified revision.<br />

Set Default Branch opens a dialog box in which you can set the<br />

default branch to which <strong>Source</strong> <strong>Integrity</strong> will check in your files.<br />

View Menu Commands<br />

<strong>The</strong> following commands appear in the SCC window:<br />

Stay On Top causes the Archive Window to remain visible while<br />

you work on your IDE project.<br />

208 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Using the Extensions<br />

Using the Extensions<br />

Tool Bar displays the Archive Window toolbar, which provides<br />

easy access to the most commonly used archive commands.<br />

Information Area shows the area below the list of revisions, which<br />

displays information about a selected revision.<br />

Window Menu Command<br />

Refresh gets the latest archive and working file information and<br />

updates the <strong>Source</strong> <strong>Integrity</strong> Archive window.<br />

Follow these basic steps to use <strong>Source</strong> <strong>Integrity</strong>:<br />

1. Create a <strong>Source</strong> <strong>Integrity</strong> project.<br />

Add your IDE project to source control by creating a<br />

<strong>Source</strong> <strong>Integrity</strong> project using the IDE.<br />

2. Add project members.<br />

Add IDE project files to the <strong>Source</strong> <strong>Integrity</strong> project.<br />

<strong>Source</strong> <strong>Integrity</strong> automatically checks in and creates an archive<br />

for each file added.<br />

3. Check out files as you need them.<br />

<strong>Source</strong> <strong>Integrity</strong> creates a working file from the selected revision<br />

in the archive.<br />

4. Make changes to the project members from within the IDE.<br />

5. Check in modified files.<br />

This creates a new revision in the member’s archive. <strong>The</strong> new<br />

revision becomes the archive’s head revision unless you<br />

specifically check in the file to a revision other than the head<br />

revision. When you check in a file to a revision other than the<br />

head revision, a new branch is created.<br />

<strong>User</strong> <strong>Guide</strong> 209


Using Extensions<br />

Differences Between Extensions and<br />

<strong>Source</strong> <strong>Integrity</strong><br />

Creating<br />

Projects<br />

When you create a master project, you should create the project at the<br />

top level of the directory tree that contains your files. <strong>Source</strong> <strong>Integrity</strong><br />

projects work best when all project members reside in a single<br />

directory tree under the project directory.<br />

With <strong>Source</strong> <strong>Integrity</strong><br />

As you create a new project, you can also create a sandbox, add<br />

members, and create archives for both the project members and the<br />

project itself. <strong>Source</strong> <strong>Integrity</strong> wizards now lead you through the<br />

process of creating projects and sandboxes.<br />

Once you select a project location and enter the full path names of the<br />

new project and sandbox, the remainder of the Create Project dialog<br />

box is used to add members to the new project, and to create archives<br />

for both the project and its new members.<br />

With the Extensions<br />

When you create a <strong>Source</strong> <strong>Integrity</strong> project using the Extensions, the<br />

process is different. <strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> project or sandbox is<br />

automatically created in the same directory where your IDE project<br />

resides.<br />

Notice that the Create Project dialog box is different.<br />

1. Type an initial optional comment to associate with the new<br />

<strong>Source</strong> <strong>Integrity</strong> project in the area provided.<br />

2. Select one of two options for project creation:<br />

210 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Differences Between Extensions and <strong>Source</strong> <strong>Integrity</strong><br />

Master Project Only creates a new <strong>Source</strong> <strong>Integrity</strong> project and<br />

archive directory in the same directory as your IDE project.<br />

Master Project and Sandbox creates a <strong>Source</strong> <strong>Integrity</strong><br />

sandbox in your current IDE project directory, and creates a<br />

master project and archive in a directory of your choice. If<br />

you choose this option, another dialog box appears,<br />

prompting you for a Master Project Location.<br />

<strong>The</strong> Add Project Members dialog box appears after having<br />

determined the <strong>Source</strong> <strong>Integrity</strong> project’s location. It presents a<br />

list of all files in the IDE project.<br />

Note <strong>The</strong> dialog box that appears may differ slightly depending on the<br />

IDE.<br />

If there are files you do not want to place under version control, select<br />

them and click Remove. If you want to add files to the<br />

<strong>Source</strong> <strong>Integrity</strong> project that are not members of the corresponding<br />

<strong>User</strong> <strong>Guide</strong> 211


Using Extensions<br />

Creating<br />

Sandboxes<br />

IDE project, click Add to browse for and select these files. Once you<br />

have the list of files you want, click OK. All listed files are archived<br />

and added to the <strong>Source</strong> <strong>Integrity</strong> project.<br />

You can create a sandbox for a project while you are creating the<br />

project, but you can also create a sandbox later. Use the Create<br />

Sandbox command.<br />

With <strong>Source</strong> <strong>Integrity</strong><br />

<strong>Source</strong> <strong>Integrity</strong> wizards now lead you through the process of<br />

creating projects and sandboxes.<br />

With the Extensions<br />

When you create a <strong>Source</strong> <strong>Integrity</strong> sandbox using the Extensions, the<br />

process is different.<br />

Notice that the Create Sandbox dialog box is different.<br />

If you have a project open in the IDE that has an associated<br />

<strong>Source</strong> <strong>Integrity</strong> project, the Master Project Name field will contain the<br />

path to this master project. You may edit this field if you want to<br />

create a sandbox for a different project.<br />

1. In the Sandbox Location field, enter the directory path you want<br />

to place your sandbox in.<br />

Note Relative path names in the Sandbox Location field are taken in<br />

relation to the path given in the Master Project Name field.<br />

212 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Differences Between Extensions and <strong>Source</strong> <strong>Integrity</strong><br />

2. If you want to work with a particular project revision in the<br />

sandbox, enable the Create Variant Sandbox check box. When you<br />

click OK in this case, the Create Variant Sandbox dialog box<br />

appears, wherein you may select a revision by number or by<br />

label.<br />

Sometimes you must include files in directories that are not part of<br />

the master project directory tree. <strong>The</strong>se files are called out-of-tree<br />

members because they are located outside of the main directory tree.<br />

<strong>Source</strong> <strong>Integrity</strong> normally places out-of-tree members in the root<br />

directory of the sandbox (that is, the directory containing the<br />

sandbox.pj file). However, in order to preserve relative path<br />

associations, you have the option of specifying where the files in the<br />

external directory should be placed in the sandbox.<br />

When a sandbox is created from such a Master Project, the Create<br />

Sandbox Directory dialog box appears.<br />

<strong>User</strong> <strong>Guide</strong> 213


Using Extensions<br />

If you have a project open in the IDE that has an associated<br />

<strong>Source</strong> <strong>Integrity</strong> project, Master Project displays the path for this<br />

master project.<br />

Sandbox displays the name and path of the sandbox associated<br />

with the current <strong>Source</strong> <strong>Integrity</strong> project.<br />

Project Directory displays the name and path of the directory that<br />

contains out-of-tree members (ones that are not part of the project<br />

directory tree).<br />

Fill in the Create Sandbox Directory dialog box as follows:<br />

1. In the Sandbox Directory field, enter the full path where you want<br />

to put files in this directory. If the specified directory does not<br />

already exist, <strong>Source</strong> <strong>Integrity</strong> creates it for you.<br />

2. Click Create to make the new directory. If you want<br />

<strong>Source</strong> <strong>Integrity</strong> to place the out-of-tree members in the root<br />

directory of the sandbox (as it would by default), click Skip.<br />

Microsoft Visual Basic 5.0 and 6.0<br />

This section describes how to access <strong>Source</strong> <strong>Integrity</strong> through<br />

Microsoft Visual Basic 5.0 and 6.0.<br />

Once you have installed the <strong>Source</strong> <strong>Integrity</strong> 32-bit SCC Extension,<br />

opening a project in Visual Basic under source control automatically<br />

loads its archive information.<br />

Access version control functionality from within Visual Basic and 5.0<br />

and 6.0 by selecting the menu item that corresponds to the<br />

<strong>Source</strong> <strong>Integrity</strong> function you want to perform.<br />

Menu Item Function<br />

Get Gets the latest version of the selected file and<br />

puts it in your working directory.<br />

Check Out Checks out a revision of the currently active file<br />

in the Visual Basic window, either locked (for<br />

editing) or unlocked.<br />

Check In Checks in the currently active file in the Visual<br />

Basic window.<br />

214 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Creating a<br />

<strong>Source</strong> <strong>Integrity</strong><br />

Project<br />

For more on creating<br />

<strong>Source</strong> <strong>Integrity</strong> projects using<br />

the extensions, see “Using the<br />

Extensions” on page 209.<br />

Menu Item Function<br />

Microsoft Visual Basic 5.0 and 6.0<br />

Undo Check Out Replaces the selected working file with the<br />

revision that was checked out, as it appeared<br />

prior to modification.<br />

Open New <strong>MKS</strong><br />

<strong>Source</strong> <strong>Integrity</strong><br />

Project<br />

Run <strong>MKS</strong><br />

<strong>Source</strong> <strong>Integrity</strong><br />

Add Project to<br />

<strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong><br />

Creates a sandbox for the current or any other<br />

<strong>Source</strong> <strong>Integrity</strong> project.<br />

Invokes the <strong>Source</strong> <strong>Integrity</strong> application. If a<br />

project is currently loaded, this command opens<br />

the <strong>Source</strong> <strong>Integrity</strong> project window instead.<br />

Opens the Create Project dialog box to bring<br />

the current Visual Basic project under source<br />

control.<br />

Options Configures how <strong>Source</strong> <strong>Integrity</strong> will work, both<br />

within Visual Basic and by itself.<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> right-click context menu reveals the memberspecific<br />

commands that you can perform on a selected file.<br />

Even the Visual Basic Project window is enhanced with version<br />

control features and indicators. For instance, a check mark beside a<br />

file icon indicates the file is currently checked out. When a file is readonly,<br />

a small lock appears next to the file icon in the project window.<br />

To create a <strong>Source</strong> <strong>Integrity</strong> project in Visual Basic:<br />

1. Open the Visual Basic project you want to put under version<br />

control.<br />

2. Choose Tools > <strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong> > Add Project to <strong>MKS</strong><br />

<strong>Source</strong> <strong>Integrity</strong>.<br />

<strong>The</strong> Create Project dialog box appears.<br />

<strong>User</strong> <strong>Guide</strong> 215


Using Extensions<br />

Creating a<br />

Sandbox<br />

For more on creating<br />

<strong>Source</strong> <strong>Integrity</strong> sandboxes<br />

using the extensions, see<br />

“Using the Extensions” on<br />

page 209.<br />

Checking Out<br />

Files<br />

To create a sandbox in Visual Basic:<br />

Choose Tools > <strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong> > Open New <strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong><br />

Project.<br />

<strong>The</strong> Create Sandbox dialog box appears.<br />

To check out files in Visual Basic:<br />

1. Bring any file(s) you want to check out into focus in the Visual<br />

Basic environment. You may also select a file from the Visual<br />

Basic project explorer: choose Check Out from the right-click<br />

context menu and follow from Step 3.<br />

2. Choose Tools > Check Out.<br />

A list of all files that can be checked out appears.<br />

You may choose additional files to check out from this list by<br />

setting their check boxes.<br />

Selecting a .frm file automatically selects the corresponding .frx<br />

file. If you have selected Show Dialog in Configuration, the Check<br />

Out dialog box appears. Otherwise, the member revision is<br />

checked out.<br />

3. Fill in or modify options in the dialog box as you like, and click<br />

OK to check out the file. To cancel the check-out operation, click<br />

Cancel. To cancel the operation for all files, click Cancel All.<br />

A check mark beside a file icon indicates the file is currently checked<br />

out.<br />

216 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Checking In<br />

New Revisions<br />

To check in new revisions in Visual Basic:<br />

Microsoft Visual Basic 5.0 and 6.0<br />

1. Bring any file(s) you want to check in into focus in the Visual<br />

Basic environment. You may also select a file from the Visual<br />

Basic project window: choose Check In from the right-click<br />

context menu, and follow from Step 3.<br />

2. Choose Tools > Check In. A list of all files that can be checked in<br />

appears.<br />

You may choose additional files to check in from this list by<br />

setting their check boxes. Selecting a .frm file automatically<br />

selects the corresponding .frx file. If you have selected Show<br />

Dialog in Configuration, the Check In dialog box appears.<br />

Otherwise, each file is checked in with the next logical revision<br />

number and no label.<br />

3. Fill in or modify options in the dialog box as you like, and click<br />

OK to check in the file. To cancel the check-in operation, click<br />

Cancel. To cancel the operation for all files, click Cancel All.<br />

A check mark beside a file icon indicates the file is currently checked<br />

out.<br />

<strong>User</strong> <strong>Guide</strong> 217


Using Extensions<br />

<strong>The</strong> Microsoft Visual C++ 6.0 Extension<br />

This section describes how to access <strong>Source</strong> <strong>Integrity</strong> through<br />

Microsoft Visual C++, which is part of Microsoft Visual Studio.<br />

Once you have installed the <strong>Source</strong> <strong>Integrity</strong> Microsoft Visual Studio<br />

Extension, opening a project in Microsoft Visual C++ 6.0 under source<br />

control automatically loads its archive information.<br />

You can access version control functionality through the <strong>Source</strong><br />

Control sub-menu of the Project menu. Select the menu item that<br />

corresponds to the <strong>Source</strong> <strong>Integrity</strong> function you want to perform.<br />

Menu Item Function<br />

Get Latest Version Gets the latest version of the selected file and<br />

puts it in your working directory.<br />

Check Out Checks out a revision of the currently active file.<br />

Check In Checks in the currently active file.<br />

Undo Check Out Replaces the selected working file with the<br />

revision that was checked out, as it appeared<br />

prior to modification.<br />

Add to <strong>Source</strong><br />

Control<br />

Remove from <strong>Source</strong><br />

Control<br />

Adds the selected file to <strong>Source</strong> Control.<br />

Removes the currently active file from<br />

<strong>Source</strong> <strong>Integrity</strong>. Its member archive remains<br />

accessible from the <strong>Source</strong> <strong>Integrity</strong> project.<br />

Show Differences Invokes the Visual Difference utility to compare<br />

the selected working file with the member<br />

revision.<br />

<strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong><br />

Properties<br />

Configures how <strong>Source</strong> <strong>Integrity</strong> will work, both<br />

within the different IDEs and by itself.<br />

Refresh Status Updates the status and archive information of<br />

the selected file.<br />

<strong>MKS</strong> <strong>Source</strong> <strong>Integrity</strong> Invokes the <strong>Source</strong> <strong>Integrity</strong> program. If a<br />

project is currently loaded, this command opens<br />

the <strong>Source</strong> <strong>Integrity</strong> project window instead.<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> right-click context menu reveals the memberspecific<br />

commands you can perform on a selected file.<br />

218 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Creating a<br />

<strong>Source</strong> <strong>Integrity</strong><br />

Project<br />

For more on creating<br />

<strong>Source</strong> <strong>Integrity</strong> projects using<br />

the extensions, see “Using the<br />

Extensions” on page 209.<br />

Creating a<br />

Sandbox<br />

For more on creating<br />

<strong>Source</strong> <strong>Integrity</strong> sandboxes<br />

using the extensions, see<br />

“Using the Extensions” on<br />

page 209.<br />

Checking Out<br />

Files<br />

<strong>The</strong> Microsoft Visual C++ 6.0 Extension<br />

<strong>The</strong> Microsoft Visual C++ 6.0 Project Workspace window is also<br />

enhanced with version control features and indicators. For instance, a<br />

file’s icon turns gray once the file is placed under version control, and<br />

a red checkmark beside a file’s icon indicates the file is currently<br />

checked out.<br />

To create a <strong>Source</strong> <strong>Integrity</strong> project in Microsoft Visual C++ 6.0:<br />

1. Open the project you want to put under version control.<br />

(If you create a new project, you will be prompted to add it to<br />

source control upon creation.)<br />

2. Choose Project > <strong>Source</strong> Control > Add to <strong>Source</strong> Control.<br />

<strong>The</strong> Create Project dialog box appears.<br />

To create a sandbox in Microsoft Visual C++ 6.0:<br />

1. Choose File > Open Workspace.<br />

2. Click <strong>Source</strong> Control.<br />

<strong>The</strong> Create Sandbox dialog box appears.<br />

To check out files in Microsoft Visual C++ 6.0:<br />

1. Bring one or more files that you want to check out into focus in<br />

the Microsoft Visual C++ 6.0 environment.<br />

2. Choose Project > <strong>Source</strong> Control > Check Out.<br />

A list of the file(s) that you have selected appears.<br />

<strong>User</strong> <strong>Guide</strong> 219


Using Extensions<br />

Checking in<br />

New Revisions<br />

3. Once you have selected all the files you want to check out, click<br />

OK. If you have selected Show Dialog in Configuration, the Check<br />

Out dialog box appears for each file. Otherwise, the member<br />

revisions are checked out.<br />

4. Fill in or modify options in the dialog box as you wish, and click<br />

OK to check out the file. To cancel the check-out operation, click<br />

Cancel. To cancel the operation for all files, click Cancel All.<br />

To check in new revisions in Microsoft Visual C++ 6.0:<br />

1. Bring one or more files that you want to check in into focus in the<br />

Microsoft Visual C++ 6.0 environment.<br />

2. Choose Project > <strong>Source</strong> Control > Check In.<br />

A list of the file(s) that you selected appears.<br />

3. To associate a revision description with these files, enter one in<br />

the space provided. If you want to keep the files locked after<br />

checking them in, indicate so in the check box.<br />

4. Once you have selected all the files you want to check in, click<br />

OK. If you have selected Show Dialog in Configuration, the Check<br />

In dialog box appears for each file. Otherwise, each file is checked<br />

in with the next logical revision number and no label.<br />

220 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Using Microsoft<br />

Visual C++ 6.0<br />

<strong>The</strong> Microsoft Visual C++ 6.0 Extension<br />

5. Fill in or modify options in the dialog box as you like, and click<br />

OK to check in the file. To cancel the check-in operation, click<br />

Cancel. To cancel the operation for all files, click Cancel All.<br />

Each Visual C++ Project file and workspace will have its own<br />

<strong>Source</strong> <strong>Integrity</strong> project file, unless the workspace and project have<br />

the same name. In that case, both the workspace and project will be<br />

added to the same <strong>Source</strong> <strong>Integrity</strong> project, which is named after the<br />

workspace.<br />

So, you should create your workspace with a different name than the<br />

project file that it will contain. This will keep each workspace and<br />

project file separate for creating sandboxes.<br />

Creating a <strong>Source</strong> <strong>Integrity</strong> Project<br />

Create the Visual C++ workspace and the projects within it. <strong>The</strong>n,<br />

create a <strong>Source</strong> <strong>Integrity</strong> project, first for your Visual C++ projects<br />

and then for your workspace. Using the <strong>Source</strong> <strong>Integrity</strong> project<br />

window, insert the <strong>Source</strong> <strong>Integrity</strong> projects for the Visual C++<br />

projects into the <strong>Source</strong> <strong>Integrity</strong> project associated with the<br />

workspace.<br />

For example<br />

n:\master\myproject\workspace.dsw<br />

contains<br />

n:\master\myproject\myproject.dsp<br />

<strong>User</strong> <strong>Guide</strong> 221


Using Extensions<br />

Associated with these will be:<br />

n:\master\myproject\workspace.pj<br />

n:\master\myproject\myproject.pj<br />

Creating a <strong>Source</strong> <strong>Integrity</strong> Sandbox<br />

When creating a sandbox, create it from workspace.pj and recurse<br />

into the subprojects (that is, the <strong>Source</strong> <strong>Integrity</strong> projects for each<br />

Visual C++ project). All the Visual C++ projects contained within the<br />

workspace will be copied into your sandbox.<br />

If you want to work with an individual Visual C++ project, you can<br />

choose to create a sandbox of myproject.pj (that is, you do not have<br />

to create a sandbox of the entire workspace).<br />

Adding an Existing Project to <strong>Source</strong> Control<br />

When an existing project contains files that are not in subdirectories<br />

of the directory containing the Visual C++ project or workspace file,<br />

the <strong>Source</strong> <strong>Integrity</strong> project will be created at the highest level that<br />

contains all of the files in subdirectories. Visual C++ specifies this<br />

location to <strong>Source</strong> <strong>Integrity</strong>.<br />

For example<br />

n:\master\myproject\myproject.dsp<br />

contains<br />

n:\master\otherproject\include\resource.h<br />

When you add n:\master\myproject\myproject.dsp to source<br />

control, the <strong>Source</strong> <strong>Integrity</strong> project will be created as<br />

n:\master\myproject.pj since n:\master is the lowest common<br />

denominator between these files.<br />

Note You should not put a project under source control that contains<br />

files on different drives. Visual C++ cannot determine where to locate the<br />

project file and puts it in an arbitrary location.<br />

222 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> Borland Delphi Extension<br />

<strong>The</strong> Borland Delphi Extension<br />

This section describes how to access <strong>Source</strong> <strong>Integrity</strong> through<br />

Borland Delphi 3.0 and 4.0.<br />

Once you have installed the <strong>Source</strong> <strong>Integrity</strong> Delphi Extension,<br />

opening a project in Delphi under source control automatically loads<br />

its archive information.<br />

<strong>The</strong> Workgroups menu provides convenient access to the<br />

<strong>Source</strong> <strong>Integrity</strong> operations you are likely to use most frequently as a<br />

Delphi programmer. Extended functionality is accessible through the<br />

<strong>Source</strong> <strong>Integrity</strong> Project Window.<br />

To access version control functionality from within Borland Delphi,<br />

select the menu item that corresponds to the <strong>Source</strong> <strong>Integrity</strong> function<br />

you want to perform.<br />

Menu Item Function<br />

View SI Project<br />

Window<br />

Open the <strong>Source</strong> <strong>Integrity</strong> Project Window,<br />

which gives a full view of the <strong>Source</strong> <strong>Integrity</strong><br />

project associated with your current Delphi<br />

project, and advanced version control<br />

functionality.<br />

Check In Checks in the currently active Delphi form or<br />

unit.<br />

Check Out Checks out a revision of the currently active<br />

Delphi form or unit.<br />

Check In All Files Checks in all files in the <strong>Source</strong> <strong>Integrity</strong> project<br />

you currently have checked out and locked.<br />

Check Out All Files Checks out all the files in the <strong>Source</strong> <strong>Integrity</strong><br />

project that are currently checked in and<br />

unlocked.<br />

Create SI Project Opens the Create <strong>Source</strong> <strong>Integrity</strong> Project<br />

dialog box to bring the current Delphi project<br />

under source control.<br />

Add Project<br />

Members<br />

Adds files to the <strong>Source</strong> <strong>Integrity</strong> project, and<br />

creates an archive for each file.<br />

Create SI Sandbox Creates a sandbox for the current or any other<br />

<strong>Source</strong> <strong>Integrity</strong> project.<br />

<strong>User</strong> <strong>Guide</strong> 223


Using Extensions<br />

Creating a<br />

<strong>Source</strong> <strong>Integrity</strong><br />

Project<br />

For more on creating<br />

<strong>Source</strong> <strong>Integrity</strong> projects using<br />

the extensions, see “Using the<br />

Extensions” on page 209.<br />

Menu Item Function<br />

SI Configuration Configures how <strong>Source</strong> <strong>Integrity</strong> will work, both<br />

within Delphi and by itself.<br />

Run <strong>Source</strong> <strong>Integrity</strong> Invokes the <strong>Source</strong> <strong>Integrity</strong> program, with the<br />

current project loaded.<br />

<strong>The</strong> <strong>Source</strong> <strong>Integrity</strong> right-click context menu reveals the memberspecific<br />

commands you can perform on a selected file.<br />

To create a <strong>Source</strong> <strong>Integrity</strong> project in Delphi:<br />

1. Open the Delphi project you want to put under version control.<br />

2. Choose Workgroups > Create SI Project.<br />

<strong>The</strong> Create Project dialog box appears.<br />

Some Useful Tips for Creating Your <strong>Source</strong> <strong>Integrity</strong> Project<br />

You should add the following Delphi project files to your<br />

<strong>Source</strong> <strong>Integrity</strong> project: .DPR, .RES, .OPT, .DOF, .PAS, and .DFM. <strong>The</strong><br />

only file <strong>MKS</strong> recommends you do not archive is a project’s .DSK file.<br />

This file changes frequently and is usually specific to each<br />

developer's working environment.<br />

Of course, you can always put any file under version control,<br />

whether or not it is a part of the Delphi project.<br />

To add new members to a <strong>Source</strong> <strong>Integrity</strong> project, use the Add<br />

Member function in the Project Window, or choose the Add Project<br />

Members command in the Delphi Workgroups menu to add new<br />

members to a <strong>Source</strong> <strong>Integrity</strong> project.<br />

You should also archive Help documents and other related files, such<br />

as specifications and databases, with your projects. This procedure,<br />

combined with checkpointing your projects, enables you to recreate<br />

old releases of your entire project including the documentation.<br />

When you are finished, click OK. You are prompted to save the<br />

project.<br />

224 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Creating a<br />

Sandbox<br />

For more on creating<br />

<strong>Source</strong> <strong>Integrity</strong> sandboxes<br />

using the extensions, see<br />

“Using the Extensions” on<br />

page 209.<br />

Checking Out<br />

Files<br />

To create a sandbox in Delphi:<br />

Choose Workgroups > Create SI Sandbox.<br />

<strong>The</strong> Create Sandbox dialog box appears.<br />

To check out files in Delphi:<br />

<strong>The</strong> Borland Delphi Extension<br />

1. Bring the file you want to check out into focus in the Delphi<br />

environment.<br />

2. Choose Workgroups > Check Out.<br />

If this file is a form or its associated .pas file, both the .dfm and<br />

.pas files will be checked out. If you have selected Show Dialog in<br />

Configuration, the Check Out dialog box appears. Otherwise, the<br />

member revision is checked out.<br />

3. Fill in or modify options in the dialog box as you like, and click<br />

OK to check out the file. To cancel the check-out operation, click<br />

Cancel.<br />

Alternatively, you may check out a single file by selecting it in the<br />

<strong>Source</strong> <strong>Integrity</strong> Project Window, and selecting Check Out via the<br />

right-click context menu, Member menu or speed bar. This method<br />

will ignore the relationship between a Delphi Unit’s .pas and .dfm<br />

files, and only check out the selected file.<br />

<strong>User</strong> <strong>Guide</strong> 225


Using Extensions<br />

Checking Out<br />

Multiple Files<br />

Checking In<br />

New Revisions<br />

To check out multiple files in Delphi:<br />

Choose Workgroups > Check Out All Files to check out all available<br />

files in the <strong>Source</strong> <strong>Integrity</strong> project, or select the files you want to<br />

check out from the <strong>Source</strong> <strong>Integrity</strong> Project Window and select<br />

Check Out via the right-click context menu, Member menu, or speed<br />

bar.<br />

Follow the same procedure for checking out individual files and<br />

check All files in the first dialog box. No subsequent dialog boxes will<br />

appear.<br />

To check in new revisions in Delphi:<br />

1. Bring the file you want to check in into focus in the Delphi<br />

environment.<br />

2. Choose Workgroups > Check In.<br />

If this file is a form or its associated .pas file, both the .dfm and<br />

.pas files will be checked in. If you have selected Show Dialog in<br />

Configuration, the Check In dialog box appears. Otherwise, the<br />

file is checked in with the next logical revision number and no<br />

label.<br />

3. Fill in or modify options in the dialog box as you like, and click<br />

OK to check in the file. To cancel the check-in operation, click<br />

Cancel.<br />

226 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Checking In<br />

Multiple Files<br />

<strong>The</strong> Microsoft Windows Explorer Extension<br />

Alternatively, you may check in a single file by selecting it in the<br />

<strong>Source</strong> <strong>Integrity</strong> Project Window, and selecting Check In via the rightclick<br />

context menu, Member menu, or speed bar. This method will<br />

ignore the relationship between a Delphi Unit’s .pas and .dfm files,<br />

and only check in the selected file.<br />

To check in multiple files in Delphi:<br />

Choose Workgroups > Check In All Files to check in all files in the<br />

<strong>Source</strong> <strong>Integrity</strong> project that you currently have locked, or select the<br />

files you want to check in from the <strong>Source</strong> <strong>Integrity</strong> Project Window<br />

and select Check In via the right-click context menu, Member menu, or<br />

speed bar.<br />

Follow the same procedure for checking in individual files and check<br />

All files in the first dialog box. No subsequent dialog boxes will<br />

appear.<br />

<strong>The</strong> Microsoft Windows Explorer Extension<br />

This section describes how to access <strong>Source</strong> <strong>Integrity</strong> through<br />

Microsoft Windows Explorer.<br />

Once you have installed the <strong>Source</strong> <strong>Integrity</strong> Windows Explorer<br />

Extension, the File menu allows you to check in or check out files and<br />

more with a click of your mouse. Right-click a file to reveal the<br />

context menu of <strong>Source</strong> <strong>Integrity</strong> commands you can perform on the<br />

selected file.<br />

To access version control functionality from within Windows<br />

Explorer, select the menu item that corresponds to the<br />

<strong>Source</strong> <strong>Integrity</strong> function you want to perform.<br />

Menu Item Function<br />

Create Archive Places the selected files under version control,<br />

by creating an archive for each file.<br />

Check In Checks in the files you currently have selected<br />

and checked out.<br />

Check Out Checks out the files you currently have selected.<br />

Compare to Head<br />

Rev<br />

Invokes the Visual Difference utility to compare<br />

the selected working file with that member’s<br />

head revision.<br />

<strong>User</strong> <strong>Guide</strong> 227


Using Extensions<br />

Creating an<br />

Archive<br />

Menu Item Function<br />

Compare to Locked<br />

Rev<br />

Invokes the Visual Difference utility to compare<br />

the selected working file with a revision in its<br />

archive locked in your name.<br />

Compare Files When two files are selected, this command<br />

launches the Visual Difference utility with the<br />

two files displayed side-by-side in a Compare<br />

window.<br />

Archive Window Opens the Archive window, displaying<br />

information about the archive of the currently<br />

selected file.<br />

Disable Menu Disables the Windows Explorer Extensions. To<br />

enable them, choose Enable Menu.<br />

To create an archive in Windows Explorer:<br />

1. Select the files you want to place under version control, and<br />

choose <strong>Source</strong> <strong>Integrity</strong> > Create Archive from the right-click<br />

context menu.<br />

<strong>The</strong> Create Archive dialog box appears.<br />

2. If you want, enter an initial Archive Description to associate with<br />

the archive.<br />

3. Fill in or modify the available options, and click OK to create an<br />

archive for each selected file.<br />

228 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Checking Out<br />

Files<br />

Checking In<br />

New Revisions<br />

<strong>The</strong> Microsoft Windows Explorer Extension<br />

4. To cancel the create archive operation for an individual file, click<br />

Cancel. To abort the operation for all files, click Cancel All.<br />

To check out files from Windows Explorer:<br />

1. Select the files you want to check out.<br />

2. Choose <strong>Source</strong> <strong>Integrity</strong> > Check Out from the right-click context<br />

menu.<br />

3. Fill in or modify options in each dialog box as you like. To apply<br />

settings to all files, enable All files in the first dialog box. No<br />

subsequent dialog boxes will appear.<br />

4. Click OK to check out the files. To cancel the check-out operation<br />

for an individual file, click Cancel when its dialog box appears.<br />

To abort the operation for all files, click Cancel All.<br />

To check in new revisions from Windows Explorer:<br />

1. Select the files you want to check in.<br />

2. Choose <strong>Source</strong> <strong>Integrity</strong> > Check In from the right-click context<br />

menu. This option will not be available if any selected file cannot<br />

be checked in at present.<br />

<strong>User</strong> <strong>Guide</strong> 229


Using Extensions<br />

3. Fill in or modify options in each dialog box as you like. To apply<br />

settings to all files, enable All files in the first dialog box. No<br />

subsequent dialog boxes will appear.<br />

4. Click OK to check in the files. To cancel the check-in operation for<br />

an individual file, click Cancel when its dialog box appears. To<br />

abort the operation for all files, click Cancel All.<br />

230 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Building Projects With<br />

<strong>Source</strong> <strong>Integrity</strong><br />

For more information about<br />

<strong>MKS</strong> Make, see Chapter 9,<br />

“Using the <strong>MKS</strong> Make<br />

Utility”.<br />

For more information about<br />

command line interface<br />

commands, see the <strong>Source</strong><br />

<strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong><br />

Reference <strong>Guide</strong> or the online<br />

man pages.<br />

8<br />

This chapter provides information about building projects from<br />

source code under <strong>Source</strong> <strong>Integrity</strong> control.<br />

With <strong>Source</strong> <strong>Integrity</strong>’s support for the build process and<br />

configuration options, you can use it with your existing build<br />

program or <strong>MKS</strong> Make, which is included with <strong>Source</strong> <strong>Integrity</strong>.<br />

<strong>Source</strong> <strong>Integrity</strong> can:<br />

examine your source files<br />

track file dependencies and update your makefile<br />

interpret “include” statements for C, C++, FORTRAN, Pascal,<br />

and Assembler<br />

use templates that include configuration language and<br />

conditionally interpreted sections to create makefiles<br />

Note <strong>Source</strong> <strong>Integrity</strong>’s building features are not available in the <strong>Source</strong><br />

<strong>Integrity</strong> Web Interface.<br />

<strong>User</strong> <strong>Guide</strong> 231


Building Projects With <strong>Source</strong> <strong>Integrity</strong><br />

Before You Build<br />

During your project build, you should follow some guidelines. If you<br />

are building within your own sandbox, these guidelines are not as<br />

important, but they are still useful.<br />

Note If you want to create a sandbox to perform a build, you should use<br />

a build sandbox instead of a conventional one. For information about<br />

build sandboxes, see “Build Sandboxes” on page 25 and “Creating a<br />

Sandbox” on page 76.<br />

<strong>The</strong> guidelines are:<br />

Check to see whether any users have any project members<br />

locked. If a member is checked out locked, there may be work<br />

still in progress.<br />

Recursively freeze all of your members. This will prevent any<br />

changes from taking place while checkpointing. Otherwise, it is<br />

quite possible with hundreds of project members that one will<br />

change its member revision in the middle of your checkpoint<br />

operation. Remember, developers can continue to check in<br />

revisions, without modifying the member revision.<br />

Checkpoint the project to create a new revision of the project<br />

itself. Assign it a label that will allow you to identify the build.<br />

For example, from the project or sandbox directory enter<br />

pj checkpoint -N Release_1<br />

from the command line interface, or open the project in the<br />

Windows interface and choose Project > Checkpoint. This creates<br />

a new revision in the master project archive. By archiving the<br />

project, you guarantee that you will be able to duplicate the build<br />

precisely at any time in the future. This can make it easier to<br />

identify members that have changed later.<br />

Create a build sandbox workspace based on the checkpointed<br />

revision. Working in a build sandbox will allow you to compile<br />

your program, label members, and change members’ states<br />

without disrupting other developers.<br />

You can also label each member with the<br />

pj label -N Release_1<br />

command in the command line interface. In the Windows<br />

interface, you can add a label to members when you checkpoint<br />

232 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Creating a Makefile<br />

Creating a Makefile<br />

the project or select the members in the Project window and<br />

choose Member > Label. This will serve as a reference point when<br />

viewing archive information or <strong>Source</strong> <strong>Integrity</strong> reports.<br />

Thaw the master project to allow developers to continue work.<br />

Your build sandbox workspace allows you to continue the build<br />

process uninterrupted.<br />

If a high-priority bug appears in the build, a developer can make<br />

a variant sandbox and fix it there. Later, the developer can merge<br />

the changes into the head revisions to continue the main project.<br />

<strong>The</strong> pj mkmf command allows you to calculate the dependencies of<br />

project members and uses them to generate a makefile before you<br />

build your project. <strong>The</strong> makefile it generates can be created from<br />

scratch, or it can be based on an existing makefile or template.<br />

where<br />

pj mkmf [options] [-fR] [-M makefile] [-T template] [file…]<br />

-f forces pj mkmf to ignore any saved information and rebuild all<br />

dependencies before generating a makefile<br />

-R recursively applies this operation to any directories specified<br />

on the command line<br />

-M makefile updates the makefile rather than generating a new one<br />

-T template uses a template to generate a new makefile<br />

file includes the names of one or more project members<br />

dependencies will be calculated for. If omitted, all project<br />

members are used<br />

If -M makefile is omitted, the value of the policy option Makefile is<br />

used. If neither is defined, the makefile is written to a file named<br />

makefile in the current directory.<br />

If -T template is not specified, <strong>Source</strong> <strong>Integrity</strong> uses the value of the<br />

policy option MakeTemplate as a template file. If MakeTemplate is not<br />

set, <strong>Source</strong> <strong>Integrity</strong> uses a makefile called make.t (if it exists) as a<br />

template.<br />

<strong>User</strong> <strong>Guide</strong> 233


Building Projects With <strong>Source</strong> <strong>Integrity</strong><br />

Building<br />

As well, if the -T template option is not used to specify a makefile<br />

template, a marker line is inserted in the makefile immediately before<br />

the generated dependencies. <strong>The</strong> marker takes the form<br />

### <strong>MKS</strong> SI generated dependencies follow,<br />

do not remove/change this line<br />

If pj mkmf encounters a marker line while updating a makefile, all<br />

lines after the marker are replaced with the newly calculated<br />

dependencies.<br />

In the command line interface, use the pj build command to run<br />

your configuration builder program.<br />

In the Windows interface, choose Project > Build to open a dialog box<br />

you can set parameters in and run your build program.<br />

As well as setting parameters for the build process itself, you can<br />

generate makefile dependencies using <strong>Source</strong> <strong>Integrity</strong>’s built-in<br />

dependency-checking functions.<br />

To generate dependencies in your makefile, click Recalculate. If there<br />

are any problems in scanning the “include” statements, <strong>Source</strong><br />

<strong>Integrity</strong> reports them.<br />

After recalculating the dependencies, click Add to Makefile to add the<br />

new recipes to the makefile.<br />

234 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Object File<br />

Associations<br />

Building<br />

If any targets depend upon files that are not <strong>Source</strong> <strong>Integrity</strong> project<br />

members, you can quickly add the files by clicking Add Missing Files.<br />

By default, <strong>Source</strong> <strong>Integrity</strong> builds your project using <strong>MKS</strong> Make.<br />

You can specify the command that builds your product with the<br />

Build option for the project.<br />

Depending upon the platform where it runs, <strong>Source</strong> <strong>Integrity</strong> makes<br />

some default associations between source files and object files.<br />

On PC platforms, it assumes source files with the extensions<br />

.c .cpp .asm .f .for .p .pas<br />

compile to object files with the extension .obj.<br />

On UNIX systems, it assumes source files with the extensions<br />

.c .C .cpp .s .asm .p .pas .f .for<br />

compile to object files with the .o extension.<br />

In addition, on PC platforms <strong>Source</strong> <strong>Integrity</strong>’s default assumption is<br />

that files with a .rc extension generate resource (.res) files.<br />

If your project uses files or processors with different extensions, you<br />

can define your own rules with the project attribute TargetExt. Your<br />

newly defined rules will completely replace <strong>Source</strong> <strong>Integrity</strong>’s default<br />

associations. For example, to use a .xp extension for Pascal files and a<br />

.c extension for C files, you should use the following command to set<br />

TargetExt<br />

pj set TargetExt=xp-obj;c-obj<br />

Note You may need to quote arguments for your command processor.<br />

For more details, refer to the section on <strong>MKS</strong> Make in the <strong>Source</strong> <strong>Integrity</strong><br />

<strong>Professional</strong> <strong>Edition</strong> Reference <strong>Guide</strong>.<br />

<strong>User</strong> <strong>Guide</strong> 235


Building Projects With <strong>Source</strong> <strong>Integrity</strong><br />

Template Files<br />

Language<br />

Statements<br />

Conditional<br />

Expansion<br />

<strong>The</strong> most powerful and flexible way to generate makefiles is by<br />

specifying a template makefile with the -T template option to the<br />

pj mkmf command. Makefile templates are text files that may contain<br />

any number of make statements<br />

<strong>Source</strong> <strong>Integrity</strong> configuration language statements and variables<br />

the @Depends template statement<br />

the @Template statement<br />

Using these components, you can develop makefile templates for any<br />

project; you can even generate multiple makefiles from the same<br />

template by conditionalizing the expansion of template entries.<br />

<strong>Source</strong> <strong>Integrity</strong> makefile templates may contain appropriate<br />

statements from the <strong>Source</strong> <strong>Integrity</strong> configuration language.<br />

Language statements are included by prefixing them with an at sign<br />

(@) identifier, for example<br />

@set var=value<br />

@echo string<br />

Note When configuration language statements are used in a template<br />

file, the @ prefix must be the first character (excluding white space) in the<br />

line where it appears.<br />

Enter @@ (two at sign characters) in your template file to expand to a<br />

literal @ character in a generated makefile.<br />

<strong>The</strong> expansion of template entries can be made conditional with the<br />

if..elseif..endif configuration language construct. In makefile<br />

templates its syntax is<br />

@if expr<br />

statement_1<br />

statement_2<br />

[@elseif expr<br />

statement_3<br />

statement_4]<br />

@endif<br />

236 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


@Depends<br />

@Template<br />

Variables<br />

Template Files<br />

Makefile statements included in the if/elseif/endif construct are<br />

not prefixed with an @ character; the statements are only copied to the<br />

new makefile if the conditional expr resolves to true.<br />

<strong>The</strong> @Depends configuration statement is used to generate the first<br />

line of a make rule, in the format<br />

target : [dependency_file…]<br />

where dependency_file is zero or more project member file names<br />

dependencies will be calculated for. If dependency_file is omitted,<br />

dependencies are calculated for all project members.<br />

Like standard <strong>Source</strong> <strong>Integrity</strong> configuration language statements,<br />

@Depends statements must be entered as individual lines in the<br />

template file, with the @ character as the first non-white space<br />

character on the line.<br />

<strong>The</strong> statement<br />

@Template filename<br />

in a makefile template “reads in” the contents of filename as if it were<br />

part of the template.<br />

Like standard <strong>Source</strong> <strong>Integrity</strong> configuration language statements,<br />

@Template statements must be entered as individual lines in the<br />

template file, with the @ character as the first non-white space<br />

character on the line.<br />

Any <strong>Source</strong> <strong>Integrity</strong> configuration variable can be included in a<br />

template file by bracketing it with @ characters, using the form<br />

@var@<br />

where var is the name of the variable that will be expanded to its<br />

value in the generated makefile. Unlike configuration language<br />

statements, variable references may be included anywhere in a<br />

makefile, not just at the beginning of a line.<br />

In addition to standard configuration variables, templates may also<br />

include special template variables that expand to lists of file names<br />

(based on recognizable file extensions from <strong>Source</strong> <strong>Integrity</strong>’s default<br />

list, or your definition of TargetExt) when the makefile is generated.<br />

<strong>User</strong> <strong>Guide</strong> 237


Building Projects With <strong>Source</strong> <strong>Integrity</strong><br />

<strong>The</strong> following table lists special template variables:<br />

Reserved Word Expands To<br />

@<strong>Source</strong>s@ A list of project members with source file<br />

extensions. If any member is included by another<br />

member, it is added to @Headers@ rather than this<br />

list. When used from a sandbox environment, file<br />

names use sandbox file mapping conventions.<br />

@Headers@ A list of header files. Header files are project<br />

members that are included by a source file.<br />

@Objects@ A list of object files that will be generated by the<br />

makefile. File names in the list are based on<br />

@<strong>Source</strong>s@ with the appropriate object file<br />

extension added. Files included by any other<br />

source file are not included in this list. File names in<br />

this list contain no path qualification.<br />

@ProjectFiles@ A list of project members. When used from a<br />

sandbox environment, names in the list use<br />

sandbox file-mapping conventions.<br />

Template variables are expanded like any other configuration<br />

variable. However, if a name in the list causes the list to exceed 70<br />

characters, the list is printed across multiple lines using the following<br />

algorithm:<br />

1. No portion of the file name that causes a line to exceed column 70<br />

is printed on the current line.<br />

2. <strong>The</strong> current line is terminated with a backslash (\).<br />

3. A new line is begun, starting with three blank spaces and the<br />

offending file name.<br />

4. Steps 1 to 3 are repeated until the complete list has been printed.<br />

Files that are included by any other file are not added to @Objects@<br />

list. This ensures that inappropriate targets are not generated by your<br />

make utility.<br />

Example<br />

Consider the source file control.asm, with a line<br />

include defines.asm<br />

238 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Examples<br />

<strong>The</strong> Build<br />

Process<br />

<strong>Source</strong> <strong>Integrity</strong> does the following:<br />

Examples<br />

adds the source file control.asm to the @<strong>Source</strong>s@ list, but does<br />

not add defines.obj to the @Objects@ list, since it is included<br />

by control.asm; instead, defines.asm appears in the<br />

@Headers@ list<br />

adds control.obj to the @Objects@ list, if it is not included by<br />

any other source file; the make utility can then apply its rules to<br />

create control.obj from control.asm and defines.asm<br />

If you have a project containing the classic “Hello, world!” program<br />

#include <br />

main(){<br />

printf(“Hello, world!\n”);<br />

}<br />

you can set up the project so you can build it using <strong>MKS</strong> Make:<br />

1. Set the include variable to tell <strong>Source</strong> <strong>Integrity</strong> where to look for<br />

included files (c:\wcc\include):<br />

pj set include=c:\wcc\include<br />

This list can contain more than one directory, separated by<br />

semicolons. If more than one directory is specified, the include<br />

path must be enclosed in quotes:<br />

pj set include=”c:\wcc\include;g:\project\include”<br />

2. Create a makefile that contains the recipe to build the target. In<br />

this example, the trivial header file dependency is left out:<br />

hello.exe: hello.obj<br />

cc -o hello.exe hello.obj<br />

3. Add the dependencies to the makefile using pj mkmf. (For<br />

instance, hello.obj depends upon a file called fin_func.h.<br />

<strong>The</strong>se lines are added to the makefile (the first line has been<br />

folded to fit on the page):<br />

### <strong>MKS</strong> SI generated dependencies follow,<br />

do not remove/change this line<br />

hello.obj : c:\wcc\include\fin_func.h<br />

<strong>User</strong> <strong>Guide</strong> 239


Building Projects With <strong>Source</strong> <strong>Integrity</strong><br />

Templates and<br />

Configuration<br />

Language<br />

Templates and<br />

Variable<br />

Expansion<br />

4. You could also add those included files as members of the project<br />

with the pj finddep command:<br />

c:\usr\work\hello.c depends on:<br />

c:\wcc\include\fin_func.h<br />

Add ‘c:\wcc\include\fin_func.h’ to project?<br />

[ynq](y):<br />

To add the file, press .<br />

This procedure only needs to be done once for each project, although<br />

the makefile will have to be updated (with pj mkmf) if new members<br />

are added to the project. You should also<br />

add the makefile as a member of the project<br />

put the makefile under revision control<br />

To build the project, simply give the command pj build.<br />

If SYSTEM is defined in the environment as “nt”<br />

@@<br />

@set OS=$getenv(SYSTEM)<br />

@OS@<br />

TEXT@OS@TEXT<br />

Line one expands to a literal @ character.<br />

Line two sets a variable named OS to “nt” but does not produce<br />

any output in the makefile.<br />

Line three produces a line in the expanded makefile containing<br />

the value of the variable OS (in this example, “nt”).<br />

Line four produces a line in the makefile containing the text<br />

TEXTntTEXT<br />

If a template named base.t contains the following lines<br />

@set version=1<br />

@set system=$getenv(SYSTEM)<br />

# Generated @SYSTEM@ makefile, Version @version@<br />

OBJ=@Objects@<br />

target.exe: $(OBJ)<br />

bcc -o $@@ $(OBJ)<br />

@Depends<br />

and the environment variable SYSTEM is set to “nt”, running the<br />

command<br />

pj mkmf -T base.t -M makefile<br />

240 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


creates a new makefile with the contents<br />

# Generated nt makefile, Version 1<br />

OBJ=control.obj<br />

target.exe: $(OBJ)<br />

bcc -o $@ $(OBJ)<br />

control.obj: control.asm defines.asm<br />

Examples<br />

<strong>User</strong> <strong>Guide</strong> 241


Building Projects With <strong>Source</strong> <strong>Integrity</strong><br />

242 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Using the <strong>MKS</strong> Make<br />

Utility<br />

9<br />

<strong>MKS</strong> Make offers developers, project managers and authors an<br />

efficient way to automate the production and maintenance of any<br />

project, large or small. Whenever you make changes to an element of<br />

a development project, <strong>MKS</strong> Make automatically re-compiles all<br />

related files and no others, saving valuable time and eliminating<br />

errors.<br />

For example, suppose you build a program from several separate<br />

object modules, each depending upon its own source file. If you<br />

change a source file, <strong>MKS</strong> Make automatically determines which<br />

object modules are out of date (that is, older than the corresponding<br />

source files), recompiles the changed source files, and links the<br />

component object modules to produce an updated version of the<br />

program.<br />

In large, complex projects, where a change to one file may necessitate<br />

changes in many others, it is easy to lose track. <strong>MKS</strong> Make eliminates<br />

the worry of manually keeping your project up to date. Just give it a<br />

list of interdependent files and a description of how to rebuild each,<br />

and <strong>MKS</strong> Make takes care of the rest.<br />

<strong>User</strong> <strong>Guide</strong> 243


Using the <strong>MKS</strong> Make Utility<br />

Compatibility Issues<br />

For details on these features,<br />

see the man page for the make<br />

command.<br />

Getting the<br />

Right Make<br />

<strong>The</strong> Make utility originated under the UNIX operating system.<br />

<strong>MKS</strong> Make tracks the POSIX standard. POSIX is an evolving family of<br />

standards that describe a wide variety of operating system<br />

components (ranging from shell and utility interfaces to system<br />

administration). While POSIX has been influenced heavily by UNIX,<br />

it is not UNIX (indeed many UNIX-based systems do not conform to<br />

the POSIX standard). POSIX is important because it encourages crossplatform<br />

compatibility. With your version of <strong>MKS</strong> Make, you can<br />

create portable makefiles that work on operating systems<br />

manufactured by IBM, Hewlett Packard, DEC, and Microsoft, or any<br />

others that follow the POSIX standard.<br />

<strong>MKS</strong> Make also conforms with UNIX versions to the greatest extent<br />

possible, and makefiles that work with a UNIX make have the same<br />

behavior when used with <strong>MKS</strong> Make. <strong>MKS</strong> Make also has many<br />

additional, useful features that are extensions to the POSIX<br />

guidelines.<br />

Most C compilers come with their own version of make. <strong>The</strong>re are<br />

many reasons to believe <strong>MKS</strong> Make is superior to these other<br />

versions. For the time being, be aware that your system may already<br />

have a version of make from some other source. If you run a make<br />

command and it does not behave the way our documentation says,<br />

you might be running one of the other versions.<br />

If you are using the <strong>MKS</strong> KornShell, part of <strong>MKS</strong> Toolkit, you can<br />

find out which version of make you are running by using the which<br />

command, as in the example<br />

which make<br />

<strong>The</strong> reply should look like the following for each operating system:<br />

$ROOTDIR/mksos2/make.exe on OS/2<br />

$ROOTDIR/mksnt/make.exe on Microsoft Windows NT and<br />

Windows 95<br />

Since $ROOTDIR represents the contents of the ROOTDIR environment<br />

variable, $ROOTDIR actually appears as ROOTDIR’s value. If you are<br />

not running <strong>MKS</strong> Make and you want to do so, simply change your<br />

search order to include the directory with <strong>MKS</strong> Make before the<br />

directory containing another make executable.<br />

244 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Search Order<br />

For more information about<br />

search order, see the<br />

documentation for your<br />

operating system.<br />

Changing Your<br />

Search Order<br />

See your operating system<br />

documentation for more<br />

information on changing your<br />

path search order.<br />

Compatibility Issues<br />

Whenever you use a program, the system must locate a file<br />

containing the program you want to run. It does this using the PATH<br />

search order.<br />

You can install <strong>MKS</strong> Make into any directory in your path, or change<br />

your search order to accommodate a new directory for <strong>MKS</strong> Make.<br />

To display your search order under command.com or cmd.exe, use the<br />

command<br />

path<br />

If you are working in the <strong>MKS</strong> KornShell (sh.exe), use<br />

print -r $PATH<br />

which displays a list of directory names separated by semicolons.<br />

When you issue a make command, the command interpreter searches<br />

for a make program in each of these directories, in the order they<br />

appear.<br />

<strong>MKS</strong> Make is usually installed under<br />

the $ROOTDIR/mksos2 directory on OS/2 systems<br />

the $ROOTDIR/mksnt directory on Windows 95 and Windows NT<br />

systems<br />

If the command interpreter finds one of the other make programs<br />

before it finds <strong>MKS</strong> Make, it runs that one instead.<br />

If you find out that the system is running one of the other make<br />

programs, there are two ways to fix the problem. First, you can<br />

explicitly tell your command interpreter to run the correct version of<br />

make by specifying the appropriate path to the program. For example,<br />

you can type one of the following commands with the rest of the make<br />

command line:<br />

c:\mksos2\make on OS/2<br />

c:\mksnt\make on Windows NT and Windows 95<br />

A second (and better) solution is to change your search order. On<br />

OS /2 systems, you change your search order by changing your<br />

initial configuration files or the value of PATH. On Windows NT and<br />

Windows 95 systems, you change your search order by changing<br />

your initial configuration files, changing the user registry database<br />

(on NT only), or changing the value of the PATH (PATH under NT’s<br />

cmd.exe) environment variable.<br />

<strong>User</strong> <strong>Guide</strong> 245


Using the <strong>MKS</strong> Make Utility<br />

Getting Started With <strong>MKS</strong> Make<br />

Dependency of<br />

Files<br />

To use <strong>MKS</strong> Make, you require a makefile. A makefile contains a list of<br />

rules. Rules describe the dependencies among files that you want<br />

<strong>MKS</strong> Make to maintain. A rule may also specify the commands—or<br />

recipes—for rebuilding files when required.<br />

You create makefiles as simple text files, so you can use your favorite<br />

text editor or word processor to create and edit them. You must make<br />

certain you save the files without any embedded word processor<br />

formatting characters (such as changes in font); <strong>MKS</strong> Make cannot<br />

interpret these special characters.<br />

You must also ensure the editor you use does not translate the <br />

control character into a group of spaces (make signals the beginning<br />

of recipe lines with the character). Most editors allow you to<br />

turn off the translation feature or insert a literal <br />

character.<br />

When you run the make program, it processes the makefile, checking<br />

each rule for files you have recently modified. If make finds such a<br />

file, it may also discover a dependent file that has not been rebuilt<br />

since your modifications to the first file. If this is the case, make<br />

proceeds to process the recipe associated with the dependent file‘s<br />

particular rule.<br />

<strong>The</strong> word dependency implies that a file may depend upon another<br />

file or files for some reason. <strong>MKS</strong> Make refers to files that depend on<br />

others as targets. It refers to the files a target depends on as<br />

prerequisites. <strong>The</strong> same file can be a prerequisite, and later a target, in<br />

the same makefile. If you modify a prerequisite file, make discovers it<br />

needs to rebuild its associated target file. If you remove a target file,<br />

make takes the steps necessary to recreate it.<br />

When a file that is a prerequisite for a target is modified, or recently<br />

changed, that file’s target is considered to be out of date with respect<br />

to that prerequisite.<br />

<strong>The</strong> makefile describes the dependency relationships of targets and<br />

prerequisites. Each rule identifies a target file, and specifies the<br />

target’s prerequisite file(s). <strong>The</strong> rules’ recipes describe any actions<br />

<strong>MKS</strong> Make must take if it discovers an out-of-date target.<br />

246 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Makefiles<br />

Getting Started With <strong>MKS</strong> Make<br />

At this point, an example may help explain these concepts. This<br />

example is purposefully larger than necessary and somewhat limited.<br />

Later in this chapter, you can learn how to make your makefiles more<br />

useful and compact. <strong>The</strong> contents of a sample makefile for a small<br />

program, using the Borland C++ compiler are:<br />

program.exe : main.obj func.obj<br />

bcc -eprogram.exe -ml main.obj func.obj<br />

main.obj: main.c<br />

bcc -c -ml main.c<br />

func.obj: func.c<br />

bcc -c -ml func.c<br />

If you want the same makefile using the Microsoft C/C++ compiler,<br />

you might write<br />

program.exe : main.obj func.obj<br />

cl -AL main.obj func.obj -o program.exe<br />

main.obj: main.c<br />

cl -c -AL main.c<br />

func.obj: func.c<br />

cl -c -AL func.c<br />

For the Watcom C/C++ compiler, it might look like<br />

program.exe : main.obj func.obj<br />

wcl -ml -fe=program.exe main.obj func.obj<br />

main.obj: main.c<br />

wcc -c -ml main.c<br />

func.obj: func.c<br />

wcc -c -ml func.c<br />

With all three compilers, the form of the makefile is similar. For the<br />

sake of convenience, this chapter looks at the Borland C++ example<br />

more closely, but what follows applies to all versions equally.<br />

<strong>The</strong> makefile consists of three rules. <strong>The</strong> first rule in the Borland<br />

example looked like<br />

program.exe : main.obj func.obj<br />

bcc -eprogram.exe -ml main.obj func.obj<br />

<strong>The</strong> first line in this rule states that the file program.exe depends<br />

upon the two .obj files that follow the colon. If any or all of the .obj<br />

files have changed since the last time program.exe was made,<br />

<strong>MKS</strong> Make attempts to remake it. It does this using the recipe on the<br />

next line. This recipe consists of the Borland C bcc command that<br />

links program.exe from the two object files.<br />

<strong>User</strong> <strong>Guide</strong> 247


Using the <strong>MKS</strong> Make Utility<br />

Writing a Rule<br />

For more information about<br />

special targets that are not<br />

files, see “Special Macros” on<br />

page 271.<br />

However, before <strong>MKS</strong> Make remakes program.exe, it checks to see if<br />

any of the .obj files need remaking. To do this, it checks the other<br />

rules in the makefile to determine the dependencies of the .obj files.<br />

If any of the .obj files need remaking (because their associated .c<br />

files have been changed), <strong>MKS</strong> Make remakes the .obj files first<br />

using the bcc command. It then makes program.exe.<br />

<strong>MKS</strong> Make updates each target file (the program.exe file, and all the<br />

.obj files) by executing the recipe that follows the appropriate file.<br />

<strong>The</strong> previous example showed a collection of simple rules. All of the<br />

rules follow a consistent format:<br />

target target… : prerequisite prerequisite…<br />

recipe<br />

<strong>MKS</strong> Make accepts rules with much more complex formats, but this<br />

example uses just this simple form.<br />

<strong>The</strong> term target usually refers to a file made from other files. Each rule<br />

may have several targets. <strong>MKS</strong> Make also recognizes a number of<br />

special targets that are not files.<br />

<strong>The</strong> prerequisites consist of a list of files (each rule may also have<br />

more than one prerequisite). <strong>The</strong> targets depend directly or indirectly<br />

on these files; if any of the files change, the targets require remaking.<br />

<strong>The</strong> prerequisite list appears on the same line as the targets, separated<br />

from the targets by the colon rule operator.<br />

Consider the following example:<br />

func1.obj func2.obj : includes.h<br />

bcc -c -ml func1.c<br />

bcc -c -ml func2.c<br />

<strong>The</strong> rule in the example describes a dependency between a header file<br />

(the prerequisite) and the object files that use it (the targets). If you<br />

change the prerequisite file includes.h, you must update both target<br />

files, func1.obj and func2.obj. Notice that you do not need to<br />

express the dependency between the header file and the source files,<br />

as the contents of the object files depend, in turn, upon the source<br />

files.<br />

<strong>The</strong> recipe consists of one or more commands <strong>MKS</strong> Make uses to<br />

remake the target(s) when necessary. <strong>The</strong> recipe usually begins on the<br />

line following the target and prerequisite list. A recipe can consist of<br />

248 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Getting Started With <strong>MKS</strong> Make<br />

any number of lines. Each and every line in the recipe must begin<br />

with a character. A line that does not begin with a <br />

signals the start of a new rule.<br />

Note A common cause of syntax errors results from makefiles with<br />

leading blank characters at the beginning recipe lines.<br />

In the interests of efficiency, <strong>MKS</strong> Make executes most recipe lines<br />

itself. However, a recipe line may contain a character special to your<br />

command interpreter or shell (for example, the > and < redirection<br />

symbols). In these cases, <strong>MKS</strong> Make calls the command interpreter or<br />

shell to execute the line, so the special characters are handled<br />

properly.<br />

File Names Containing a Colon<br />

Occasionally, the names of target files may contain a colon.<br />

a:file<br />

Usually, <strong>MKS</strong> Make interprets a colon as a rule operator—the mark<br />

separating the target names from the prerequisite list. To avoid<br />

confusion, use quotes to enclose any file name that contains a colon:<br />

"a:program.exe" : "a:main.obj" func1.obj…<br />

recipe<br />

Usually, however, you specify all file names relative to the current<br />

directory, so you do not need to include a drive specifier (or colon).<br />

White Space<br />

White space consists of one or more blanks or characters.<br />

White space separates the names of items in a target or prerequisite<br />

list. You can also surround the colon between the target list and the<br />

prerequisite list with white space; however, you do not have to.<br />

You can also insert blank lines wherever you want in a makefile. make<br />

ignores blank lines when it reads the makefile.<br />

<strong>User</strong> <strong>Guide</strong> 249


Using the <strong>MKS</strong> Make Utility<br />

Comments<br />

More About<br />

Rules<br />

Continuation Lines<br />

Using a backslash character (\) as the last character of a line indicates<br />

the line is not finished—that it continues on to the next line of the file.<br />

<strong>The</strong> first two lines in the following example have the same meaning<br />

as the third:<br />

target list : \<br />

prerequisite list<br />

target list : prerequisite list<br />

You might find this useful if the length of a list makes it impossible to<br />

fit everything on one line. You can do this several times. A single line<br />

can be broken into any number of continuation lines.<br />

Note Always use a backslash to continue a line, whether you use the<br />

<strong>MKS</strong> KornShell, command.com, or cmd.exe.<br />

A makefile can contain comments. A comment begins with a sharp<br />

character (#), and extends to the end of the line. Consider the<br />

following example:<br />

# This is a comment line<br />

target : prerequisite #This is another comment<br />

recipe # One more comment<br />

<strong>MKS</strong> Make ignores all comments.<br />

So far, this chapter has given a simple description of what rules in a<br />

makefile look like. All rules use the following general format (for a<br />

complete description, see the man page for the make command).<br />

targets [attr] oprtr [prereqs] [;recipe]{ recipe}<br />

targets A list of one or more files.<br />

attr A list, possibly empty, of attributes to apply to the targets. For<br />

more information, see “Controlling <strong>MKS</strong> Make” on page 265.<br />

oprtr A rule operator, separating the targets from the associated<br />

prerequisites. Usually this is a colon, but <strong>MKS</strong> Make supports a<br />

number of other rule operators for specific purposes. For more<br />

information, see the online command reference for the make<br />

command.<br />

250 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Missing Rules<br />

Getting Started With <strong>MKS</strong> Make<br />

prereqs Zero or more file names the specified targets depend on.<br />

recipe May appear on the same line as the prerequisites, following<br />

them, and separated by a semicolon. If such a recipe exists,<br />

<strong>MKS</strong> Make uses it as the first in a list of recipe lines defining a<br />

method for remaking target. Additional recipe lines may follow<br />

the first line of the rule. Each additional recipe line must begin<br />

with a character.<br />

If <strong>MKS</strong> Make cannot find a rule for a particular target, it displays this<br />

message on the standard error stream:<br />

Make: Don’t know how to make target<br />

If it cannot find a rule for a particular prerequisite and the file named<br />

by that prerequisite does not already exist, the same message is<br />

displayed.<br />

More About Recipes<br />

Recipes are lists of lines used by <strong>MKS</strong> Make to rebuild the target(s)<br />

listed in the associated rule. A rule may have zero or more recipe<br />

lines. Comments and empty lines are ignored when recipes are read.<br />

When <strong>MKS</strong> Make is reading recipes and encounters a line that does<br />

not begin with a character, it assumes the previous rule has<br />

finished and a new one has begun.<br />

Command Prefixes<br />

You can begin any recipe line with a command prefix immediately<br />

following the character. <strong>MKS</strong> Make supports the following<br />

three command prefixes:<br />

- (dash) Ignore non-zero exit values when executing this recipe<br />

line. Use this when you want to use a command in a recipe<br />

that may not return a proper (zero) exit value when it<br />

succeeds.<br />

@ (at sign) Inhibits the echoing of a recipe line to the standard output<br />

prior to its execution. Use this if a recipe line sends<br />

messages to standard output, and you do not want to<br />

clutter the output stream.<br />

+ (plus sign) Forces execution of the recipe line, even if the -n, -q, or -<br />

t options are specified on the command line.<br />

<strong>User</strong> <strong>Guide</strong> 251


Using the <strong>MKS</strong> Make Utility<br />

For more information, see the<br />

man page for the make<br />

command.<br />

Running <strong>MKS</strong> Make<br />

Specifying<br />

Targets on the<br />

Command Line<br />

Using a<br />

Different<br />

Makefile<br />

You can use more than one command prefix with a recipe line,<br />

provided they are grouped together, immediately following the<br />

character. You may put the prefixes for a recipe in any order,<br />

for example:<br />

-@ echo "rebuilding foo"<br />

To run <strong>MKS</strong> Make, enter<br />

make<br />

at the command line. By default, <strong>MKS</strong> Make expects to find your<br />

makefile in the current directory with the name makefile or<br />

Makefile. Once it finds your makefile, <strong>MKS</strong> Make checks to see if the<br />

first target has become out of date with respect to its prerequisites. As<br />

part of this process, it first looks to see if the prerequisites themselves<br />

require remaking. <strong>MKS</strong> Make rebuilds all the files it needs to<br />

properly rebuild the first target.<br />

Often, you might find it useful to put an artificial rule at the<br />

beginning of your makefile, naming all the targets you remake most<br />

frequently.<br />

herring : prerq1 prerq2…<br />

<strong>The</strong> target file in the example (named herring) does not exist, but<br />

when <strong>MKS</strong> Make tries to rebuild it, it automatically checks each one<br />

of its prerequisites to determine whether they require rebuilding.<br />

If you specify the names of specific targets on the command line,<br />

<strong>MKS</strong> Make attempts to remake only the targets you specify. Again, it<br />

first attempts to rebuild any prerequisites (associated with your<br />

specified targets) that have become out of date with respect to any<br />

files they depend on.<br />

In the following example, make rebuilds the given object files, should<br />

they require it.<br />

make func1.obj func2.obj<br />

If you give your makefile a name other than makefile, or place it in a<br />

separate directory, you usually have to specify its name. You do this<br />

with the -f option, for example:<br />

make -f foo.mk<br />

252 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> Command<br />

Line<br />

You can combine options to make, as in the example<br />

make -f foo.mk func1.obj func2.obj<br />

Running <strong>MKS</strong> Make<br />

<strong>The</strong> previous sections gave you a glimpse of <strong>MKS</strong> Make’s versatility.<br />

You can specify a number of options and items on the command line<br />

to modify its behavior. In general, your command lines should<br />

conform to the format<br />

make [options] [macro definitions] [target…]<br />

You can specify a number of options on the command line. Options<br />

take the form of a single letter, prefixed with a dash. <strong>MKS</strong> Make<br />

distinguishes between uppercase and lowercase on the command<br />

lines, so it would treat the -e option and the -E option differently.<br />

If you want to specify several options on the same command line, you<br />

can bundle them together following a single dash. For example<br />

make -n -u<br />

make -nu<br />

are considered identical.<br />

Some options require an additional argument, as you saw previously<br />

with the -f option. You can bundle one of these options with others<br />

on the command line; however, it must appear last in the bundle, to<br />

allow for its argument. <strong>The</strong>se lines are considered identical:<br />

make -nuf foo.bar<br />

make -n -u -f foo.bar<br />

You may also append an argument directly to an option, although<br />

this syntax is now obsolete<br />

make -nuffoo.bar<br />

<strong>The</strong> following table briefly explains some of the most common<br />

command-line options. For the complete list of options, see the man<br />

page for the make command.<br />

<strong>User</strong> <strong>Guide</strong> 253


Using the <strong>MKS</strong> Make Utility<br />

For more information on the<br />

-D option, see the man page<br />

for the make command. For<br />

more information on macros,<br />

see “Using Macros” on<br />

page 256.<br />

How Make<br />

Finds Its<br />

Makefile<br />

Option Description<br />

-f file Uses file as the makefile. If you specify a dash in place of file,<br />

<strong>MKS</strong> Make reads the makefile from standard input. In other<br />

words, it expects you to type in the makefile from the keyboard,<br />

or redirect it from a file.<br />

-k Makes all independent targets, even if an error occurs.<br />

Ordinarily, processing stops after a command in a recipe<br />

produces an error. Specifying -k forces <strong>MKS</strong> Make to continue<br />

making other targets, provided they are unrelated to the one<br />

associated with the error.<br />

-n Displays all the commands needed to update the chosen<br />

targets, but does not execute them. Use this to check that your<br />

makefile does exactly what you expect it to do, without actually<br />

affecting any of your files.<br />

-u Rebuilds all the targets whether their prerequisites have<br />

changed or not. Use this to guarantee that everything gets<br />

rebuilt at the same time, whether needed or not.<br />

Any macro definitions you specify on the command line have the<br />

same form as macro definitions in a makefile, and supersede<br />

definitions in the makefile or default rules file. You can place macro<br />

definitions anywhere on the command line, even after the names of<br />

targets.<br />

You can also define macros on the command line with the -D option.<br />

This option forces <strong>MKS</strong> Make to use these macro definitions before<br />

reading any makefile.<br />

When you run <strong>MKS</strong> Make, it uses information from a number of<br />

different sources. <strong>The</strong> following subsections describe each source of<br />

information in the order used by make.<br />

254 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For more information on the<br />

control macros, see<br />

“Controlling <strong>MKS</strong> Make” on<br />

page 265.<br />

Built-in Rules<br />

Running <strong>MKS</strong> Make<br />

<strong>MKS</strong> Make contains a number of built-in rules. <strong>The</strong>se rules may<br />

evolve somewhat from release to release. You cannot change them<br />

yourself. You can display the built-in rules for your version of make,<br />

with the -V option.<br />

Note <strong>The</strong> POSIX standard refers to default rules as built-in rules. <strong>MKS</strong><br />

uses the term built-in to emphasize the difference between the provided<br />

rules that you cannot configure (built-in) and those that you can<br />

(default).<br />

Default Rules<br />

Default rules are specified in the standard startup file. By default,<br />

<strong>MKS</strong> Make looks for a file called $ROOTDIR/etc/startup.mk, to use<br />

as its startup file. You can specify a different name for the startup file<br />

by setting a value for the MAKESTARTUP environment variable, or by<br />

giving the MAKESTARTUP control macro a value on the command line<br />

as an argument to the -D option.<br />

You can edit the contents of the startup file with a normal text editor.<br />

When you install <strong>MKS</strong> Make, a startup file is provided for you in<br />

$ROOTDIR/etc/startup.mk. You should not customize this file until<br />

you are familiar with <strong>MKS</strong> Make and know how to modify its<br />

behavior. If you delete this file or put incorrect material into it,<br />

<strong>MKS</strong> Make does not work as documented.<br />

Local Default Rules<br />

<strong>The</strong> last line of the default startup file prompts <strong>MKS</strong> Make to include<br />

a file called startup.mk in the current directory. If this file exists,<br />

<strong>MKS</strong> Make reads it next. Once you are more familiar with<br />

<strong>MKS</strong> Make, you may want to create different local default rules files<br />

for different projects.<br />

Makefile<br />

Lastly, under the direction of its built-in rules, <strong>MKS</strong> Make looks for a<br />

file called makefile in the current directory. If no such file exists, it<br />

looks for a file called Makefile in the current directory. If it cannot<br />

find either file, it displays a message and stops.<br />

You can specify a makefile with a different name, or in a different<br />

directory, by using the -f option, as previously described.<br />

<strong>User</strong> <strong>Guide</strong> 255


Using the <strong>MKS</strong> Make Utility<br />

Using Macros<br />

Suppose you use <strong>MKS</strong> Make to maintain a C program that you are<br />

compiling. Most compilers let you compile programs in accordance<br />

with several memory models. <strong>The</strong> Borland C++ compiler, for<br />

example, provides this ability with the -ms, -mc, -mm, -ml, and -mf<br />

options. Other compilers have similar options.<br />

You need to compile all the program modules with the same memory<br />

model options, so you could write your makefile like the one in<br />

following example for the Borland C++ compiler.<br />

module1.obj : module1.c<br />

bcc -ms -c module1.c<br />

module2.obj : module2.c<br />

bcc -ms -c module2.c<br />

# And so on<br />

<strong>The</strong>se commands all use the small memory model. <strong>The</strong>y also make<br />

use of the -c option, which compiles the source code without linking<br />

it.<br />

Now suppose your program grows to the point that the small<br />

memory model is no longer appropriate. You would need to go back<br />

to your makefile and change all the -ms references into one of the<br />

larger models. This task is time-consuming and error-prone. You may<br />

easily miss one of the recipes that require changing, or make a typing<br />

mistake while you are editing the file.<br />

Macros help solve this problem. A macro is a symbol that represents a<br />

string of text. When <strong>MKS</strong> Make encounters a macro in your makefile,<br />

it replaces the macro symbol with its predefined value (the text<br />

string). This process of replacement is called expansion. You can define<br />

a macro at the top of your makefile, by using a line with the format<br />

macro_name = text_string<br />

Later on in your makefile, you can use this macro to replace its text<br />

string equivalent. To force <strong>MKS</strong> Make to expand the value of a macro,<br />

you surround it with a dollar sign and either parentheses or braces.<br />

or<br />

$(macro_name)<br />

${macro_name}<br />

256 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Using Macros<br />

Refer back to the previous memory model example. You can use<br />

macros to represent explicit references to the memory model, the<br />

compiler name, and so on.<br />

CC = bcc<br />

CFLAGS = -ms<br />

O = .obj<br />

module1$(O) : module1.c<br />

$(CC) -c $(CFLAGS) module1.c<br />

module2$(O) : module2.c<br />

$(CC) -c $(CFLAGS) module2.c<br />

# And so on<br />

You create a macro in the first line named CC, and assign it the<br />

command name that invokes your compiler.<br />

On the second line, you create the macro CFLAGS, and assign it the<br />

options you want your compiler to use.<br />

On the third line is an example of a common practice used with<br />

<strong>MKS</strong> Make—the assignment of your system’s object file extension to<br />

the O macro (the letter O, not zero). This macro is useful for helping to<br />

ensure the portability of your makefiles across platforms. Object files<br />

typically employ .obj as the object file extension on PCs. On POSIX<br />

and UNIX platforms, object files typically use .o as the object file<br />

extension. Notice that our definition of the O macro includes the dot<br />

as well as the extension name. We do this so the makefile can work on<br />

platforms that do not use an extension for object files at all (and thus,<br />

have no dot in object file names).<br />

This convention is also used for the A and E macros, which expand to<br />

the archive library and executable file extensions, respectively. <strong>The</strong><br />

examples in this chapter use these macros; the default rules file<br />

provided when you installed <strong>MKS</strong> Make defines values appropriate<br />

to your system.<br />

Now, when you run <strong>MKS</strong> Make with this makefile, it expands all the<br />

occurrences of $(CC) and $(CFLAGS), replacing the macro references<br />

with the strings you have defined at the top of the file.<br />

To change the options you pass to the compiler, you only have to<br />

make a single change—the value assigned to the CFLAGS macro at the<br />

top of the makefile. You can even switch to a different compiler by<br />

changing the value of CC to indicate the command name for the new<br />

compiler. Adding the new options you need to pass to your new<br />

compiler is easy; you have just learned how to do that. You do not<br />

ever have to touch the rules in the body of the makefile; you only<br />

need to change the macro assignments at the top.<br />

<strong>User</strong> <strong>Guide</strong> 257


Using the <strong>MKS</strong> Make Utility<br />

Macro Naming<br />

Conventions<br />

Notice that, in the example, the -c option is in the body of the<br />

makefile. You may want some options to take effect all the time and<br />

not change every time the values of your macros change. Be careful<br />

with this practice, though; if you specify values for your macros that<br />

are incompatible with the options you have left in the main body of<br />

your makefile, you may run into problems.<br />

You can use any sequence of standard alphanumeric characters in a<br />

macro name, although the name cannot begin with a digit. You can<br />

also use underscores. You should use uppercase letters in macro<br />

names, as it makes them easy to identify.<br />

Actually, you can use nearly any printable characters in macro names,<br />

except any of the following:<br />

: ; $ { } =<br />

However, your makefiles are much more readable if you use only<br />

uppercase letters, numbers, and the underscore in your macro names.<br />

Since you can nest macro names inside one another (see “Nesting<br />

Macros in other Macros” on page 259), take care when using the<br />

dollar sign in macro values. You must type two dollar signs in<br />

sequence to represent a literal dollar sign when the macro is<br />

expanded. <strong>The</strong> following example shows a macro called DOLLAR,<br />

holding the string for a dollar sign:<br />

DOLLAR = $$<br />

When <strong>MKS</strong> Make expands the DOLLAR macro, it replaces the macro<br />

with a single dollar sign.<br />

You can assign an empty (NULL) string to a macro (<strong>MKS</strong> Make<br />

predefines NULL). You might find this useful with macros that you<br />

only want to use in certain cases. To assign a null value to a macro,<br />

simply leave the right side of the assignment blank.<br />

MY_BLANK_MACRO =<br />

Note that <strong>MKS</strong> Make ignores white space (blanks and tabs) in the<br />

string after the equal sign. To include white space as part of your<br />

macro string, enclose it in double quotes.<br />

Finally, if you create a macro with a single-letter name, <strong>MKS</strong> Make<br />

lets you omit the parenthesis in references to the macro. Thus, if you<br />

use the conventional E macro to hold the your executable file<br />

extension string, you can place $E in the makefile and <strong>MKS</strong> Make<br />

expands this to E’s contents. <strong>The</strong> rest of the examples in this manual<br />

employ this convention.<br />

258 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Defining<br />

Macros on the<br />

Command Line<br />

For more information on the<br />

-D option, see the online<br />

command reference for the<br />

make command.<br />

Nesting Macros<br />

in other Macros<br />

Using Macros<br />

You can define (or redefine) macros anywhere on the make command<br />

line. In the following example, the user defines a macro specifying<br />

the directory containing object modules:<br />

make DIROBJ=/usr/project/obj program.exe<br />

If you define a macro on the command line, the value cannot be<br />

changed by macro definitions in makefiles that are read by the<br />

command. However, you can force <strong>MKS</strong> Make to handle the<br />

command-line macro before reading the makefile with the -D option;<br />

if you use this option to define a macro on the command line, any<br />

definitions made in the makefile overwrite it.<br />

If your command-line macro needs to have white space in it, you<br />

need to surround the entire definition in quotes.<br />

make "FILES= a.c b.c c.c" target1 target2<br />

Note <strong>MKS</strong> Make ignores any leading or trailing white space around the<br />

macro definition, so it treats " FILES = foo bar " and "FILES=foo<br />

bar" as equivalent.<br />

Any macro’s value can contain another macro reference. When<br />

<strong>MKS</strong> Make expands a macro and detects another macro reference in<br />

the replacement string, it automatically expands that reference as<br />

well, for example:<br />

PROJECT = myProj<br />

SRCDIR = $(PROJECT)/src<br />

When make expands the SRCDIR, it notices that another macro string<br />

has appeared, and expands the second macro as well.<br />

/usr/lindsay/$(SRCDIR)<br />

expands first to<br />

/usr/lindsay/$(PROJECT)/src<br />

and expands again to<br />

/usr/lindsay/myProj/src<br />

<strong>User</strong> <strong>Guide</strong> 259


Using the <strong>MKS</strong> Make Utility<br />

For a more useful example, suppose you maintain one set of header<br />

files, but each person working with those header files has their own<br />

directories containing source and object files. You can still have one<br />

makefile to trace the dependency between a header file and each<br />

person’s source files.<br />

# these macros contain the appropriate directories<br />

SRCDIR = $(HOME)/project/src<br />

OBJDIR = $(HOME)/project/obj<br />

HDRDIR = /usr/main/hdr<br />

# makefile rules follow<br />

$(OBJDIR)/module$O : $(HDRDIR)/includes.h<br />

# compile the out of date object file<br />

# from its source<br />

$(CC) -c $(CFLAGS) $(SRCDIR)/module.c<br />

To use this makefile, you would need to specify a command-line<br />

value for HOME on the command line, using the -D option (to assign<br />

the command-line value to HOME before reading the makefile and<br />

performing any macro expansion).<br />

For any value of HOME, you can see that the makefile defines macros<br />

for all the appropriate directories. If HOME is /usr/main, when<br />

<strong>MKS</strong> Make expands the $(SRCDIR) and $(OBJDIR), it also expands<br />

the $(HOME) macro. $(SRCDIR) eventually expands to<br />

/usr/main/project/src<br />

If Lindsay wanted to use the makefile, the following command<br />

would perform the appropriate expansion:<br />

make -DHOME=/usr/lindsay module.obj<br />

or, if Lindsay has exported $HOME in the environment<br />

make -DHOME=$HOME module.obj<br />

Notice that you must name the target explicitly on the command line;<br />

you can not use the O macro. You may define macros on the<br />

command line, but you cannot pass them as part of a target’s name.<br />

You may only use the values assigned to macros within the makefile<br />

itself.<br />

Note If you define a macro on the command line with the -D option,<br />

you may include these macros as components of target names on the<br />

command line. For more information on the -D option, see the man page<br />

for the make command.<br />

260 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For more information on<br />

special target directives (and<br />

.IMPORT in particular), see<br />

“Controlling <strong>MKS</strong> Make” on<br />

page 265, and the online<br />

reference for the make<br />

command.<br />

Modifying<br />

Macro<br />

Expansions<br />

Using Macros<br />

Also notice that Lindsay provided a specific value for HOME on the<br />

command line. To avoid this requirement, you could import a value<br />

for a macro from the environment, with the .IMPORT special target<br />

directive in the makefile.<br />

.IMPORT: HOME<br />

RCDIR = $(HOME)/project/src<br />

and so on…<br />

Note Using .IMPORT this way is not strictly necessary, as <strong>MKS</strong> Make<br />

imports variables from the environment by default.<br />

You can modify the way <strong>MKS</strong> Make expands macros by adding a<br />

colon followed by one or more macro modifiers after the macro<br />

name:<br />

$(macro_name:modifier_list:modifier_list:…)<br />

Each modifier_list consists of one or more characters that tell<br />

<strong>MKS</strong> Make to expand the macro in a specific way. <strong>MKS</strong> Make applies<br />

each macro modifier in the modifier_list from right to left.<br />

For example, if you have a macro called FILE that represents the full<br />

path name of a file, you can use $(FILE:d) to select only the directory<br />

portion of the path name:<br />

FILE = /usr/lindsay/program.c<br />

$(FILE:d)<br />

expands to<br />

/usr/lindsay<br />

You can use uppercase or lowercase letters for macro modifiers; so<br />

both $(FILE:d) and $(FILE:D) would produce /usr/lindsay in the<br />

previous example.<br />

<strong>User</strong> <strong>Guide</strong> 261


Using the <strong>MKS</strong> Make Utility<br />

<strong>The</strong> following table describes some of the modifiers you can use.<br />

Modifier Description<br />

b Use the base file name, without suffix, of a macro string path<br />

name.<br />

d Use the directory portion of a path name. This modifier gives a<br />

dot for path names that do not have explicit directories.<br />

f Use the full file name portion, with suffix, of a path name.<br />

l Convert all characters in the macro string to lowercase.<br />

s Perform string substitution. For more information, see “String<br />

Substitution” on page 262.<br />

t Expand the macro into tokens. For more information, see<br />

“Tokenization” on page 263.<br />

u Convert all characters in the macro string to uppercase.<br />

^ Add a prefix string to each token in the macro string. For more<br />

information, see “Prefix and Suffix Modifiers” on page 264.<br />

+ Append a suffix string to each token in the macro string. For<br />

more information, see “Prefix and Suffix Modifiers” on<br />

page 264.<br />

String Substitution<br />

<strong>The</strong> substitution modifier differs slightly from standard modifiers.<br />

Use the substitution modifier to search for all occurrences of a<br />

substring in the macro string and replace them with another<br />

substring. <strong>The</strong> format of the substitution modifier is:<br />

:s/string/replace/<br />

Using the macro definition for FILE from the previous section.<br />

$(FILE:s/lindsay/dale/)<br />

expands to<br />

/usr/dale/program.c<br />

You can apply the substitution modifiers with other modifiers, and<br />

<strong>MKS</strong> Make applies the modifiers in order from left to right. For<br />

example<br />

$(FILE:s/lindsay/dale/:d)<br />

262 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


expands to<br />

/usr/dale<br />

Using Macros<br />

You can use any printing character in place of the slash to delimit the<br />

pattern and replacement substrings, as long as you use it consistently<br />

within the command. For example<br />

$(FILE:s~lindsay~dale~:d)<br />

expands to<br />

/usr/dale<br />

For compatibility with UNIX System V make, <strong>MKS</strong> Make also<br />

supports the suffix replacement modifier. This modifier, when used<br />

according to the following example, replaces any occurrences of<br />

old_suffix with new_suffix.<br />

$(macro_name:old_suffix=new_suffix)<br />

Notice that the string replacement only applies to file suffixes.<br />

Consider the example<br />

FILE = /usr/lindsay/src/parse.y<br />

$(FILE:.y=.c)<br />

expands to<br />

/usr/lindsay/src/parse.c<br />

Tokenization<br />

<strong>MKS</strong> Make interprets any sequence of non-white space characters as<br />

a token. <strong>The</strong> format of the tokenization modifier is<br />

$(macro:t"string")<br />

<strong>The</strong> construct expands the given macro, inserting string between<br />

tokens. This process is called tokenization. Consider the example<br />

LIST = a b c<br />

$(LIST:t"+")<br />

expands to<br />

a+b+c<br />

Notice that <strong>MKS</strong> Make places the + between each pair of tokens, but<br />

not after the last one.<br />

<strong>User</strong> <strong>Guide</strong> 263


Using the <strong>MKS</strong> Make Utility<br />

You can use a number of special escape sequences in the separator<br />

string. <strong>The</strong> following table describes each one’s effect.<br />

Escape<br />

Sequence<br />

Effect<br />

\" "<br />

\\ \<br />

In this example, using the previous definition of LIST<br />

$(LIST:t"+\n")<br />

expands to<br />

a+<br />

b+<br />

c<br />

Prefix and Suffix Modifiers<br />

You use prefix and suffix modifiers to add a string to the beginning or<br />

end of each space separated token in the macro string, according to<br />

the form<br />

$(macro_name:^"prefix_string")<br />

$(macro_name:+"suffix_string")<br />

In an example using the TEST macro<br />

TEST = main func1 func2<br />

$(TEST:^"/src/")<br />

expands to<br />

\a Alert (bell sound)<br />

\b Backspace<br />

\f Formfeed<br />

\n Newline<br />

\r Carriage Return<br />

\t Horizontal Tab<br />

\v Vertical Tab<br />

\nnn Octal Character nnn<br />

/src/main /src/func1 /src/func2<br />

264 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


and<br />

$(TEST:+".c")<br />

expands to<br />

main.c func1.c func2.c<br />

Controlling <strong>MKS</strong> Make<br />

If the prefix and suffix strings themselves consist of a list of tokens<br />

separated by blanks, the resulting expansion provides the cross<br />

product of both lists. Consider the following example using a<br />

different value for the TEST macro.<br />

TEST = a b c<br />

$(TEST:^"1 2 3")<br />

expands to<br />

and<br />

1a 1b 1c 2a 2b 2c 3a 3b 3c<br />

$(TEST:+"1 2 3")<br />

expands to<br />

a1 b1 c1 a2 b2 c2 a3 b3 c3<br />

If you combine these two references<br />

$(TEST:^"1 2 3":+"1 2 3")<br />

expands to<br />

Controlling <strong>MKS</strong> Make<br />

For a complete technical<br />

description, see the man page<br />

for the make command.<br />

Attributes<br />

1a1 1b1 1c1 2a1 2b1 2c1 3a1 3b1 3c1<br />

1a2 1b2 1c2 2a2 2b2 2c2 3a2 3b2 3c2<br />

1a3 1b3 1c3 2a3 2b3 2c3 3a3 3b3 3c3<br />

This chapter has covered a few ways to control the way <strong>MKS</strong> Make<br />

proceeds when rebuilding a file. To really control its behavior, you<br />

need to understand how to use attributes, special targets, and special<br />

macros.<br />

This section introduces you to these concepts and describes some<br />

commonly used examples.<br />

Attributes represent qualities that you can attach to targets. When<br />

make updates a target, it triggers any attributes associated with that<br />

target.<br />

<strong>User</strong> <strong>Guide</strong> 265


Using the <strong>MKS</strong> Make Utility<br />

You can assign attributes to a single target, a group of targets, or to all<br />

targets in a makefile. You can use several forms when including<br />

attributes in your makefiles. Both of the following examples assign<br />

the attributes specified in attribute_list to each of the targets.<br />

targets attribute_list : prerequisites<br />

attribute_list : targets<br />

You can also write a rule with an attribute_list on the left side, and<br />

with no targets on the right side.<br />

attribute_list :<br />

This applies all attributes in the list to every target in the makefile.<br />

Traditional versions of make may let you do this with .IGNORE<br />

attribute, but not with any other attribute.<br />

<strong>The</strong> following table describes a number of commonly used attributes.<br />

For a complete list, see the man page for the make command.<br />

Attribute Description<br />

.EPILOG Inserts shell epilog code when executing a group recipe<br />

associated with any target having this attribute set.<br />

.IGNORE Ignores any errors encountered when trying to make a<br />

target.<br />

.PRECIOUS Does not remove this target under any circumstances. Any<br />

automatically inferred prerequisite inherits this attribute. By<br />

default, <strong>MKS</strong> Make removes intermediate targets that did<br />

not exist before it began execution.<br />

.PROLOG Inserts shell prolog code when executing a group recipe<br />

associated with any target having this attribute set.<br />

266 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Special Target<br />

Directives<br />

Attribute Description<br />

Controlling <strong>MKS</strong> Make<br />

.SETDIR Changes current working directory to pathname when<br />

making associated targets. You use this attribute with the<br />

following syntax:<br />

.SETDIR=pathname<br />

If pathname contains any colons, you must quote the entire<br />

attribute string, not just the path name.<br />

While .SETDIR might be necessary to work with primitive<br />

commands that do not understand directories, you may<br />

find it awkward and troublesome. You should use<br />

the.SOURCE special target directive described in the next<br />

section, “Special Target Directives”.<br />

.SILENT Does not echo the recipe line, and does not issue any<br />

warnings when making a target with this attribute. This is<br />

equivalent to placing the @ command prefix before every<br />

recipe line in the rule.<br />

You can use any attribute with any target (including some special<br />

targets). If you specify an attribute that cannot be used with a<br />

particular special target, <strong>MKS</strong> Make issues a warning and ignores the<br />

attribute. Some combinations serve no useful purpose (for example,<br />

.INCLUDE with .PRECIOUS). You might find other combinations quite<br />

useful.<br />

Special target directives, or simply special targets, appear in the<br />

target position of rules, but are not really targets. <strong>The</strong>y act as<br />

keywords that provide directives to control they way <strong>MKS</strong> Make<br />

functions. A rule with a special target may not have any other targets<br />

(normal or special); however, you can assign attributes to special<br />

targets. Some combinations serve no purpose, but others are useful<br />

(for example, combining the .IGNORE attribute with the .INCLUDE<br />

special target, as shown in the previous section).<br />

<strong>User</strong> <strong>Guide</strong> 267


Using the <strong>MKS</strong> Make Utility<br />

<strong>The</strong> following table describes a number of commonly used special<br />

target directives. For a complete list, see the man page for the make<br />

command.<br />

Target<br />

Description<br />

Directive<br />

.EXPORT Treats all the prerequisites associated with this target<br />

as macro names. <strong>MKS</strong> Make then exports these<br />

macros and their values to the environment as<br />

environment variables, at the point in the makefile<br />

where it reads the rule. <strong>The</strong> following example builds a<br />

source directory macro from the HOME macro, and then<br />

exports that value to the user’s environment.<br />

SRCDIR=$HOME/project/src<br />

.EXPORT : SRCDIR<br />

# exports SRCDIR to the environment<br />

<strong>MKS</strong> Make ignores any attributes associated with this<br />

target. It exports the specified value to the environment<br />

when it reads the rule, but does not execute any<br />

commands until it finishes reading the entire makefile.<br />

This means that if you .EXPORT a value more than<br />

once in a makefile, only the last value affects executed<br />

commands.<br />

.IMPORT Make searches in the environment for prerequisite<br />

names specified for this target and defines them as<br />

macros with their value taken from the environment. If<br />

the prerequisite .EVERYTHING is given, make reads in<br />

the entire environment.<br />

268 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Target<br />

Directive<br />

Description<br />

Controlling <strong>MKS</strong> Make<br />

.INCLUDE Process one or more additional makefiles, as if their<br />

contents had been inserted at this point. <strong>MKS</strong> Make<br />

behaves as if the contents of the additional makefile<br />

were inserted after the line where it finds this special<br />

target. You specify these extra makefiles as<br />

prerequisites to the .INCLUDE special target. If the<br />

prerequisite list contains more than one file, they are<br />

read from left to right. <strong>The</strong> following example tells<br />

<strong>MKS</strong> Make to look for an additional set of default rules<br />

in the users personal project directory:<br />

.INCLUDE : $HOME/project/startup.mk<br />

make uses the following rules to search for extra<br />

makefiles:<br />

If a relative file name is enclosed in quotes, or is not<br />

enclosed with angle brackets (< and >), look in the<br />

current directory. If the file is not present, look in each<br />

directory specified by the .INCLUDEDIRS special<br />

target.<br />

If a relative name is enclosed with angle brackets<br />

(< and >), search only in the directories specified by<br />

the .INCLUDEDIRS special target.<br />

If an absolute path name is given, look for that file<br />

and ignore the list associated with the<br />

.INCLUDEDIRS special target. An absolute path<br />

name could be any one of<br />

./foo.c<br />

/foo.c<br />

/src/foo.c<br />

c:/foo.c<br />

c:/src/foo.c<br />

If <strong>MKS</strong> Make cannot find a file, it normally issues an<br />

error message and terminates; however, if you have<br />

associated the .IGNORE attribute with this special<br />

target, it just ignores the missing file error. <strong>The</strong><br />

.IGNORE attribute is the only one that serves a<br />

meaningful purpose when associated with<br />

.INCLUDE.<br />

For compatibility with <strong>MKS</strong> Make on UNIX System V,<br />

the following two lines produce equivalent results.<br />

include file #at beginning of a line<br />

.INCLUDE: file<br />

<strong>User</strong> <strong>Guide</strong> 269


Using the <strong>MKS</strong> Make Utility<br />

Target<br />

Directive<br />

Description<br />

.INCLUDEDIRS Specifies a list of prerequisites that define the<br />

directories to search when trying to include a makefile<br />

with the .INCLUDE special target. <strong>The</strong> following<br />

example looks for .INCLUDE files in a central admin<br />

directory, then in a central source directory, then in a<br />

personal source directory.<br />

.INCLUDEDIRS : /etc /rd/src $HOME/project<br />

.POSIX Process the makefile as specified in the POSIX.2<br />

standard. If present, this special target must appear on<br />

the first non-comment line in the makefile. This target<br />

may have no associated prerequisites or recipes. Use<br />

this when you need to ensure your makefiles’ portability<br />

to any other POSIX-based platform.<br />

Using this special target has the following effects.<br />

Causes <strong>MKS</strong> Make to always use a separate<br />

instance of the shell to execute each recipe line,<br />

instead of trying to run the commands directly.<br />

Disables any brace expansion, and ignores any<br />

instance of the .BRACEEXPAND special target. For<br />

more information about the deprecated<br />

.BRACEEXPAND special target, see the man page for<br />

the make command.<br />

Disables metarule inferencing.<br />

Disables conditionals.<br />

Disables the use of dynamic prerequisites.<br />

Disables the use of group recipes.<br />

Restricts library prerequisites to explicitly named<br />

members. For more information, see the description<br />

of the .NOAUTODEPEND special target in the online<br />

reference for the make command.<br />

Checks only the archive when checking the time<br />

stamp on a library module; it does not check for an<br />

object file.<br />

Prevents make from checking for the string $(MAKE)<br />

when you specify the -n option on the command line.<br />

270 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Special Macros<br />

Target<br />

Directive<br />

Description<br />

Controlling <strong>MKS</strong> Make<br />

.SOURCE Check the list of directories, defined by the associated<br />

prerequisite list, when trying to locate a target file<br />

name. <strong>The</strong> following example checks a user’s personal<br />

source directory first, and then a central one.<br />

.SOURCE : $HOME/project/src /rd/src<br />

For more information, see “How Make Finds Files” on<br />

page 277.<br />

.SOURCE.x When trying to locate a file with a name ending in the<br />

suffix .x, search first in the list of directories defined by<br />

the associated prerequisite list. <strong>The</strong> following example<br />

directs make to look in two different sets of directories<br />

for source and object file targets.<br />

.SOURCE$O : $HOME/project/object /rd/object<br />

.SOURCE.c : $HOME/project/src /rd/src<br />

.SUFFIXES When inferring a rule using suffix rules, the list of valid<br />

suffixes is defined by this target’s associated<br />

prerequisite list. If you specify the special target more<br />

than once, <strong>MKS</strong> Make adds each list of suffixes to a<br />

single list, in the order they appear. <strong>The</strong> following<br />

example specifies four valid suffixes for use with suffix<br />

rules.<br />

.SUFFIXES : y .c $O $E<br />

To clear the list, specify this special target with an<br />

empty prerequisite list. <strong>The</strong> .SUFFIXES special target<br />

has no effect on metarule inferencing.<br />

For additional information, see “Suffix Rules” on<br />

page 286.<br />

Special macros usually behave like macros, except they can hold<br />

special kinds of information. <strong>MKS</strong> Make supports two kinds of<br />

special macros; control macros and runtime macros.<br />

Control macros control <strong>MKS</strong> Make’s behavior. A control macro<br />

having the same function as an attribute, also has the same name.<br />

<strong>MKS</strong> Make defines the runtime macros during the process of making<br />

targets. Runtime macros usually only serve a useful purpose within<br />

recipes; they can expand to contain the name of prerequisites or<br />

targets within recipes. Dynamic prerequisite macros (a special type of<br />

<strong>User</strong> <strong>Guide</strong> 271


Using the <strong>MKS</strong> Make Utility<br />

runtime macro), however, serve a useful function when used in<br />

prerequisite lists; they can refer to the associated target’s name (in<br />

full, or in part).<br />

Control Macros<br />

<strong>MKS</strong> Make groups control macros into two sets: string-valued macros<br />

and attribute macros.<br />

<strong>MKS</strong> Make automatically creates internally defined macros. For<br />

example, you can use $(PWD) to expand to the name of the present<br />

working directory.<br />

<strong>The</strong> following table describes some of the most useful string valued<br />

macros. For a complete list, see the online command reference for the<br />

make command.<br />

Macro Description<br />

DIRSEPSTR Defined internally, provides the characters that you can<br />

use to separate components in a path name.<br />

On UNIX and POSIX systems, this macro simply contains<br />

the slash character (/).<br />

On Windows 95/NT, and OS/2 systems, the startup.mk<br />

file redefines DIRSEPSTR, according to the value you<br />

specify for your SHELL environment variable. If the SHELL<br />

variable is undefined, and COMSPEC is set, then the startup<br />

file redefines DIRSEPSTR to contain a backslash, a<br />

forward slash, and a colon (\/:). If you run <strong>MKS</strong> Make<br />

with -r (so startup.mk is not read), or if SHELL is<br />

defined, or if both SHELL and COMSPEC are undefined,<br />

then the DIRSEPSTR special macro contains a string<br />

consisting of forward slash, a backslash, and a colon (/<br />

\:). If <strong>MKS</strong> Make finds it necessary to make a path name,<br />

it uses the first character of DIRSEPSTR to separate path<br />

name components.<br />

NULL Defined internally, expands to an empty string. Use this for<br />

comparisons in conditional expressions, and in<br />

constructing metarules without ambiguity.<br />

For more information, see “Using Inference Rules” on<br />

page 281.<br />

OS Defined internally, expands to the name of the operating<br />

system.<br />

OSVERSION Defined internally, expands to a string giving the major<br />

version of your current operating system.<br />

272 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For more information, see<br />

“Attributes” on page 265.<br />

Macro Description<br />

Attribute Macros<br />

Controlling <strong>MKS</strong> Make<br />

OSRELEASE Defined internally, expands to a string giving the release<br />

number of your current operating system.<br />

<strong>The</strong> attribute macros let you turn global attributes on and off. You use<br />

the macros by assigning them a value. If you assign a NULL value to<br />

the macro, make turns off the associated attribute. If you assign a non-<br />

NULL value to the macro, <strong>MKS</strong> Make turns on the associated<br />

attribute and gives all targets that attribute.<br />

<strong>The</strong> following macros correspond to attributes of the same name:<br />

.EPILOG<br />

.PRECIOUS<br />

.PROLOG<br />

.SILENT<br />

PWD Defined internally, expands to the full path name of the<br />

present working directory (that is, the directory that<br />

<strong>MKS</strong> Make considers the current directory).<br />

SHELL Set by the default rules and may be changed by you,<br />

expands to the full path to the executable image used as<br />

the shell (command interpreter) when processing singleline<br />

recipes. You must define this macro if you use recipes<br />

that require execution by a shell.<br />

<strong>The</strong> default rules assign a value to this macro by<br />

inspecting the value of the SHELL environment variable. If<br />

this variable has no value, <strong>MKS</strong> Make gives it the value of<br />

the COMSPEC environment variable.<br />

SWITCHAR Defined internally, expands to the switch character<br />

currently used to mark command-line options.<br />

<strong>User</strong> <strong>Guide</strong> 273


Using the <strong>MKS</strong> Make Utility<br />

Runtime Macros<br />

<strong>MKS</strong> Make expands runtime macros when it carries out the recipes<br />

that contain them. Except for dynamic prerequisite macros, runtime<br />

macros do not produce useful values if placed outside recipes. <strong>The</strong><br />

following table describes the expansions for the runtime macros.<br />

Macro Description<br />

$@ <strong>The</strong> full name of the target, when building a normal target.<br />

When building a library, it expands to the name of the archive<br />

library (for example, if you specify the target as<br />

mylib(member), $@ expands to mylib).<br />

$% Also the full name of the target, when building a normal target.<br />

When building a library, it expands to the name of the archive<br />

member. With a target of mylib(member), $% expands to<br />

member.<br />

$* <strong>The</strong> target name, with no suffix. This macro produces the same<br />

value as $(%:db).<br />

$> <strong>The</strong> name of the library, if the current target is a library member.<br />

With a target of mylib(member), $> produces the string<br />

mylib.<br />

$^ <strong>The</strong> list of prerequisites given in the current rule (that is, the rule<br />

associated with the recipe that <strong>MKS</strong> Make is executing).<br />

$& <strong>The</strong> list of all prerequisites in all rules that apply to the current<br />

target. In :: rules, $& produces the same strings as $^.<br />

$? <strong>The</strong> list of all prerequisites in all rules associated with the<br />

current target, which are newer than that target or which need<br />

to be created. However, in double colon rules (rules with the ::<br />

rule operator) this macro produces the same string as the $<<br />

macro.<br />

$< Similar to $?, except it produces only those prerequisites that<br />

prompt the execution of the current rule (not all changed<br />

prerequisites associated with a single target). In normal rules,<br />

the expansions contains the list of all changed prerequisites in<br />

the current rule. In inference rules, however, it always contains<br />

the single prerequisite of the executing rule. In rules using the<br />

:! operator, this macro produces the current changed<br />

prerequisite. For more information on rule operators, see the<br />

man page for the make command.<br />

$$ Produces a single dollar sign ($).<br />

274 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For more information on<br />

using libraries, see “Making<br />

Libraries” on page 293.<br />

Examples<br />

Controlling <strong>MKS</strong> Make<br />

<strong>The</strong> following examples help make the use of runtime macros a little<br />

more clear. This first example begins with a simple pair of rules (to<br />

ensure the portability of this example across platforms, it uses the<br />

predefined macro, O, to represent the suffix string your system uses<br />

for object files).<br />

a$O : a.c<br />

a$O : b.h c.h<br />

recipe for making a’s object file<br />

Assuming that a.c and c.h have recently changed, and that b.h has<br />

not changed since the last time you built a$O, when <strong>MKS</strong> Make<br />

executes the recipe for making a$O, the runtime macros expand to the<br />

following values:<br />

$@ a$O<br />

$% a$O<br />

$* a<br />

Note that <strong>MKS</strong> Make would further expand the $@ macro’s<br />

expansion, to produce the value for the O macro.<br />

Next, here is an example of a library target.<br />

mylib$A(mem1$O) :<br />

recipe<br />

When <strong>MKS</strong> Make rebuilds mylib$A, the appropriate runtime macros<br />

would produce the following values:<br />

<strong>User</strong> <strong>Guide</strong> 275<br />

$><br />

$^ b.h c.h<br />

$& a.c b.h<br />

c.h<br />

$? a.c c.h<br />

$< c.h<br />

$@ mylib$A<br />

$% mem1$O<br />

$* mem1


Using the <strong>MKS</strong> Make Utility<br />

For more information on<br />

dynamic prerequisites, see the<br />

man page for the make<br />

command.<br />

Dynamic Prerequisite Macros<br />

You can use a number of the runtime macros to create dynamic<br />

prerequisites. When <strong>MKS</strong> Make encounters dynamic prerequisite<br />

macros in the prerequisite list of a rule, it expands them when it<br />

attempts to update the target. Only a few runtime macros produce<br />

meaningful results when you use them as dynamic prerequisite<br />

macros.<br />

To construct a dynamic prerequisite macro, you place an additional<br />

dollar sign in front of the runtime macro reference. <strong>The</strong> following<br />

table explains the use of two runtime macros as dynamic prerequisite<br />

macros.<br />

Macro Description<br />

$$@ Expands to the target name. If the target is a library, it produces<br />

the name of the archive library. For example, with the macro<br />

project : $$@.c<br />

when <strong>MKS</strong> Make attempts to rebuild the object file, it expands<br />

the $$@ dynamic prerequisite to produce the name of the target,<br />

in this case project. You can make this example more useful<br />

when you modify the value of $$@<br />

project$O : $$(@:b).c<br />

This time, you modify the $$@ macro’s value to select the<br />

basename of the object file (and still produce project). <strong>The</strong> next<br />

example shows a practical use for this macro.<br />

file1 file2 : $$@.c<br />

$(CC) -c $(CFLAGS) $@.c<br />

You can see that, by using the $$@ dynamic prerequisite macro<br />

in conjunction with the $@ runtime macro, you can compact two<br />

rules into one general one. Without the runtime macros, you<br />

would need a separate rule for each of the two files.<br />

$$* Produces the name of the target, but without the suffix. <strong>The</strong><br />

following two rules contain identical prerequisites.<br />

project$O : $$(@:b).c<br />

project$O : $$*.c<br />

You can also use the symbols $$% and $$> to create useful dynamic<br />

prerequisites.<br />

276 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


How Make<br />

Finds Files<br />

Controlling <strong>MKS</strong> Make<br />

Makefiles often specify target names in the shortest manner possible,<br />

relative to the directory that contains the target files. <strong>MKS</strong> Make<br />

possesses sophisticated techniques to search for the file that<br />

corresponds to a target name in a makefile.<br />

Assume that <strong>MKS</strong> Make tries to locate a target with a name in the<br />

format pathname.ext, where .ext is the suffix and pathname is the stem<br />

portion (that is, that part which contains the path and the file name).<br />

When given an relative path name, <strong>MKS</strong> Make uses the following<br />

rules to find the file.<br />

1. Look for pathname.ext relative to the current directory, and use it,<br />

if found.<br />

2. Otherwise, if the .SOURCE.ext special target is defined, search<br />

each directory given in its list of prerequisites for pathname.ext. If<br />

.ext is a NULL suffix (that is, pathname.ext is simply pathname)<br />

use .SOURCE.NULL instead. If found, use that file.<br />

3. If .SOURCE is defined, search each directory in its prerequisite list<br />

for pathname.ext. If found, use that file.<br />

4. If still not found and the target is a member of a library, try to find<br />

the target in that library. This same set of rules is used to bind a<br />

file to the library target at an earlier stage of the makefile<br />

processing.<br />

5. If still not found, the search fails. <strong>MKS</strong> Make returns the original<br />

name pathname.ext.<br />

If at any point the search succeeds, <strong>MKS</strong> Make replaces the name of<br />

the target with the file name it finds, and refers to it by that name<br />

internally.<br />

<strong>The</strong>re is potential here for a lot of search operations. <strong>The</strong> trick is to<br />

define .SOURCE.x special targets with short search lists and leave<br />

.SOURCE undefined, or as short as possible. Initially, <strong>MKS</strong> Make<br />

simply defines .SOURCE as<br />

.SOURCE : .NULL<br />

In this context, .NULL in the prerequisite list prompts <strong>MKS</strong> Make to<br />

search the current directory by default.<br />

<strong>The</strong> search algorithm has the following useful side effect. When<br />

<strong>MKS</strong> Make searches for a target that is a member of a library, it first<br />

searches for the target as an ordinary file. When a number of library<br />

members require updating, you may find it most efficient to compile<br />

<strong>User</strong> <strong>Guide</strong> 277


Using the <strong>MKS</strong> Make Utility<br />

all of them first and to update the library at the end in a single<br />

operation. If one of the members does not compile and <strong>MKS</strong> Make<br />

stops, you can fix the error and run it again.<br />

<strong>MKS</strong> Make does not remake any of the targets it has already<br />

generated object files for, as long as their prerequisite files remain<br />

unchanged.<br />

If the target is a library member, <strong>MKS</strong> Make begins its search for the<br />

target in that library. If it finds the target, it searches for the member<br />

using the search rules. Thus, <strong>MKS</strong> Make first binds library entry<br />

point specifications to a member file, and then checks that member<br />

file to see if it has changed.<br />

If you specify the .SOURCE or .SOURCE.x targets more than once,<br />

<strong>MKS</strong> Make appends all the prerequisites to one list. However, you<br />

can clear the list of prerequisites by specifying the target with a null<br />

prerequisite list. In addition, you can use <strong>MKS</strong> Make’s :- rule<br />

operator to clear a previously set list of path names. Thus, the<br />

following two examples are equivalent.<br />

.SOURCE :<br />

.SOURCE : /usr/fred /usr/gerry<br />

# these two lines are equivalent to the next one<br />

.SOURCE :- /usr/fred /usr/gerry<br />

More generally, the processing of the .SOURCE special targets is<br />

identical to the processing of the .SUFFIXES special targets.<br />

Example: Directory Navigation Within a Makefile<br />

Sometimes you might want to have a recipe run while the directory is<br />

set to something else other than the current directory. <strong>The</strong> .SETDIR<br />

attribute tells make to change the current directory for the duration of<br />

the recipe with the attribute set. Here’s an example:<br />

all: subdir two<br />

echo not in subdir<br />

pwd<br />

# Remember to clean up afterwards by<br />

# removing subdir.<br />

subdir:<br />

mkdir subdir<br />

# Note: We can’t put "subdir" as a prerequisite<br />

# for "two" because subdir has to exist before<br />

# anything to do with "two" is processed.<br />

two .SETDIR=subdir:<br />

echo in subdir<br />

pwd<br />

278 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Controlling <strong>MKS</strong> Make<br />

Note that .SETDIR does not work with metarules. <strong>The</strong> previous<br />

example is written to work with the <strong>MKS</strong> Toolkit. If you do not have<br />

the <strong>MKS</strong> Toolkit installed, then change pwd to cd to display the<br />

current directory.<br />

Example: Including External Makefiles<br />

Make has facilities for including other makefiles into the current<br />

makefile. Normally, make looks in the current directory for these files.<br />

<strong>The</strong> special targets, .INCLUDEDIRS and .INCLUDE, can be used to<br />

inform make to look elsewhere for these files.<br />

<strong>The</strong> following example relates back to the following three makefiles,<br />

two of which are located in the subdirectories 1 and 2.<br />

<strong>The</strong> main makefile:<br />

all: one two<br />

.INCLUDEDIRS: 1<br />

.INCLUDE: <br />

.INCLUDE: 2/2.mak<br />

Makefile 1/1.mak:<br />

one:<br />

echo one<br />

Makefile 2/2.mak:<br />

two:<br />

echo two<br />

<strong>The</strong> “.INCLUDEDIRS” line in makefile tells make where it should look<br />

for makefiles not found in the current directory. In effect,<br />

subdirectory 1 becomes part of the search path for makefiles. <strong>The</strong><br />

“.INCLUDE: ” line in makefile asks make to find the file<br />

1.mak; the “” indicates to make that it should not look in the current<br />

directory for 1.mak but it should look elsewhere in the .INCLUDEDIRS<br />

list of directories. 1.mak is found in the subdirectory 1 so make<br />

includes it. <strong>The</strong> “.INCLUDE: 2/2.mak” line asks make to include the<br />

file 2/2.mak.<br />

After the .INCLUDE’s are replaced by the appropriate files, the<br />

effective makefile would look like this:<br />

all: one two<br />

.INCLUDEDIRS: 1<br />

one:<br />

echo one<br />

two:<br />

echo two<br />

<strong>User</strong> <strong>Guide</strong> 279


Using the <strong>MKS</strong> Make Utility<br />

Another method of indicating which files should be used as<br />

makefiles is to use the .MAKEFILES special target in the startup.mk<br />

file. Consider<br />

.MAKEFILES: $(PWD:f).mk<br />

This tells make to look in the current directory for the makefile, with<br />

the name of the makefile the same as the current directory name (that<br />

is if in src/make, look for make.mk). Adding dependencies using<br />

.MAKEFILES does not override the standard makefile lookup<br />

behavior; it just adds new file names for make to consider as<br />

makefiles. By default, make looks for the file makefile. On UNIX<br />

versions, make also looks for Makefile.<br />

Example: Creating Prologs and Epilogs<br />

With make, you can formulate recipes so that certain processes always<br />

happen before a recipe is run, or after the recipe has completed. This<br />

capability is controlled with the .PROLOG and .EPILOG attributes, and<br />

with the .GROUPPROLOG and .GROUPEPILOG special targets. Consider<br />

the makefile<br />

all: GroupWithProlog GroupWithEpilog<br />

GroupWithBoth NonGroupRecipe<br />

GroupWithProlog .PROLOG .SILENT:<br />

[<br />

echo In prolog group recipe<br />

echo<br />

]<br />

GroupWithEpilog .EPILOG .SILENT:<br />

[<br />

echo In epilog group recipe<br />

]<br />

GroupWithBoth .PROLOG .EPILOG .SILENT:<br />

[<br />

echo In prolog/epilog group recipe<br />

]<br />

.GROUPPROLOG:<br />

echo Running prolog<br />

.GROUPEPILOG:<br />

echo Running epilog<br />

echo<br />

NonGroupRecipe .PROLOG .EPILOG .SILENT:<br />

echo In non group recipe with .PROLOG and .EPILOG<br />

attributes set<br />

280 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Using Inference Rules<br />

For more information, see<br />

“Suffix Rules” on page 286.<br />

Using Inference Rules<br />

<strong>The</strong> .GROUPPROLOG special target defines a special recipe that gets run<br />

before a group recipe runs. Only those group recipes that have the<br />

.PROLOG attribute are so affected; all others behave normally.<br />

Similarly, the .GROUPEPILOG special target defines a special recipe<br />

that gets run after a group recipe runs, again, only for those group<br />

recipes with the .EPILOG attribute.<br />

In the previous example, the targets GroupWithProlog and<br />

GroupWithBoth have the .GROUPPROLOG recipe executed before their<br />

recipes run. <strong>The</strong> targets GroupWithEpilog and GroupWithBoth have<br />

the .GROUPEPILOG recipe executed after their recipes run.<br />

<strong>The</strong> regular recipe NonGroupRecipe has neither special recipe run,<br />

even considering that it has the .PROLOG and .EPILOG attributes.<br />

Prologs and epilogs only apply to group recipes.<br />

Macros present one means for making your makefiles more general.<br />

<strong>MKS</strong> Make has another feature that can help you construct truly<br />

generic makefiles—inference rules. When you make an inference, you<br />

associate a target with a prerequisite by matching specific files<br />

against general patterns and determining whether the target needs<br />

rebuilding.<br />

Inference rules can help you build makefiles to handle general cases.<br />

You can create a single makefile that can check any object file and<br />

rebuild it from its associated source file if it is out of date. <strong>MKS</strong> Make<br />

provides two different kinds of inference rules.<br />

Metarules employ a form similar to normal rules; however, they<br />

describe general methods, not specific procedures.<br />

Other versions of make may not recognize the new metarule format<br />

presented here; instead they use a less general form of inference rules<br />

called suffix rules. For compatibility, <strong>MKS</strong> Make still supports suffix<br />

rules.<br />

When you run <strong>MKS</strong> Make, it searches through the makefile using the<br />

following rules, attempting to find a recipe to rebuild a target. Once a<br />

step succeeds, it skips the subsequent steps.<br />

1. Search all the explicit rules in the makefile for one that matches<br />

the target.<br />

2. Check to see if an appropriate metarule matches the target.<br />

<strong>User</strong> <strong>Guide</strong> 281


Using the <strong>MKS</strong> Make Utility<br />

For more information on how<br />

to use the .DEFAULT special<br />

target, see the man page for<br />

the make command.<br />

Metarules<br />

3. Check to see it an appropriate suffix rule matches the target.<br />

4. Check to see if you have defined the .DEFAULT special target. You<br />

can use this special target to specify a recipe that <strong>MKS</strong> Make<br />

should use when no other rule would apply to a target.<br />

If you have not defined the .DEFAULT special target, and no other rule<br />

matches the target, <strong>MKS</strong> Make displays an error and stops.<br />

A metarule states that targets with names that match a pattern depend<br />

upon prerequisites with names that match a pattern. You may specify<br />

either pattern in the rule.<br />

Every metarule has a standard format. <strong>MKS</strong> Make treats any rule<br />

with a % symbol in the target as a metarule.<br />

target_pref %target_suffix : prereq_prefix%prereq_suffix<br />

recipes<br />

You can omit any of the prefix and suffix strings. If the % symbol<br />

appears in the prerequisite, it stands for whatever string matched the<br />

% symbol in the target.<br />

Note To include more than one prerequisite entry, you should use the :|<br />

rule operator instead of the single colon operator. For more information<br />

on this rule operator, see the man page for the make command.<br />

For example, consider the metarule that matches object file targets<br />

with their source file prerequisites.<br />

%$O : %.c<br />

$(CC) -c $(CFLAGS) $<<br />

<strong>The</strong> target in the metarule represents any file with an object file<br />

extension; in other words, any object file. <strong>The</strong> percent symbol<br />

represents the base name of the target; the O macro expands, as usual,<br />

to your system’s object file extension.<br />

<strong>The</strong> prerequisite represents the source file corresponding to the<br />

target. <strong>MKS</strong> Make determines the appropriate source file by looking<br />

for a file with the same base name as the target, coupled with the .c<br />

source file extension.<br />

<strong>The</strong> recipe for this rule contains the command to compile the single<br />

prerequisite that matches the target (note the use of the $< special<br />

macro here). <strong>MKS</strong> Make expands this macro to provide the single<br />

inferred prerequisite, that is, the single prerequisite it was able to<br />

match to the target file.<br />

282 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Here is another example, this time of a makefile employing<br />

metarules.<br />

Using Inference Rules<br />

FILES = main myFunc<br />

# notice the use of the $E macro representing<br />

# the executable file extension<br />

program$E : $(FILES:+$O)<br />

$(CC) $(CFLAGS) -e$@ $&<br />

%$O : %.c<br />

$(CC) -c $(CFLAGS) $<<br />

When <strong>MKS</strong> Make attempts to rebuild program$E (here the<br />

predefined E macro represents the executable file extension for your<br />

system), it checks the two specified object files to see if they, in turn,<br />

require rebuilding.<br />

<strong>MKS</strong> Make notes that these files end in the object file extension for<br />

your system, by expanding the O macro. Since these files lack a<br />

particular rule that names them as targets, <strong>MKS</strong> Make subsequently<br />

checks for any matching metarule. <strong>The</strong> metarule (the second rule in<br />

the makefile) does match the object file names, so it is used to rebuild<br />

the object files.<br />

Employing the metarule, <strong>MKS</strong> Make looks for the object files’<br />

matching source files (which end in a .c extension), and runs them<br />

through the compiler.<br />

Note the lack of specific reference to any object file in this makefile.<br />

<strong>MKS</strong> Make infers the appropriate object files by expanding<br />

$(FILES:+$O), and uses the metarule to match object files with their<br />

associated source.<br />

Here is another example, one that demonstrates the use of another<br />

common metarule.<br />

% .PRECIOUS : rcs/%$V<br />

-co -q $<<br />

<strong>The</strong> metarule states that any target (file) depends upon a prerequisite<br />

(an associated archive file) located in an rcs subdirectory. <strong>MKS</strong> Make<br />

matches any archive file to its associated working file. <strong>The</strong> recipe line<br />

uses the $< runtime macro to represent the prerequisite matching the<br />

target. Notice that it uses the dash command prefix. <strong>MKS</strong> Make<br />

ignores the failure of the check out (co) command (as it should, for<br />

example, if a revision of the file has already been checked out).<br />

Also, notice that it uses a macro called V to represent the possible<br />

archive file extension for the archive file. On UNIX-based systems,<br />

archive files usually end with a ,v extension. On PC-based systems,<br />

<strong>User</strong> <strong>Guide</strong> 283


Using the <strong>MKS</strong> Make Utility<br />

For more information on<br />

attributes, see the man page<br />

for the make command.<br />

archive files may have names identical to their associated working<br />

files (that is, V would have a null value). <strong>Source</strong> <strong>Integrity</strong> allows you<br />

to change your archive file names; thus you can change the V macro<br />

to match the extension you chose for archive files.<br />

A metarule may specify an attribute for a target. <strong>The</strong> previous<br />

example assigned the .PRECIOUS attribute to the target. Any attribute<br />

specified in a metarule gets inherited by any target that matches that<br />

metarule.<br />

If <strong>MKS</strong> Make attempts to make a target that has an attribute, it first<br />

checks for a metarule that applies to the target and specifies the given<br />

attribute. If no such metarule exists, it looks for a metarule that does<br />

not specify the attribute. This lets you specify different metarules for<br />

targets with different attributes. <strong>MKS</strong> Make performs this test for all<br />

attributes except .SILENT, .IGNORE, and .SYMBOL.<br />

Using the :| Rule Operator with Metarules<br />

<strong>MKS</strong> Make supports a rule operator for use specially in metarules<br />

that have more than one entry in the prerequisite list. This operator<br />

allows you to write one metarule as a short form for a number of<br />

similar metarules. <strong>The</strong> :| rule operator prompts <strong>MKS</strong> Make to treat<br />

each inferred match in the prerequisite list as an independent<br />

metarule.<br />

To understand this more clearly, take another look at the previous<br />

example. It included a metarule that would allow you to check out<br />

any working file from its associated archive. What if you maintain<br />

different archive locations for different kinds of working files? You<br />

store some files in local archive subdirectories and some more general<br />

files in a central archive tree.<br />

You would be tempted to compose two metarules to handle the two<br />

particular cases separately, but the following simple example does<br />

the trick.<br />

% .PRECIOUS :| rcs/%$V /archive/%$V<br />

-co -q $<<br />

When <strong>MKS</strong> Make encounters the :| operator, it handles each<br />

prerequisite in the list independently, applying the same recipe to<br />

each prerequisite in turn. Thus, the previous example is identical to<br />

these two rules.<br />

% .PRECIOUS : rcs/%$V<br />

-co -q $<<br />

% .PRECIOUS : /archive/%$V<br />

-co -q $<<br />

284 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Using Inference Rules<br />

When <strong>MKS</strong> Make uses these rules, it first checks to see if an archive<br />

associated with the working file exists in the rcs subdirectory. If no<br />

archive exists there, it attempts to infer a match with an archive file in<br />

a central directory.<br />

Transitive Closure<br />

With metarules, <strong>MKS</strong> Make can draw a chain of inferences across files<br />

that may not exist, resulting in the eventual creation of a target. This<br />

process is called transitive closure of inferences. Consider the<br />

following example of two metarules:<br />

%$E : %$O<br />

recipe one<br />

%$O : %.c<br />

recipe two<br />

When you use <strong>MKS</strong> Make to rebuild an executable called foo$E, it<br />

uses the first metarule to look for the object file, foo$O. If this file does<br />

not exist, and it cannot find an explicit rule that describes the way to<br />

create the necessary object file, <strong>MKS</strong> Make finds the second metarule,<br />

which describes the general procedure for rebuilding an object file.<br />

<strong>MKS</strong> Make considers each metarule only once when performing<br />

transitive closure, to avoid an endless loop. If it did not do this,<br />

certain rules would create problems. For example<br />

% : %.c<br />

recipe<br />

If you used this metarule, when using <strong>MKS</strong> Make with the target foo,<br />

it would first look for the file foo.c. If it could not find this file, it<br />

would then look for foo.c.c, and so on. Because <strong>MKS</strong> Make uses<br />

each metarule only once, it avoids the endless loop.<br />

<strong>MKS</strong> Make computes transitive closure once for each metarule, the<br />

first time the pattern matches a target. As metarules match,<br />

<strong>MKS</strong> Make joins the recipes together, in order leading backwards to<br />

the first metarule.<br />

Thus, using the previous example of two metarules, transitive closure<br />

produced the following rule, when foo.exe matched the first<br />

metarule (the one for executables).<br />

%$E : %.c<br />

recipe two<br />

recipe one<br />

<strong>User</strong> <strong>Guide</strong> 285


Using the <strong>MKS</strong> Make Utility<br />

For more information on this<br />

process, see the man page for<br />

the make command.<br />

Suffix Rules<br />

If the object file for the executable does not exist, transitive closure<br />

allows <strong>MKS</strong> Make to infer that it needs to first build the required<br />

object file from source, using this newly generated rule.<br />

When <strong>MKS</strong> Make finishes the computation for the rule head, it marks<br />

that rule head as transitive closure completed. Since it adds all<br />

possible new rules to the rule set the first time it performs the<br />

computation, <strong>MKS</strong> Make will not compute transitive closure again;<br />

nothing new can be added to the rule set.<br />

To understand this process best, you might want to experiment on<br />

small makefiles, using the -v option to the make command. This<br />

displays the behavior in detail: which rules it searches, when it<br />

computes transitive closure, and which rules it adds to the set.<br />

<strong>MKS</strong> Make follows a particular order when attempting to make<br />

inferences.<br />

An older portable form of inference rules, suffix rules use the format<br />

# typical suffix rule<br />

.suf1.suf2:<br />

recipe<br />

<strong>MKS</strong> Make matches the suffixes against the suffix of a target when it<br />

cannot locate an explicit rule for that target. However, suffix rules are<br />

not as powerful or as intuitive as metarules.<br />

For example, to express the dependence of object files upon source<br />

files, you would need a suffix rule that looked like<br />

.c$O:<br />

$(CC) -c $(CFLAGS) $<<br />

Compare this with the equivalent metarule.<br />

# normal rule<br />

file$O : file.c<br />

$(CC) -c $(CFLAGS) file.c<br />

# metarule<br />

%$O : %.c<br />

$(CC) -c $(CFLAGS) $<<br />

You can see that the construction of the suffix rule seems backwards.<br />

By itself, this gives a good reason to avoid suffix rules; you will find<br />

makefiles with suffix rules much more difficult to read.<br />

286 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Using Inference Rules<br />

You can also construct suffix rules with only one suffix. <strong>The</strong>se match<br />

any file ending in that suffix and provide a recipe for making a target<br />

with no suffix from a prerequisite with a given suffix.<br />

# single suffix rule<br />

.c :<br />

$(CC) -o$@ $(CFLAGS) $<<br />

For a suffix rule to work, you must list the component suffixes in the<br />

prerequisite list of the .SUFFIXES special target. To turn off suffix<br />

rules, simply use the special target with a null prerequisite list.<br />

.SUFFIXES:<br />

This clears the prerequisites of any previously declared .SUFFIXES<br />

special targets, and prevents make from using any suffix rules when<br />

inferring matches. You determine the order in which <strong>MKS</strong> Make uses<br />

suffix rules by the order of the prerequisites associated with the<br />

.SUFFIXES special target.<br />

<strong>The</strong> following list describes how <strong>MKS</strong> Make handles suffix rules with<br />

targets that have suffixes in their names.<br />

Extract the suffix from the target.<br />

Check the .SUFFIXES special target’s prerequisite list; if the suffix<br />

does not appear in the list, quit searching.<br />

If the suffix does appear in the list, look for a double suffix rule<br />

that matches the target suffix.<br />

If one exists, extract the base name of the target, add on the<br />

second suffix, and look for a file with the resulting name. If such a<br />

file exists, use the recipe from that double suffix rule to rebuild<br />

the target. If no such file exists, look for another double suffix rule<br />

that matches the target suffix.<br />

If <strong>MKS</strong> Make cannot find a double suffix rule to construct the<br />

name of an existing file with the new suffix, the inference fails.<br />

<strong>The</strong> following list describes how <strong>MKS</strong> Make handles suffix rules with<br />

targets that have no suffix in their name.<br />

Check the single suffix rules in the order specified by the<br />

.SUFFIXES special target.<br />

For each single suffix rule, add the suffix to the target name, and<br />

check to see if a file exists with the resulting name. If such a file<br />

exists, use that recipe to rebuild the target.<br />

If <strong>MKS</strong> Make cannot find a single suffix rule to construct the<br />

name of an existing file, the inference fails.<br />

<strong>User</strong> <strong>Guide</strong> 287


Using the <strong>MKS</strong> Make Utility<br />

Try some experiments on small makefiles, using make with the -v<br />

option, to see suffix rules work.<br />

More About Executing Recipes<br />

Regular<br />

Recipes<br />

Note Because <strong>MKS</strong> Make searches met-rules first, you should specify<br />

the -r option on the command line to disable the default met-rules when<br />

experimenting with suffix rules.<br />

To update a target, <strong>MKS</strong> Make expands and executes a recipe. <strong>The</strong><br />

expansion process replaces all macros and text diversions within the<br />

recipe, then either executes the commands directly, or passes them to<br />

a shell or command interpreter, depending on the occurrence of shell<br />

metacharacters in the recipe.<br />

When <strong>MKS</strong> Make calls a regular recipe, it executes each line of the<br />

recipe separately. This means that the effect of some commands may<br />

not carry over from one recipe line to the next.<br />

For example, a change directory request (cd) in a recipe line changes<br />

the current directory only for that recipe line. <strong>The</strong> next recipe line<br />

reverts to the previous current directory.<br />

<strong>The</strong> value of the control macro SHELLMETAS determines whether<br />

<strong>MKS</strong> Make uses a shell to execute a command. If it finds any<br />

character in SHELLMETAS in the expanded recipe line, it passes the<br />

command to the shell for execution; otherwise, it executes the<br />

command directly.<br />

Note If the makefile contains the .POSIX special target, <strong>MKS</strong> Make<br />

always uses the shell to execute recipe lines.<br />

To force the use of a shell, you can add characters from SHELLMETAS to<br />

the recipe line, as in the example<br />

rule 1<br />

# the next lines contains shell metacharacters<br />

command_one > file_one<br />

command_two | command_three<br />

…<br />

288 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Built-In<br />

Commands<br />

Group Recipes<br />

More About Executing Recipes<br />

<strong>The</strong> value of the control macro SHELL specifies the shell used for<br />

execution. <strong>The</strong> value of the control macro SHELLFLAGS provides the<br />

options that passed to that shell. <strong>The</strong> SWITCHAR control macro gives<br />

the character used to mark the beginning of the flags.<br />

<strong>The</strong>refore, the command to run the expanded recipe line is<br />

$(SHELL) $(SWITCHAR)$(SHELLFLAGS) expanded_recipe_line<br />

Normally, just before <strong>MKS</strong> Make invokes a recipe line, it writes the<br />

line to the standard output. If you have set the .SILENT attribute for<br />

the current target or recipe line (using the @ command prefix), the line<br />

is not echoed to the standard output.<br />

Since command.com and cmd.exe incorporate some frequently used<br />

commands as built in commands (for example, del, dir, and type),<br />

you cannot execute these commands directly from makefiles. You<br />

can, however, call the command interpreter to execute the instruction.<br />

<strong>The</strong> following example demonstrates how to delete a file called<br />

myfile.txt on Windows 95/98:<br />

command $(SWITCHAR)c del myfile.txt<br />

This invokes a command interpreter (as determined by the value of<br />

the COMSPEC macro) with the c option prefaced by the value of the<br />

SWITCHAR control macro, and passes it the del command with an<br />

appropriate argument (that is, the name of the file you want to<br />

delete).<br />

On OS/2 or NT systems, you would use<br />

cmd /c del myFile.txt<br />

<strong>MKS</strong> Make can also handle bundles of commands, or group recipes, by<br />

passing them to the appropriate command interpreter (shell) as a<br />

single unit. Traditional versions of make do not offer this feature.<br />

A group recipe begins with an opening bracket ([) in the first<br />

non-white space position of a line, and ends with a closing bracket (])<br />

in the last non-white space position of a line. Group recipes do not<br />

need a character as the first characters on a line.<br />

When <strong>MKS</strong> Make determines that the associated target requires<br />

rebuilding, it passes the entire group recipe in a block to the shell.<br />

<strong>User</strong> <strong>Guide</strong> 289


Using the <strong>MKS</strong> Make Utility<br />

Control Macros<br />

Used With<br />

Group Recipes<br />

A typical group recipe might involve special command constructs,<br />

like the looping constructs of the <strong>MKS</strong> KornShell. <strong>The</strong> following<br />

example creates a loop that use the fmt command to format each file<br />

in a directory, appending the formatted material to the book file:<br />

book : chap1.tr chap2.tr chap3.tr<br />

[<br />

>book<br />

for chapFile in $^<br />

do<br />

fmt -j -l 66 $$chapFile >>book<br />

done<br />

]<br />

<strong>MKS</strong> Make expands the group recipe before passing it to the shell.<br />

Thus, you need to place an extra dollar sign in front of the chapFile<br />

variable, to prevent <strong>MKS</strong> Make from attempting to expand the<br />

variable before it passes the line to the shell for execution.<br />

You can assign command prefixes to entire group recipes by placing<br />

the command prefix immediately after the initial bracket. <strong>The</strong><br />

command prefix then applies to the group recipe exactly as it would<br />

for a single recipe line.<br />

When <strong>MKS</strong> Make processes a group recipe, it writes the recipe to a<br />

temporary file. You specify an appropriate suffix for the temporary<br />

file with the value of the GROUPSUFFIX control macro. <strong>The</strong> command<br />

interpreter that handles the group recipe must recognize the suffix<br />

you specify with the GROUPSUFFIX control macro.<br />

If you use command.com, you must specify the .bat suffix. If you use<br />

cmd.exe, specify .cmd (although NT also accepts the .bat suffix). If<br />

you use the <strong>MKS</strong> KornShell, specify .ksh.<br />

You specify the shell <strong>MKS</strong> Make passes the group recipe to by<br />

defining a value for the GROUPSHELL macro. <strong>The</strong> value of the<br />

GROUPFLAGS macro determines the flags that are passed to the<br />

appropriate shell, along with the group recipe.<br />

If you have associated the .PROLOG attribute with the target of the<br />

rule containing the group recipe, <strong>MKS</strong> Make prepends the recipe<br />

associated with the .GROUPPROLOG special target to the front of the<br />

group recipe before passing it to the appropriate shell.<br />

290 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Text Diversions<br />

More About Executing Recipes<br />

If the group recipe’s target has the .EPILOG attribute, <strong>MKS</strong> Make<br />

appends the recipe associated with the .GROUPEPILOG special target<br />

to the end of the group recipe before passing it to the shell. You can<br />

use these two procedures to append a common header or trailer to<br />

group recipes.<br />

<strong>MKS</strong> Make echoes group recipes to standard output just like<br />

standard recipes, unless you use the .SILENT attribute with the<br />

associated target or the @ command prefix.<br />

<strong>MKS</strong> Make allows you to directly create files from within a recipe.<br />

This feature is an extension to traditional versions of make. <strong>The</strong><br />

following example shows the format of a text diversion:<br />

<br />

<strong>The</strong> specified text can be anything—several lines long if desired.<br />

When <strong>MKS</strong> Make encounters this construct, it creates a temporary<br />

file with a unique name, expands any macros in the text, and copies<br />

the text to the temporary file. It then executes the recipe with the<br />

name of the temporary file inserted in place of the diversion. When<br />

<strong>MKS</strong> Make finishes processing, it removes all the temporary files.<br />

Note Use the -v option to the make command to show the names of<br />

these temporary files and leave them around to be examined.<br />

<strong>MKS</strong> Make places temporary files in the $ROOTDIR/tmp directory<br />

unless you have specified a value for the TMPDIR environment<br />

variable, in which case, it places all temporary files in $TMPDIR.<br />

All macro references found in the text are expanded in the normal<br />

way; references in the temporary file are replaced by their associated<br />

strings. <strong>MKS</strong> Make copies all newline characters as they appear in the<br />

diversion.<br />

Normally, <strong>MKS</strong> Make does not copy white space at the beginning of<br />

lines into the temporary file. However, if you put a backslash at the<br />

front of a white space character, it copies all the white space in that<br />

line to the temporary file.<br />

For example,<br />

<br />

<strong>User</strong> <strong>Guide</strong> 291


Using the <strong>MKS</strong> Make Utility<br />

As a simple example of text diversion, suppose you redefine the<br />

value of the MAKESTARTUP macro on the command line to point to<br />

your personal startup file (/usr/lindsay/startup.mk). Next, you<br />

write a recipe line like<br />

copy startup.msg<br />

<strong>MKS</strong> Make creates a temporary file containing the text<br />

using /usr/lindsay/startup.mk as make startup file<br />

Since white space is stripped from the beginning of the second line,<br />

the contents of the temporary file end at the newline character that<br />

terminates the first line.<br />

<strong>MKS</strong> Make gives this temporary file a unique name. Suppose it uses<br />

the name temp.txt. <strong>The</strong> original recipe line is changed to<br />

copy temp.txt startup.msg<br />

When finished, startup.msg holds the contents of the temporary file.<br />

Here is a more useful example.<br />

OBJECTS=program$O module1$O module2$O<br />

program$E: $(OBJECTS)<br />

link @<br />

<strong>The</strong> tokenizing expression<br />

$(OBJECTS:t"+\n")<br />

adds a + and a newline after each token in the OBJECTS macro.<br />

Remember the runtime macro $@ stands for the name of the target<br />

being made. As a result, the temporary file created from the text<br />

diversion has the following contents (with all the macros expanded,<br />

of course).<br />

program$O+<br />

module1$O+<br />

module2$O<br />

program$E/noignorecase<br />

$(LDLIBS)<br />

<strong>The</strong> link command can easily handle an input file like this. Here’s<br />

the recipe line after <strong>MKS</strong> Make processes the text diversion.<br />

link @tempfile<br />

292 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Making Libraries<br />

Making Libraries<br />

All the <strong>MKS</strong> utilities can handle command lines of at least 8192<br />

characters in length.<br />

If you need to use non-<strong>MKS</strong> utilities, text diversions can help you<br />

pass input to a utility such as a linker, while respecting the commandline<br />

length restriction, as in this example:<br />

program$E : $(OBJECTS)<br />

bcc -eprogram$E @<br />

This example builds program$E from a lengthy list of object files,<br />

using the Borland C++ compiler.<br />

A library is a file containing a collection of object files and a symbol<br />

table. You can explicitly signal <strong>MKS</strong> Make that a target is a library, by<br />

giving the target the .LIBRARY attribute; however, you do not need to<br />

do this.<br />

You can construct rules to handle libraries simply by writing rules in<br />

the following format:<br />

program_name : library_name(member)<br />

library_name :<br />

recipe<br />

<strong>MKS</strong> Make can automatically determine that the target library_name<br />

is a library. In other rules it interprets member as a prerequisite of the<br />

library target. <strong>MKS</strong> Make internally associates the library name with<br />

the prerequisites. This lets the file searching mechanism look for the<br />

member in an appropriate library if it cannot be found as an object<br />

file.<br />

Note If you specify either the .POSIX or .NOAUTODEPEND special target,<br />

<strong>MKS</strong> Make does not check for an object file; it always looks in the library<br />

archive.<br />

Using these features, you can write rules like<br />

program$E : mylib$A(mem1$O)<br />

recipe for making program<br />

mylib$A :<br />

recipe for making library<br />

mem1$O : mem1.c<br />

recipe provided by built-in rules<br />

<strong>User</strong> <strong>Guide</strong> 293


Using the <strong>MKS</strong> Make Utility<br />

Metarules for<br />

Library Support<br />

For further information, see<br />

the man page for the ar<br />

command.<br />

Note that <strong>MKS</strong> Make startup rules give the A macro and the<br />

LIBSUFFIX macro the appropriate file extension for library files on<br />

your system. On UNIX and Xenix systems this would be .a; under<br />

command.com and cmd.exe, this would be .lib.<br />

If any target or prerequisite has the following format, <strong>MKS</strong> Make<br />

assumes that entry is a member of a library called name:<br />

name((entry))<br />

<strong>MKS</strong> Make then searches the library for the entry, determining the<br />

modification time of the member that defines entry, and the name of<br />

the member file. This name then replaces entry, and <strong>MKS</strong> Make uses it<br />

to make the member file.<br />

<strong>The</strong> startup file defines several macros and metarules useful for<br />

manipulating libraries. A gives the standard suffix for a library, and O<br />

gives the standard suffix for an object file.<br />

<strong>The</strong> AR macro specifies the librarian program. By default, the macro<br />

contains the ar program provided with <strong>MKS</strong> Make, and ARFLAGS<br />

contains the string -ruv. <strong>The</strong>se flags cause ar to update the library<br />

with all the specified members that have changed since the library<br />

was last updated.<br />

<strong>The</strong> startup file contains the metarule<br />

%$A .LIBRARY .PRECIOUS :<br />

$(AR) $(ARFLAGS) $@ $?<br />

With this metarule, you need not directly use the ar command in<br />

your makefile. <strong>MKS</strong> Make automatically rebuilds a library with the<br />

appropriate suffix when any of the prerequisite object modules have<br />

changed. As an example of the effect of this metarule, consider the<br />

rule<br />

lib$A .LIBRARY : mod1$O mod2$O mod3$O<br />

<strong>MKS</strong> Make gives the .LIBRARY attribute to the lib$A target, so the<br />

metarule applies. Using the command.com or cmd.exe command<br />

interpreters, the following command remakes the library from the<br />

appropriate object modules:<br />

make lib.lib<br />

On UNIX and POSIX compliant systems, libraries have the .a suffix,<br />

so the following command is equivalent:<br />

make lib.a<br />

294 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For more information on the<br />

+= symbol, see the man page<br />

for the make command.<br />

Suffix Rules for<br />

Library Support<br />

Making Libraries<br />

<strong>The</strong> startup file contains a metarule that <strong>MKS</strong> Make uses to rebuild<br />

executable files from object files. This metarule adds the value of the<br />

macro LDLIBS as a list of libraries you want make to link with the<br />

object files. If you have several programs, all of which depend on the<br />

same library, you can add the name of your library to the definition of<br />

LDLIBS and automatically get it linked when using the metarule.<br />

For example, assume the startup file specifies the following metarule<br />

for your compiler:<br />

%$E : %$O<br />

$(LD) $(LDFLAGS) -o $@ $^ $(LDLIBS)<br />

You can add the following lines to your makefile:<br />

LDLIBS += mylib$A<br />

program$E : mylib$A<br />

<strong>The</strong> first line appends mylib$A to the current definition of LDLIBS.<br />

<strong>The</strong> second line handles the program you want to build using this<br />

library (you could have any number of different program file targets<br />

with the same prerequisite). Because you have not specified a recipe,<br />

<strong>MKS</strong> Make uses the metarule from the startup file to relink the<br />

programs.<br />

Thus, when you want make to rebuild the program file target,<br />

<strong>MKS</strong> Make remakes the library file mylib$A if required, and then<br />

relinks the executable from the object file with the libraries specified<br />

in LDLIBS.<br />

Suffix rules also have a feature that supports archive library<br />

handling. If you specify a suffix rule with the following form, the rule<br />

matches any target having the .LIBRARY attribute set, regardless of<br />

the target’s actual suffix.<br />

.suf.a:<br />

recipe<br />

For example, if mem.obj exists and your makefile contains the rules<br />

.SUFFIXES: .a .obj<br />

.obj.a :<br />

@echo adding $< to library $@<br />

the command<br />

make -r "mylib(mem)"<br />

<strong>User</strong> <strong>Guide</strong> 295


Using the <strong>MKS</strong> Make Utility<br />

causes <strong>MKS</strong> Make to print<br />

adding mem.obj to library mylib<br />

Compatibility Considerations<br />

Conditionals<br />

Note <strong>The</strong> -r option keeps the rules in the startup.mk file from<br />

interfering with the command in this example.<br />

<strong>MKS</strong> Make attempts to remain compatible with versions of the make<br />

utility found on UNIX and POSIX compliant systems, while meeting<br />

the needs of different environments such as Windows 95/98,<br />

Windows NT, and OS/2.<br />

This section examines ways in which <strong>MKS</strong> Make differs from<br />

traditional versions of make. It also discusses techniques to write<br />

makefiles that work on UNIX, Windows 95/98, Windows NT, and<br />

OS/2 systems.<br />

Conditionals let you selectively include or exclude parts of a makefile.<br />

This lets you write rules that have different formats for different<br />

systems. Note that traditional implementations of make do not<br />

recognize conditionals. Conditionals are extensions to the POSIX<br />

standard.<br />

You construct conditionals with the following format:<br />

.IF expression1<br />

input1<br />

{.ELSIF expression2<br />

input2}<br />

[.ELSE<br />

input3]<br />

.END<br />

You may have any number of .ELSIF expressions, but only one<br />

.ELSE expression.<br />

When <strong>MKS</strong> Make encounters a conditional construct, it begins by<br />

evaluating expression1 (associated with the .IF). If the value of<br />

expression1 is true, <strong>MKS</strong> Make processes the first input block (input1)<br />

and ignores all subsequent input blocks until the .END.<br />

296 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Compatibility Considerations<br />

If the value of expression1 is false, <strong>MKS</strong> Make ignores the first input<br />

block and tests expression2 (associated with the .ELSIF). If expression2<br />

is true, the second input block (input2) is processed, and all<br />

subsequent input blocks until the .END are ignored.<br />

If the value of expression2 is false, <strong>MKS</strong> Make ignores the first two<br />

input blocks and automatically process the third input block<br />

(associated with the .ELSE).<br />

When <strong>MKS</strong> Make evaluates expressions, it accepts an expression with<br />

one of the following forms:<br />

text<br />

text1 == text2<br />

text1 != text2<br />

<strong>The</strong> first entry is false if text is null; otherwise, it is true. <strong>The</strong> value of<br />

the second entry is true if text1 and text2 are equal. <strong>The</strong> last entry<br />

resolves to true if text1 and text2 are not equal.<br />

<strong>The</strong> .IF, .ELSE, .ELSIF, and .END keywords must begin in the first<br />

column of an input line (that is, with no leading white space).<br />

Although you may be used to indenting material inside IF/ELSE<br />

constructs, you must not use s to indent text inside conditional<br />

blocks (except for recipe lines, which are always indented with a<br />

).<br />

Text in a conditional block should have the same form that you<br />

would use outside the block. You may omit the .ELSE and .ELSIF<br />

conditional operators. This would produce a conditional block that<br />

<strong>MKS</strong> Make would process if the .IF expression were true, and<br />

completely ignore if that expression were false.<br />

This example shows the concept behind the O macro.<br />

.IF $(OS) == NT<br />

O = .obj<br />

.ELSE<br />

O = .o<br />

.END<br />

This begins by checking the predefined value of the OS macro that<br />

identifies your operating system. If the macro expands to NT,<br />

<strong>MKS</strong> Make assigns the value .obj to the O macro; otherwise, the<br />

macro receives the value .o.<br />

<strong>User</strong> <strong>Guide</strong> 297


Using the <strong>MKS</strong> Make Utility<br />

Other Makes<br />

You can use conditionals to prepare a makefile that runs on<br />

Windows 95, Windows NT, OS/2, and UNIX systems. You may find<br />

it simplest to check the value of the macro OS (defined in the built in<br />

rules). You can then use conditionals like<br />

.IF $(OS) == NT<br />

# NT style input<br />

.ELSE<br />

# UNIX style input<br />

.END<br />

With care, you can produce a makefile that works under more than<br />

one operating system.<br />

.IF $(OS) == NT<br />

E=.exe #suffix for executable programs<br />

O=.obj #suffix for object files<br />

S=.asm #suffix for assembler source<br />

A=.lib #suffix for libraries<br />

F=.for #suffix for fortran source<br />

V= #suffix for <strong>Source</strong> <strong>Integrity</strong> archives<br />

.ELSE<br />

E=<br />

O=.o<br />

S=.s<br />

A=.a<br />

F=.f<br />

V=,v<br />

.END<br />

LIBSUFFIX=$A<br />

<strong>The</strong>se macro definitions specify suffixes used on UNIX systems. You<br />

can then use a suffix macro like<br />

%$O : %.c<br />

$(CC) $(CFLAGS) $^<br />

It expands to .o on UNIX and POSIX compliant systems.<br />

Note <strong>The</strong> default startup rules for <strong>MKS</strong> Make already provide most of<br />

these definitions with values appropriate to your system.<br />

Several other versions of the make utility exist for Windows 95/98,<br />

Windows NT, and OS/2. <strong>The</strong> following sections examine some<br />

popular make utilities and how they differ from <strong>MKS</strong> Make.<br />

298 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Borland Make<br />

Compatibility Considerations<br />

<strong>The</strong> Borland C++ packages from Inprise Corporation comes with<br />

their own version of make. Here are some of the ways in which the<br />

Borland Make differs from <strong>MKS</strong> Make:<br />

Borland Make does not support the general metarule format of<br />

inference rules, only the suffix rule format.<br />

Borland Make does not support multiple command processors<br />

(for example, the <strong>MKS</strong> KornShell); it uses only the native<br />

command processor.<br />

Borland Make does not have general macro modifiers (such as :d<br />

and :f).<br />

<strong>The</strong> directives of Borland Make take the form !word, where word<br />

is the directive name. <strong>The</strong> set of directives includes conditionals,<br />

include facilities (similar to .INCLUDE), and a facility for<br />

undefining macros. No other directives are supported. <strong>The</strong><br />

format of these facilities is not compatible with any UNIX or<br />

POSIX compliant version of make.<br />

Borland Make has no facilities for handling libraries or <strong>Source</strong><br />

<strong>Integrity</strong> files. It does not have group recipes or special rule<br />

operators, and lacks most of the special macros and special<br />

targets supported by <strong>MKS</strong> Make.<br />

Borland Make lets you specify a number and compare it to the<br />

return status of a command in a recipe line. If the return status<br />

exceeds this number, Borland Make stops the make process,<br />

saying that an error was detected.<br />

<strong>MKS</strong> Make lets you use the minus sign to ignore errors entirely. To<br />

compare a specific exit value, use the <strong>MKS</strong> KornShell as your SHELL<br />

and write a group recipe like<br />

[<br />

]<br />

command to be tested<br />

if [ $? != 5 ]<br />

echo "diagnostic"<br />

exit 1<br />

fi<br />

exit 0<br />

If you have a makefile for Borland Make that you want to convert for<br />

use with <strong>MKS</strong> Make, you need to change all the directives from the<br />

!word format into the <strong>MKS</strong> Make equivalent.<br />

<strong>User</strong> <strong>Guide</strong> 299


Using the <strong>MKS</strong> Make Utility<br />

Microsoft Make<br />

<strong>The</strong> Microsoft C++ package also comes with its own version of make.<br />

Here are some of the differences between Microsoft Make and<br />

<strong>MKS</strong> Make:<br />

Microsoft Make does not support the general metarule format of<br />

inference rules; it only supports the suffix rule format.<br />

Microsoft Make does not support multiple command<br />

interpreters; it uses only the native command processor.<br />

Microsoft Make has no facilities for handling libraries or <strong>Source</strong><br />

<strong>Integrity</strong> archives. It does not have group recipes, and lacks most<br />

of the special macros and special targets supported by<br />

<strong>MKS</strong> Make.<br />

<strong>The</strong> set of special macros recognized by Microsoft Make is much<br />

smaller. It uses $** to represent the same thing as the $& runtime<br />

macro in <strong>MKS</strong> Make (that is, the complete list of prerequisites for<br />

the current target).<br />

Because Microsoft Make operates at such a simple level, any makefile<br />

that works with Microsoft Make works with <strong>MKS</strong> Make by simply<br />

changing the $** symbols to $& runtime macros.<br />

Note Naturally, you must use the <strong>MKS</strong> Make command-line options<br />

instead of those for Microsoft Make.<br />

BSD UNIX Make<br />

<strong>The</strong> following is a list of the notable differences between <strong>MKS</strong> Make<br />

and the 4.2/4.3 BSD UNIX make:<br />

BSD UNIX make supports file name generation for prerequisite<br />

names. Thus, if a directory contains a.h, b.h, and c.h, BSD UNIX<br />

make performs the following expansion:<br />

target: *.h<br />

expands to<br />

target: a.h b.h c.h<br />

<strong>MKS</strong> Make does not support this type of file name expansion.<br />

300 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Compatibility Considerations<br />

Unlike BSD UNIX make, touching library members causes<br />

<strong>MKS</strong> Make to search the library for the member name and to<br />

update the time stamp if the member is found (see the<br />

description of the -t option in the online reference for the make<br />

command).<br />

<strong>MKS</strong> Make does not support the BSD UNIX VPATH variable. A<br />

similar and more powerful facility is provided through the<br />

.SOURCE special target.<br />

System V MAKE<br />

<strong>The</strong> following special features have been implemented to make<br />

<strong>MKS</strong> Make more compatible with System V make:<br />

You can use the word include at the start of a line instead of the<br />

.INCLUDE special target that is normally understood by<br />

<strong>MKS</strong> Make.<br />

<strong>MKS</strong> Make supports the macro modifier expression<br />

$(macro:str=sub) for suffix changes.<br />

When defining special targets for the suffix rules, the special<br />

target .X is equivalent to .X.NULL.<br />

<strong>MKS</strong> Make supports both the<br />

lib(member)<br />

and<br />

lib((entry))<br />

library handling features of System V make.<br />

<strong>The</strong> built in rules contain the following definitions for System V<br />

make compatibility:<br />

@B = $(@:b)<br />

@D = $(@:d)<br />

@F = $(@:f)<br />

?B = $(?:b)<br />

?D = $(?:d)<br />

?F = $(?:f)<br />

*B = $(*:b)<br />

*D = $(*:d)<br />

*F = $(*:f)<br />


Using the <strong>MKS</strong> Make Utility<br />

Using the Generic CC Interface<br />

For a description of the<br />

command-line format, see the<br />

man page for the cc<br />

command.<br />

Compilation<br />

Configuration<br />

Files<br />

<strong>The</strong> command-line syntax of different C compilers varies widely.<br />

Under Windows 95/98, Windows NT, and OS/2, some compilers use<br />

a dash to mark options, others a slash, while some accept both<br />

characters. In addition, each compiler usually requires that<br />

command-line arguments be specified in a different order. On UNIX<br />

and POSIX compliant systems, there is a greater degree of uniformity,<br />

but there are still differences from one system to the next.<br />

Because of this diversity, it is difficult to write makefiles that apply to<br />

several compilers and/or systems. <strong>The</strong> following example is typical,<br />

but even this format is not universal. In particular, the -c argument<br />

may not have the same meaning to different compilers or may not be<br />

allowed in the position shown.<br />

$(CC) -c $(CFLAGS) files<br />

You can find similar differences in the various available linkers and<br />

library editors. <strong>The</strong>ir command lines may have different formats and<br />

different sets of options.<br />

To make it easier for you to write universal makefiles, <strong>MKS</strong> Make<br />

comes with a generic interface to the C compilers and linkers on the<br />

systems where <strong>MKS</strong> Make is available. <strong>The</strong> interface is called cc.<br />

However, this interface is not the default; you must edit your default<br />

rules file to call cc. Programmers developing software on several<br />

machines find cc useful; you may never need it if you do not intend<br />

to port your makefiles to other machines.<br />

You always call cc with the same command-line format, regardless of<br />

the compiler you want to invoke. You specify command-line<br />

arguments in a universal format. It is then up to cc to rearrange and<br />

convert these arguments (if necessary) to the form required by your<br />

chosen compiler or linker and to invoke the compiler/linker as<br />

necessary.<br />

<strong>The</strong> cc command employs a compilation configuration file. <strong>The</strong><br />

configuration file instructs cc on how to convert generic commandline<br />

arguments into the format required by a specific compiler or<br />

linker.<br />

<strong>MKS</strong> Make comes with appropriate compilation configuration files<br />

for the popular C compilers and linkers on your system. <strong>The</strong><br />

installation procedure takes care of setting up the configuration files.<br />

Under Windows 95/98, Windows NT, and OS/2, <strong>MKS</strong> Make stores<br />

the configuration file for cc in $ROOTDIR/etc/compiler.ccg. On<br />

302 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Using CC<br />

Generic<br />

Command-line<br />

Format<br />

Using the Generic CC Interface<br />

UNIX-based systems, the configuration file is /etc/compiler.ccg.<br />

Alternatively, you can set the CCG environment variable to point to<br />

another configuration file.<br />

<strong>The</strong> online reference for cc provides information on writing your<br />

own configuration files, if you want to use an unsupported compiler<br />

or linker. Certainly, the best way to start is copy and modify one of<br />

the provided configuration files.<br />

<strong>The</strong> cc command is installed in the same directory as the make<br />

command. If this directory is in your search rules, you can call the<br />

command by using the name cc.<br />

<strong>The</strong> supplied default rules file defines the CC macro to refer to your<br />

favorite C compiler. For example, if you use the Borland C compiler,<br />

it would contain<br />

CC = bcc<br />

LD = bcc<br />

To use CC, you would edit your default rules file to<br />

CC = cc<br />

LD = cc<br />

From this point on $(CC) and $(LD) invoke cc instead of your<br />

chosen compiler or linker. Since the installation process sets up<br />

appropriate configuration files, cc converts its generic command line<br />

to the format required by your chosen compiler and linker before<br />

invoking that compiler or linker.<br />

<strong>The</strong> cc command uses the following generic command-line format<br />

for compilation:<br />

cc -c [options] file…<br />

where each option begins with a dash.<br />

For example, the recommended way of selecting compiler memory<br />

models is with the -mmodel option. If you are using Microsoft C<br />

version 6.0 and want a large model program, you enter<br />

cc -c -ml file<br />

instead of using the /AL option. You could still use the /AL option, but<br />

your makefile would not be portable.<br />

<strong>The</strong> files specified on the command line are the C source files you<br />

want compiled. cc invokes your chosen compiler to compile each<br />

source file.<br />

<strong>User</strong> <strong>Guide</strong> 303


Using the <strong>MKS</strong> Make Utility<br />

Examples of<br />

Use<br />

Problem Solving<br />

Without a<br />

Makefile<br />

As source files are compiled, cc strips the name of the source file of<br />

its .c suffix and adds an appropriate suffix for object files. If you do<br />

not specify the -c (compile-only) option, cc subsequently passes all<br />

these files—as well as any other object and library files named on the<br />

command line—to your linker.<br />

You specify the output executable with the option<br />

-o executable<br />

To use cc for linking, use the following generic command-line<br />

format:<br />

cc [options] -o executable_file object_file…<br />

Here is an excerpt from a startup file that uses the generic cc<br />

interface.<br />

CC = cc<br />

LD = cc<br />

%$E : %$O<br />

$(LD) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(LDLIB)<br />

%$O : %.c<br />

$(CC) -c $(CFLAGS) $^<br />

<strong>The</strong> metarules describe how to link an executable file from object files<br />

and how to compile an object file from a source file. <strong>The</strong> commandline<br />

format is independent of the compiler and/or linker being used.<br />

You can use the CFLAGS macro to give options that are specific to your<br />

chosen compiler. <strong>The</strong> LDFLAGS macro gives options that are specific to<br />

your chosen linker.<br />

This section gives additional examples of using <strong>MKS</strong> Make.<br />

Assume the file prog.c contains the C source code that should be<br />

compiled to make prog.exe. No makefile is necessary; simply type<br />

make prog.exe<br />

<strong>MKS</strong> Make does everything using default rules, which specify how a<br />

.exe can be built from a .c file.<br />

304 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Simple Makefile<br />

Separate Object<br />

Directory<br />

Problem Solving<br />

Assume a program is built from the C source code in the files a.c,<br />

b.c, and c.c. Two of these files #include definitions from hdr.h, as<br />

shown.<br />

MOD = a b c<br />

OBJ = $(MOD:+"$O")<br />

program$E : $(OBJ)<br />

$(LD) $(LDFLAGS) -o $@ $<<br />

a$O b$O : hdr.h<br />

<strong>MKS</strong> Make uses the default rules to create the individual object files<br />

and links them into the final program.<br />

Assume the same situation as the previous, except that object and<br />

executable files are kept in a separate directory named objdir. This<br />

example assumes your C compiler has a -ndirectory flag to place the<br />

object file into a specific directory.<br />

<strong>The</strong>re are two ways to handle this with <strong>MKS</strong> Make, either with<br />

.SOURCE special targets or with .SETDIR attributes. Using .SOURCE,<br />

you set up your makefile as<br />

MOD = a b c<br />

OBJ = $(MOD:+"$O")<br />

OBJDIR=objdir<br />

.SOURCE$O :- $(OBJDIR)<br />

.SOURCE$E :- $(OBJDIR)<br />

CFLAGS += -n$(OBJDIR)<br />

program$E : $(OBJ)<br />

$(LD) $(LDFLAGS) -o $@ $^<br />

a$O b$O : hdr.h<br />

<strong>User</strong>s of a file server probably want to explore these possibilities, as<br />

they allow sources to be kept on a networked disk, while object and<br />

executables are built on a (usually faster) local disk.<br />

To do the same using .SETDIR, you give the appropriate files<br />

.SETDIR attributes telling make where the files appear. Note that,<br />

even though the source files are in the current directory, a .SETDIR<br />

<strong>User</strong> <strong>Guide</strong> 305


Using the <strong>MKS</strong> Make Utility<br />

<strong>MKS</strong> Make and<br />

<strong>Source</strong> <strong>Integrity</strong><br />

Using a Library<br />

attribute is required for them as well. However, since <strong>MKS</strong> Make now<br />

changes to the objdir directory before compiling, it no longer<br />

requires the -ndirectory option.<br />

MOD = a b c<br />

OBJ = $(MOD:+"$0")<br />

OBJDIR=objdir<br />

".SETDIR=$(OBJDIR)" : program$E $(OBJ)<br />

".SETDIR=$(PWD)" : $(MOD:+".c") hdr.h<br />

program$E : $(OBJ)<br />

$(LD) $(LDFLAGS) -o $@ $<<br />

a$O b$O : hdr.h<br />

<strong>MKS</strong> Make requires the quotes in the .SETDIR setting, if a device<br />

name with a colon may appear in the directory name.<br />

Note Normally, after <strong>MKS</strong> Make has run the recipe for a target, it marks<br />

the target as made, and does not remake it, even if another target<br />

depends upon it. When you use the .SETDIR attribute, <strong>MKS</strong> Make<br />

switches to the newly specified directory every time it encounters the<br />

attribute and retests all of the target’s prerequisites. <strong>The</strong> result is that it<br />

does much more work when you use .SETDIR than when you use<br />

.SOURCE.<br />

For the previous examples, assume the source code is contained in<br />

<strong>Source</strong> <strong>Integrity</strong> archives. <strong>The</strong> same makefile applies; the default<br />

rules in the startup file instructs make to check out missing source<br />

files as required.<br />

Going back to the simple example with the source files a.c, b.c, and<br />

c.c, assume a new file named program.c is required, and you keep<br />

the other objects in an object library. In this case, program.exe<br />

depends upon the library and the file program.obj.<br />

<strong>The</strong> following example uses the macro A to stand for the library<br />

suffix:<br />

MOD = a b c<br />

OBJ = $(MOD:+"$O")<br />

program$E: program$O mylib$A<br />

$(LD) $(LDFLAGS) -o $@ $<<br />

mylib$A : $(OBJ)<br />

a$O b$O : hdr.h<br />

306 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Recursive<br />

Makes<br />

For more information on this<br />

option, see the man page for<br />

the make command.<br />

Clean-up<br />

Problem Solving<br />

When building a large complex project, you can use multiple<br />

directories for separate components of the project. Within each<br />

directory, you use a makefile to control the building of that<br />

component of the project. At the top level, you can use a single<br />

makefile, which simply invokes the subdirectory makefiles in turn,<br />

ensuring the entire project is up to date.<br />

Assume a project has the subpackages system and commands, each<br />

stored in a subdirectory of a master directory. Within each system and<br />

commands directories, you keep a makefile to rebuild that<br />

subpackage. To ensure the project is up to date, you must ensure the<br />

subpackages are up to date; you can easily do this with a makefile in<br />

the following format, stored in master:<br />

all:<br />

$(MAKE) -c system<br />

$(MAKE) -c commands<br />

<strong>The</strong> -c option forces <strong>MKS</strong> Make to switch into the specified directory<br />

when it starts up.<br />

<strong>The</strong> macro MAKE is defined to contain the current setting of<br />

MAKEFLAGS. <strong>MKS</strong> Make has a feature whereby if the macro MAKE is<br />

used in a recipe line, then that line is executed, even if the -n option<br />

was passed to <strong>MKS</strong> Make. This ensures the command<br />

make -n<br />

which sets MAKEFLAGS to -n, recursively runs <strong>MKS</strong> Make in the<br />

subdirectories named. <strong>The</strong> only limits to this sort of recursive<br />

processing is the available memory on your machine.<br />

Some software creates work or backup files that do not need to be<br />

kept. Assume the current directory contains such files, identified by<br />

the suffixes $O and .bak. To clean out these files, add the following<br />

lines to a makefile:<br />

clean :<br />

-rm -f *.bak *$O<br />

<strong>The</strong> command<br />

make clean<br />

then gets rid of the files.<br />

<strong>User</strong> <strong>Guide</strong> 307


Using the <strong>MKS</strong> Make Utility<br />

Back-up<br />

Default Rules<br />

Assume a makefile defines a macro named SRC giving the base name<br />

of the C source files that make up a program. Also assume from time<br />

to time, you want to back up all recently changed copies to a<br />

directory named savedir. Add the following to the makefile:<br />

backup : $(SRC:+".c") makefile<br />

cp $? savedir<br />

touch backup<br />

With this rule, you can do a backup with the command<br />

make backup<br />

<strong>The</strong> target backup is a file you create the first time you perform the<br />

backup. Each time you perform it, the touch command sets the<br />

change date of backup to the correct time. In this way, the next time<br />

you run the command, <strong>MKS</strong> Make only saves files newer than<br />

backup.<br />

You can use a similar approach to get printouts of source files that<br />

have been changed.<br />

printchk : $(SRC:+".c")<br />

echo printing $?<br />

PRINT $?<br />

touch printchk<br />

Note that PRINT appears in uppercase above. This avoids a conflict<br />

with the lowercase print command built into the <strong>MKS</strong> KornShell.<br />

<strong>The</strong> startup file contains a good example of most of the popular<br />

features of <strong>MKS</strong> Make. Spend some time looking at this file to get a<br />

better understanding of how various things work. Use the -v flag to<br />

get trace information of what <strong>MKS</strong> Make is doing at each stage.<br />

308 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Miscellaneous Details<br />

Miscellaneous Details<br />

<strong>The</strong> maximum length of a single line in a makefile is 16384 characters.<br />

If you use the <strong>MKS</strong> KornShell, you can write commands with up to<br />

8192 characters when using make.exe.<br />

You can only nest included makefiles up to a depth of 10. In other<br />

words, if a makefile uses the .INCLUDE special target to include<br />

another makefile (which includes another makefile, and so on), you<br />

are allowed a maximum of 10 nested includes.<br />

<strong>MKS</strong> Make also allows nesting of conditional expressions up to a<br />

limit of 25 nested expressions, as in<br />

.IF<br />

.IF<br />

…<br />

.END<br />

.END<br />

up to a limit of 25 nested expressions.<br />

<strong>User</strong> <strong>Guide</strong> 309


Using the <strong>MKS</strong> Make Utility<br />

310 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Starting a Change<br />

<strong>Integrity</strong> Session<br />

10<br />

This chapter provides an overview of Change <strong>Integrity</strong> concepts; the<br />

basic tasks necessary to start, configure, and close a Change <strong>Integrity</strong><br />

session; and an overview of the Change <strong>Integrity</strong> interfaces.<br />

Specifically, this chapter provides details on:<br />

Change <strong>Integrity</strong> concepts<br />

logging in to Change <strong>Integrity</strong><br />

the Change <strong>Integrity</strong> graphic user interface<br />

the Change <strong>Integrity</strong> Web interface<br />

setting session preferences<br />

configuring email notification<br />

logging out<br />

closing a session<br />

<strong>User</strong> <strong>Guide</strong> 311


Starting a Change <strong>Integrity</strong> Session<br />

Change <strong>Integrity</strong> Concepts<br />

Issues<br />

Workflow<br />

<strong>User</strong><br />

This section provides you with a brief orientation to important<br />

Change <strong>Integrity</strong> concepts.<br />

Change <strong>Integrity</strong> uses issues to track changes in the software<br />

development cycle. For example, your administrator can configure<br />

Change <strong>Integrity</strong> in a way that a problem issue may be associated with<br />

a solution issue for easy tracking and monitoring of both issues. Each<br />

issue has an audit trail, which may be used to evaluate internal<br />

processes for the effectiveness of the problem resolution process. In<br />

effect, issues track all aspects of any engineering endeavor.<br />

Issue types capture and track a specific change request, defect,<br />

problem, solution, or task. For example, one issue type could record<br />

bugs and deficiencies in design. Another issue type could be used to<br />

request design changes that fix problems, or propose enhancements<br />

or new functionality for your product. Similarly, an issue type could<br />

be created that assigns work tasks that address problems, or prepare<br />

and implement solutions.<br />

Administrators create and define specific issue types; however, <strong>MKS</strong><br />

provides three solution templates with built in issue types.<br />

Specific issue types can be linked to one another as references to a<br />

specific issue. For example, an issue type that tracks problems could<br />

be linked to an issue type that provides solutions. Similarly, an issue<br />

type that sets out tasks could be linked to an issue type that tracks<br />

problems.<br />

Administrators define issue relationships.<br />

Each issue follows workflow, the process established by your<br />

administrator to capture and track information during your software<br />

development cycle. Each issue type can have its own set of states to<br />

advance through the development cycle. For example, a change<br />

request may go through the following states: submitted, work<br />

started, tested, reviewed, closed. Issues and their current states<br />

provide change management information necessary to support<br />

business decisions.<br />

A user is anyone who needs to work with Change <strong>Integrity</strong> issues.<br />

<strong>User</strong>s are assigned user permissions to them by the administrator.<br />

<strong>User</strong>s are also assigned to groups that have specific Change <strong>Integrity</strong><br />

group permissions assigned to them by the administrator.<br />

312 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Group<br />

Projects<br />

Query<br />

Reports<br />

Charts<br />

Change <strong>Integrity</strong> Concepts<br />

A group consists of one or more users who need to work with Change<br />

<strong>Integrity</strong> issues.<br />

Your administrator decides who does what. In setting up the project,<br />

the administrator assigns permissions to different groups for gaining<br />

access to certain areas within Change <strong>Integrity</strong>, and then puts each<br />

user into a group.<br />

For example, some groups may be designated for submitting and<br />

editing problems only, while the submitting of work tasks may be<br />

restricted to a group of managers.<br />

With that in mind, you should be aware that not all users will be able<br />

to use all of the functionality of Change <strong>Integrity</strong>. If you find you<br />

cannot do something that you think you should be able to do, then<br />

contact your administrator.<br />

Projects are labels that help you sort and organize issues in a<br />

hierarchical structure. For example, your administrator might<br />

organize projects according to:<br />

the modular structure of a software application<br />

the information architecture of a Web site<br />

group responsibilities within a department<br />

A query is a request to select and list the issue types that meet specific<br />

selection criteria. <strong>The</strong> selection criterion is a logical expression of<br />

specific values, or ranges of values, of the standard and custom fields<br />

of the issue type.<br />

Reports are summaries of the data in your project. Reports are based<br />

on the standard and custom fields of issue types. Reports can be<br />

customized to include images, fonts, hyperlinks, and can be saved as<br />

HTML files for viewing on the Web.<br />

Charts are graphs that present trends over time or distributions of the<br />

data in your project. Charts are based on the standard and custom<br />

fields of issue types. Trend charts may be displayed as line graphs.<br />

Distribution charts may be displayed as pie graphs or bar graphs.<br />

<strong>User</strong> <strong>Guide</strong> 313


Starting a Change <strong>Integrity</strong> Session<br />

Before You Start a Change <strong>Integrity</strong> Session<br />

Before you start a Change <strong>Integrity</strong> session, ensure you have the<br />

following:<br />

a copy of the Change <strong>Integrity</strong> client installed locally on your<br />

computer<br />

a Web browser, such as Netscape Navigator or Microsoft Internet<br />

Explorer, to use the Change <strong>Integrity</strong> Web interface<br />

the name of the Change <strong>Integrity</strong> server and port number you<br />

want to connect to<br />

your Change <strong>Integrity</strong> user name and password<br />

Starting a Change <strong>Integrity</strong> Session<br />

Logging In<br />

For both the Change <strong>Integrity</strong> graphic user interface and Web<br />

interface, you must log in to a database on a Change <strong>Integrity</strong> server<br />

before you can perform any Change <strong>Integrity</strong> operations.<br />

To log in using the graphic user interface:<br />

When you start the Change <strong>Integrity</strong> client for the first time, the <strong>MKS</strong><br />

Change <strong>Integrity</strong> login dialog box appears, prompting you for your<br />

login information.<br />

314 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Starting a Change <strong>Integrity</strong> Session<br />

1. In the Server field, enter the name of the server you want to<br />

connect to, for example, localhost, or the numerical IP address,<br />

for example, 1.234.53.<br />

Note Do not use back slashes (\) in the server name, for example,<br />

\\localhost.<br />

2. In the Port field, enter the server’s port number, for example,<br />

7001.<br />

3. In the Name field, enter your user name, for example, gmiller.<br />

<strong>User</strong> names must be a minimum of one character.<br />

4. In the Password field, enter your password, for example,<br />

docsteam. Passwords must be a minimum of eight characters.<br />

5. To save your password for every time you log in, select the<br />

Remember My Password checkbox.<br />

Note <strong>User</strong> names and passwords are assigned by your administrator—<br />

you should contact your administrator for the correct entries.<br />

6. To accept the log in information, click OK. To close the <strong>MKS</strong><br />

Change <strong>Integrity</strong> login dialog box, click Cancel.<br />

Change <strong>Integrity</strong> validates your login information, then the<br />

Change <strong>Integrity</strong> graphic user interface appears.<br />

To log in using the Web interface:<br />

1. Start your Web browser, such as Netscape Navigator or Microsoft<br />

Internet Explorer.<br />

2. Browse to the location of the Change <strong>Integrity</strong> home page. Your<br />

administrator can provide you with its location.<br />

A typical URL of the Change <strong>Integrity</strong> home page may be of the<br />

form:<br />

http://server_name:port_#/<br />

<strong>User</strong> <strong>Guide</strong> 315


Starting a Change <strong>Integrity</strong> Session<br />

<strong>The</strong> Change <strong>Integrity</strong> home page appears.<br />

3. Click Change <strong>Integrity</strong>.<br />

A browser password dialog box appears, prompting you for your<br />

Change <strong>Integrity</strong> user name and password.<br />

4. In the <strong>User</strong> Name field, enter your user name, for example,<br />

gmiller. <strong>User</strong> names must be a minimum of one character.<br />

5. In the Password field, enter your password, for example,<br />

docsteam. Passwords must be a minimum of eight characters.<br />

6. To accept the log in information, click OK. To close the login<br />

dialog box, click Cancel.<br />

316 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> Change <strong>Integrity</strong> Graphic <strong>User</strong> Interface<br />

Change <strong>Integrity</strong> validates your login information, then the<br />

Change <strong>Integrity</strong> Web interface appears.<br />

<strong>The</strong> Change <strong>Integrity</strong> Graphic <strong>User</strong> Interface<br />

<strong>The</strong> Application<br />

Window<br />

Title Bar<br />

Menu Bar<br />

Toolbar<br />

Query Bar<br />

Query Builder<br />

Query Results<br />

Context Menu<br />

Issue Details<br />

Status Bar<br />

<strong>The</strong> application window contains a number of common features<br />

explained in this section.<br />

Many of the features in the application window can be customized.<br />

For more information, see “Setting Session Preferences” on page 321.<br />

Menu Bar<br />

<strong>The</strong> menu bar is located directly below the title bar and contains<br />

available pull-down menus. When you first start Change <strong>Integrity</strong> as<br />

a user, there are seven menus in the menu-bar: Session, Query,<br />

Results, Issue, Reports, Charts, and Help.<br />

Note <strong>The</strong> Administration menu is only available to Change <strong>Integrity</strong><br />

administrators.<br />

<strong>User</strong> <strong>Guide</strong> 317


Starting a Change <strong>Integrity</strong> Session<br />

Toolbar<br />

Immediately below the menu bar is a toolbar that provides easy<br />

access to the most commonly used Change <strong>Integrity</strong> commands.<br />

Query Bar<br />

Below the toolbar is the Query Bar that provides easy access to saved<br />

queries. is a default query that queries for all issue types<br />

assigned to the current logged in user. If the user does not have any<br />

saved queries, this default query appears the first time a new user<br />

logs in. If another Change <strong>Integrity</strong> user creates a shared saved query,<br />

the shared saved query appears in the Query Bar instead of .<br />

Context Menu<br />

Change <strong>Integrity</strong> supports standard context menus. Selecting and<br />

right-clicking<br />

the Query Builder<br />

the Query Bar<br />

columns in the Query Results<br />

issues in the Query Results<br />

displays a menu of actions you can perform.<br />

Status Bar<br />

<strong>The</strong> status bar displays the number of issues visible in the Query<br />

Results, your user name, and the name and port number of the server<br />

you are connected to. You can hide or show the status bar.<br />

Query Builder<br />

When you first launch Change <strong>Integrity</strong>, the Query Builder appears<br />

on the far-left side of the application window, below the Query Bar.<br />

<strong>The</strong> Query Builder provides filters that allow you to focus your<br />

queries of specific issue types. <strong>The</strong> Type filter box is always present.<br />

Additional filters can be selected by right-clicking the Query Builder<br />

and choosing a filter from the context menu.<br />

Query Results<br />

<strong>The</strong> Query Results appear on the far-right side of the application<br />

window below the Query Bar. When you run a query, the results are<br />

displayed in the Query Results. You can choose specific display<br />

options, and double-click an issue to display specific issue<br />

information in the Issue Details.<br />

318 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Issue Details<br />

<strong>The</strong> Change <strong>Integrity</strong> Graphic <strong>User</strong> Interface<br />

<strong>The</strong> Issue Details displays specific information about a selected issue.<br />

<strong>The</strong> top of the Issue Details shows the issue type, ID, who created the<br />

issue and when, and who last modified the issue and when.<br />

<strong>The</strong> Issue Details contains five tabbed panels:<br />

<strong>The</strong> Fields panel displays a summary of the issue, the issue’s<br />

state, who the issue is assigned to, the group the issue is assigned<br />

to, the project the issue is assigned to, and custom field<br />

information.<br />

<strong>The</strong> History panel displays a read-only log of all state changes to<br />

the issue.<br />

<strong>The</strong> Attachments panel displays a list of attached files.<br />

<strong>The</strong> Relationships panel displays a list of related issues.<br />

<strong>The</strong> Change Package panel displays files that are affected by an<br />

issue type. For example, a solution’s change package might<br />

include files that are required to change in order to satisfy a<br />

problem.<br />

<strong>User</strong> <strong>Guide</strong> 319


Starting a Change <strong>Integrity</strong> Session<br />

<strong>The</strong> Change <strong>Integrity</strong> Web Interface<br />

Query Toolbar<br />

Status<br />

Toolbar<br />

Content Page<br />

<strong>The</strong> Change <strong>Integrity</strong> Web interface contains a number of common<br />

features explained in this section.<br />

Note Your administrator can customize the appearance of the Change<br />

<strong>Integrity</strong> Web interface, for example, toolbar buttons, and background<br />

colors.<br />

Toolbar<br />

In the left frame is a toolbar that provides easy access to the most<br />

commonly used Change <strong>Integrity</strong> commands: submitting issues,<br />

viewing charts, viewing reports, logging out, choosing query display<br />

options, and viewing the Change <strong>Integrity</strong> Web interface online help.<br />

Query Toolbar<br />

In the top frame is the Query toolbar that allows you to perform<br />

query functions: creating, saving, running, viewing, editing, and<br />

deleting queries.<br />

320 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Setting Session Preferences<br />

My Inbox is a default saved query that queries for all issue types<br />

assigned to the current logged in user. If the user does not have any<br />

saved queries, this default query appears the first time a new user<br />

logs in. If another Change <strong>Integrity</strong> user creates a shared saved query,<br />

the shared saved query appears in the Saved Queries drop-down<br />

menu instead of My Inbox.<br />

Content Page<br />

Whenever you perform a Change <strong>Integrity</strong> operation from the<br />

toolbar or Query toolbar, command options and results are displayed<br />

in the right frame, for example, query results.<br />

Status<br />

Setting Session Preferences<br />

<strong>The</strong> status of a Change <strong>Integrity</strong> session is displayed in two areas:<br />

the browser’s address bar displays the server name and port<br />

number that you are connected to<br />

the left frame displays your user name under the <strong>MKS</strong> logo<br />

Session preferences allow you to customize your Change <strong>Integrity</strong><br />

client session and configure email notification.<br />

To set session preferences in the graphic user interface:<br />

1. Choose Session > Preferences.<br />

<strong>User</strong> <strong>Guide</strong> 321


Starting a Change <strong>Integrity</strong> Session<br />

For more information about<br />

running queries, see “Running<br />

Queries” on page 359.<br />

<strong>The</strong> Preferences dialog box appears.<br />

2. To automatically connect to a database on a Change <strong>Integrity</strong><br />

server when you launch the Change <strong>Integrity</strong> client, select the<br />

Automatic Connect checkbox.<br />

With this option selected, you do not have to enter your host<br />

information, user name, and password every time you log in.<br />

3. To save your password for every time you log in, select the<br />

Remember My Password checkbox.<br />

This option is also available from the <strong>MKS</strong> Change <strong>Integrity</strong> login<br />

dialog box.<br />

4. To run a query only when you choose Query > Run, select the<br />

Query Only on Demand checkbox.<br />

If you do not select this checkbox, Change <strong>Integrity</strong> runs a query<br />

as you specify query filters.<br />

To set layout preferences:<br />

1. Click the Layout tab.<br />

<strong>The</strong> Layout panel appears.<br />

322 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Email<br />

Notification<br />

2. Set up your layout as follows:<br />

Setting Session Preferences<br />

To display the Query Bar, select the Show Query Bar checkbox<br />

under Query Bar.<br />

To choose a position for the Query Bar, select the Horizontal or<br />

Vertical radio button.<br />

To display the Query Builder, select the Show Query Builder<br />

checkbox under Query Builder.<br />

To choose a position for the Query Builder, select the Align<br />

Left or Align Right radio button.<br />

To choose a position for the Issue Details, select the Above<br />

Query Results or Below Query Results radio button.<br />

To show the status bar, select the Show Status Bar checkbox.<br />

Any Change <strong>Integrity</strong> user can be notified via email whenever a new<br />

issue is submitted, or issue information changes. This is useful for<br />

users who need to review and approve state changes on new<br />

submissions or existing issues, and users who need to work on issues<br />

assigned to them. Notifications also keep users informed of project<br />

progress.<br />

You configure Change <strong>Integrity</strong> to send you email notification by<br />

creating rules. Rules are made up of conditions, which are logical<br />

expressions of specific issue field changes that you want to be<br />

notified about. For example, you could create a simple rule<br />

containing one condition that sends you email every time a new<br />

<strong>User</strong> <strong>Guide</strong> 323


Starting a Change <strong>Integrity</strong> Session<br />

problem assigned to you is submitted. Similarly, you could create a<br />

complex rule containing two conditions that send you email every<br />

time a new problem assigned to you is submitted, and when existing<br />

problems become assigned to you. Rules can contain as many<br />

conditions as you want.<br />

To set email notification preferences:<br />

1. Click the Notifications tab.<br />

<strong>The</strong> Notifications panel appears.<br />

2. In the Address field, enter your email address, for example,<br />

omille@mks.com.<br />

3. If certain conditions are met, nodes specify if email notification<br />

will be sent. Choose a node option by clicking a button:<br />

And specifies that all of the conditions specified must be true<br />

for an email notification to be sent. For example, if an issue’s<br />

assigned group = documentation and the project =<br />

editor, then an email notification is sent.<br />

Or specifies that one or more of the conditions must be true in<br />

order for an email notification to be sent. For example, if an<br />

issue’s state = submitted, but the priority does not =<br />

high, an email notification is sent.<br />

Swap replaces the selected node with the opposite node. For<br />

example, swapping an Or node replaces it with an And node.<br />

Remove deletes the selected node.<br />

324 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Setting Session Preferences<br />

Tip You do not need to use the And and Or nodes if your rule contains<br />

only one condition.<br />

4. Under Condition, choose a field to be notified about from the Field<br />

drop-down menu, for example, Assigned <strong>User</strong>.<br />

You can select from two types of fields: prime fields and non-prime<br />

fields. A prime field, indicated by a prime symbol ( ), specifies a<br />

new value. A non-prime field specifies an existing value.<br />

5. From the Operator drop-down menu, choose an operator. <strong>The</strong><br />

available operators are:<br />

= equal to<br />

not equal to<br />

> greater than<br />

>= greater than or equal to<br />


Starting a Change <strong>Integrity</strong> Session<br />

8. To accept the changes, click OK. To discard any changes, click<br />

Cancel.<br />

Once you create a rule, you receive email notification whenever an<br />

issue matches the conditions specified in your rule, for example,<br />

whenever an issue becomes assigned to you.<br />

326 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Saving Session<br />

Preferences<br />

Setting Session Preferences<br />

<strong>The</strong> email displays the issue type; ID; summary; who edited the issue<br />

and when; a hyperlink, that when clicked opens the issue in the<br />

Change <strong>Integrity</strong> Web interface; modified fields; and comments.<br />

To set toolbar preferences:<br />

1. Click the Toolbars tab.<br />

<strong>The</strong> Toolbar panel appears.<br />

2. Choose an option by selecting a radio button:<br />

Show Only Images displays only images on toolbar buttons.<br />

Show Images and Text displays images and text on toolbar<br />

buttons.<br />

Show Images and Selective Text displays images and text on<br />

some of the toolbar buttons.<br />

Show Only Text displays only text on toolbar buttons.<br />

To save session preferences:<br />

To accept the session preferences, click OK. To discard any changes to<br />

the session preferences, click Cancel<br />

<strong>User</strong> <strong>Guide</strong> 327


Starting a Change <strong>Integrity</strong> Session<br />

Ending a Change <strong>Integrity</strong> Session<br />

Logging Out<br />

Closing a<br />

Session<br />

You can log out of Change <strong>Integrity</strong> and log in as another user, or<br />

allow another user to log in.<br />

To log out using the graphic user interface:<br />

Choose Session > Logout.<br />

<strong>The</strong> <strong>MKS</strong> Change <strong>Integrity</strong> login dialog box appears.<br />

To log in again, see “Logging In” on page 314.<br />

To log out using the Web interface:<br />

Click .<br />

<strong>The</strong> Change <strong>Integrity</strong> home page appears.<br />

To log in again, see “Logging In” on page 314.<br />

Closing a Change <strong>Integrity</strong> session shuts down the client and<br />

disconnects from the server.<br />

To close a session using the graphic user interface:<br />

Choose Session > Exit.<br />

<strong>The</strong> Change <strong>Integrity</strong> client shuts down and disconnects from the<br />

server.<br />

328 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


To close a session using the Web interface:<br />

1. Click .<br />

<strong>The</strong> Change <strong>Integrity</strong> home page appears.<br />

2. Close the browser window.<br />

Ending a Change <strong>Integrity</strong> Session<br />

<strong>The</strong> Change <strong>Integrity</strong> client shuts down and disconnects from the<br />

server.<br />

<strong>User</strong> <strong>Guide</strong> 329


Starting a Change <strong>Integrity</strong> Session<br />

330 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Submitting Issues<br />

11<br />

This chapter describes how to submit issues in the Change <strong>Integrity</strong><br />

graphic user interface and Web interface.<br />

<strong>The</strong> chapter covers:<br />

submitting an issue<br />

adding attachments to an issue<br />

linking an issue with a submitted issue<br />

<strong>User</strong> <strong>Guide</strong> 331


Submitting Issues<br />

Submitting an Issue<br />

To submit an issue in the graphic user interface:<br />

1. Choose Issue > New, or click .<br />

2. Select an issue type.<br />

Note <strong>The</strong> list of available issue types may vary depending on the issue<br />

types your administrator created. Problems, solutions, and tasks are<br />

issue types provided with Change <strong>Integrity</strong>.<br />

<strong>The</strong> Submit New dialog box appears.<br />

3. Enter the issue data in the fields provided.<br />

In the Summary field, enter a brief summary of the issue, up<br />

to 100 alpha-numeric characters.<br />

In the State drop-down menu, choose a state for the issue, for<br />

example, Submitted. Your administrator defines states.<br />

332 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Submitting an Issue<br />

In the Assigned <strong>User</strong> drop-down menu, assign a user to the<br />

issue. Your administrator defines users.<br />

Note Assigning an issue to a user does not automatically assign the<br />

issue to the user’s assigned group. You must select the user’s assigned<br />

group from the Assigned Group drop-down menu.<br />

In the Assigned Group drop-down menu, assign a group to<br />

the issue, for example, development. Your administrator<br />

defines groups.<br />

In the Project drop-down menu, assign the issue to a specific<br />

project. Your administrator defines projects.<br />

Your administrator defines custom fields, for example, Fix<br />

Progress. Custom fields can be either text fields or dropdown<br />

menus.<br />

4. If you do not know the information required for a specific field,<br />

click the field.<br />

A icon appears to the left of the field.<br />

5. Click the icon or press F2.<br />

unspecified appears in the field.<br />

6. To edit the field, click the field and enter text or choose a menu<br />

item.<br />

7. To submit the issue, click OK. To close the Submit New dialog box<br />

without saving any changes, click Cancel.<br />

<strong>The</strong> issue is submitted and appears in the Query Results for the<br />

specified project.<br />

<strong>User</strong> <strong>Guide</strong> 333


Submitting Issues<br />

To submit an issue in the Web interface:<br />

1. Under Submit, click an issue type button, for<br />

example, .<br />

Note Your administrator defines issue types. Problems, solutions, and<br />

tasks are example issue types provided with Change <strong>Integrity</strong>.<br />

<strong>The</strong> Submit Issue page appears.<br />

2. Enter the issue data in the fields provided.<br />

In the Summary field, enter a brief summary of the issue, up<br />

to 100 alpha-numeric characters.<br />

In the State drop-down menu, choose a state for the issue, for<br />

example, Submitted. Your administrator defines states.<br />

In the Assigned <strong>User</strong> drop-down menu, assign a user to the<br />

issue. Your administrator defines users.<br />

Note Assigning an issue to a user does not automatically assign the<br />

issue to the user’s assigned group. You must select the user’s assigned<br />

group from the Assigned Group drop-down menu.<br />

In the Assigned Group drop-down menu, assign a group to<br />

the issue, for example, development. Your administrator<br />

defines groups.<br />

334 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Relating an<br />

Issue With a<br />

Submitted Issue<br />

For information on opening<br />

the Submit New dialog box,<br />

see “Submitting an Issue” on<br />

page 332.<br />

Submitting an Issue<br />

In the Project drop-down menu, assign the issue to a specific<br />

project. Your administrator defines projects.<br />

Your administrator defines custom fields, for example, Fix<br />

Progress. Custom fields can be either text fields or dropdown<br />

menus.<br />

Note In date fields, use the format mm/dd/yyyy.<br />

3. If you do not know the required information for a specific field,<br />

select the field’s checkbox. (Unspecified) will appear in the field<br />

after it is submitted.<br />

4. To submit the issue, click . To make changes, click the<br />

browser’s Back button.<br />

<strong>The</strong> issue is submitted and appears in the Issue Details page.<br />

Issues can be related to one another as references. For example, an<br />

issue type that tracks problems could be linked to an issue type that<br />

provides solutions. Similarly, an issue type that sets out tasks could<br />

be linked to an issue type that tracks problems.<br />

Note Your administrator defines issue types and issue type<br />

relationships.<br />

To relate an issue with a submitted issue in the graphic user<br />

interface:<br />

1. With the Submit New dialog box open, click the Relationships tab.<br />

<strong>The</strong> Relationships panel appears.<br />

<strong>User</strong> <strong>Guide</strong> 335


Submitting Issues<br />

2. Click .<br />

<strong>The</strong> Add Linked Issue dialog box appears.<br />

3. Enter the issue’s ID, for example, 67.<br />

4. Click OK.<br />

<strong>The</strong> issue appears in the Relationships list.<br />

336 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Submitting an Issue<br />

5. Repeat for all issues you want to associate with the issue you are<br />

submitting.<br />

To relate an issue with a submitted issue in the Web interface:<br />

1. With the Submit Issue page open, click the Relationships tab.<br />

<strong>The</strong> Relationships panel appears.<br />

2. Enter the issue’s ID, for example, 43.<br />

3. Click Add Relationship.<br />

<strong>User</strong> <strong>Guide</strong> 337


Submitting Issues<br />

<strong>The</strong> issue appears in the Relationships list.<br />

4. Repeat for all issues you want to associate with the issue you are<br />

submitting.<br />

Removing a Related Issue<br />

To remove a related issue in the graphic user interface:<br />

1. With the Submit New dialog box open, click the Relationships tab.<br />

<strong>The</strong> Relationships panel appears.<br />

2. Select the issue from the Relationships list.<br />

3. Click .<br />

<strong>The</strong> issue is removed from the Relationships list.<br />

338 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


To remove a related issue in the Web interface:<br />

Submitting an Issue<br />

1. With the Submit Issue page open, click the Relationships tab.<br />

<strong>The</strong> Relationships panel appears.<br />

2. Select the related issue’s checkbox from the Relationships list.<br />

3. Click Remove Selected.<br />

<strong>The</strong> issue is removed from the Relationships list.<br />

Opening a Related Issue<br />

You can view complete information about an issue related to a<br />

submitted issue.<br />

To open a related issue in the graphic user interface:<br />

See “Selecting Issues to View” on page 367.<br />

To open a related issue in the Web interface:<br />

1. Submit the issue, as explained in “Submitting an Issue” on page<br />

332.<br />

<strong>The</strong> Issue Details page appears.<br />

2. Click the Relationships tab.<br />

<strong>User</strong> <strong>Guide</strong> 339


Submitting Issues<br />

Adding Attachments to an Issue<br />

For information on opening<br />

the Submit New dialog box,<br />

see “Submitting an Issue” on<br />

page 332.<br />

<strong>The</strong> Relationships panel appears.<br />

3. Click the issue’s ID from the Relationships list.<br />

<strong>The</strong> issue opens in the Issue Details page.<br />

Change <strong>Integrity</strong> allows you to attach copies of a file to an issue so<br />

other users may view them.<br />

To add an attachment to an issue in the graphic user interface:<br />

1. With the Submit New dialog box open, click the Attachments tab.<br />

<strong>The</strong> Attachments panel appears.<br />

340 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


2. Click .<br />

<strong>The</strong> Add Attachments dialog box appears<br />

3. Browse to a specific file on your local drive.<br />

4. Click Open.<br />

Submitting an Issue<br />

<strong>User</strong> <strong>Guide</strong> 341


Submitting Issues<br />

<strong>The</strong> selected file is added to the Attachments list.<br />

5. Repeat for all files you want to attach to the issue.<br />

To add an attachment to an issue in the Web interface:<br />

1. With the Submit Issue page open, click the Attachments tab.<br />

<strong>The</strong> Attachments panel appears.<br />

2. Click Browse.<br />

<strong>The</strong> Choose file dialog box appears.<br />

3. Browse to a specific file on your local drive.<br />

4. Click Open.<br />

<strong>The</strong> file appears in the Filename field.<br />

5. Click Add Attachment.<br />

342 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>The</strong> selected file is added to the Attachments list.<br />

6. Repeat for all files you want to attach to the issue.<br />

Removing an Attachment<br />

To remove an attachment in the graphic user interface:<br />

Submitting an Issue<br />

1. With the Submit New dialog box open, click the Attachments tab.<br />

<strong>The</strong> Attachments panel appears.<br />

2. Select the attachment from the Attachments list.<br />

3. Click .<br />

<strong>The</strong> attachment is removed from the Attachments list.<br />

<strong>User</strong> <strong>Guide</strong> 343


Submitting Issues<br />

To remove an attachment in the Web interface:<br />

1. With the Submit Issue page open, click the Attachments tab.<br />

<strong>The</strong> Attachments panel appears.<br />

2. Select the attachment’s checkbox from the Attachments list.<br />

3. Click Remove Selected Attachments.<br />

<strong>The</strong> attachment is removed from the Attachments list.<br />

Opening an Attachment<br />

To open an attachment in the graphic user interface:<br />

1. With the Submit New dialog box open, click the Attachments tab.<br />

<strong>The</strong> Attachments panel appears.<br />

2. Select the attachment from the Attachments list.<br />

344 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


3. Click .<br />

<strong>The</strong> attachment opens in its associated application.<br />

Submitting an Issue<br />

To open an attachment in the Web interface:<br />

1. Submit the issue, as explained in “Submitting an Issue” on page<br />

332.<br />

<strong>The</strong> Issue Details page appears.<br />

2. Click the Attachments tab.<br />

<strong>User</strong> <strong>Guide</strong> 345


Submitting Issues<br />

3. Click the file name from the Attachments list.<br />

<strong>The</strong> attachment opens in a new browser window.<br />

Saving an Attachment<br />

You can save attachments to your local drive for later viewing.<br />

To save an attachment in the graphic user interface:<br />

1. With the Submit New dialog box open, click the Attachments tab.<br />

<strong>The</strong> Attachments panel appears.<br />

2. Select the attachment from the Attachments list.<br />

3. Click .<br />

<strong>The</strong> Save Attachments dialog box appears.<br />

4. Browse to the location on your local drive where you want to<br />

save the attachment.<br />

5. Click Save As.<br />

To save an attachment in the Web interface:<br />

1. Submit the issue, as explained in “Submitting an Issue” on page<br />

332.<br />

<strong>The</strong> Issue Details page appears.<br />

346 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


2. Click the Attachments tab.<br />

3. <strong>The</strong> Attachments panel appears.<br />

Submitting an Issue<br />

4. Click the file name from the Attachments list.<br />

<strong>The</strong> attachment opens in a new browser window.<br />

5. Choose File > Save As.<br />

A standard Save dialog box appears.<br />

6. Browse to the location on your local drive where you want to<br />

save the attachment.<br />

7. Click Save As.<br />

<strong>User</strong> <strong>Guide</strong> 347


Submitting Issues<br />

348 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Queries<br />

12<br />

You can define and store any number of queries using Change<br />

<strong>Integrity</strong>. A query is basically a request to select and list the issue<br />

types that meet specific selection criteria. <strong>The</strong> selection criterion is a<br />

logical expression of specific values, or ranges of values, of the<br />

standard and custom fields of the issue.<br />

<strong>The</strong> queries you define are stored on the Change <strong>Integrity</strong> client, but<br />

they may be run by other users if the saved query is shared.<br />

Queries are created in the Query Builder and can be saved for future<br />

use.<br />

This chapter explains how to:<br />

create a new query<br />

create saved queries<br />

run queries<br />

<strong>User</strong> <strong>Guide</strong> 349


Queries<br />

Creating a New Query<br />

To create a new query in the graphic user interface:<br />

1. From the drop-down menu in the Type filter box, choose an issue<br />

type to query by selecting an issue type checkbox. Not selecting<br />

an issue type checkbox means that the query is not restricted to<br />

any issue types. You can select multiple issue types.<br />

Note Your administrator defines issue types.<br />

2. Right-click the Query Builder and select filters specific to your<br />

query from the context menu:<br />

Tip To insert all filters, right-click the Query Builder and choose Insert<br />

All from the context menu. To hide a specific filter, right-click the filter<br />

box and choose Hide from the context menu. To hide all filters, right-click<br />

the Query Builder and choose Hide All from the context menu.<br />

ID queries by issue ID. From the operator drop-down menu,<br />

choose an operator. In the ID field, enter the issue ID, or click<br />

or to select an issue ID.<br />

350 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Creating a New Query<br />

Created By queries by the user who created the issue. From<br />

the user drop-down menu, select a user checkbox. Your<br />

administrator defines users.<br />

Created Date queries by the date the issue was created. From<br />

the From drop-down menu, select the date you want the<br />

query to begin with by choosing a date from the calendar.<br />

From the To drop-down menu, select the date you want the<br />

query to end with by choosing a date from the calendar.<br />

Note <strong>The</strong> To field in all date queries is mutually exclusive. For example,<br />

if you wanted to view all issues created up to March 25, 2000, you would<br />

enter March 26, 2000 in the To field.<br />

Modified By queries by the user who last modified the issue.<br />

From the user drop-down menu, select a user checkbox. Your<br />

administrator defines users.<br />

Modified Date queries by the date the issue was last modified.<br />

From the From drop-down menu, select the date you want<br />

the query to begin with by choosing a date from the calendar.<br />

From the To drop-down menu, select the date you want the<br />

query to end with by choosing a date from the calendar.<br />

Summary queries by words in the issue’s summary. In the<br />

summary field, enter a word or phrase to search for up to 100<br />

characters. All text field queries are case-sensitive.<br />

Assigned <strong>User</strong> queries by the user who is assigned to the<br />

issue. From the user drop-down menu, select a user<br />

checkbox. Your administrator defines users.<br />

Assigned Group queries by the group assigned to the issue.<br />

From the group drop-down menu, select a group checkbox.<br />

Your administrator defines groups.<br />

Project queries by project. Choose a project. Your<br />

administrator defines projects.<br />

Note To choose multiple projects, select a project while holding down<br />

the Ctrl or Shift keys, then select additional projects. You can open and<br />

close project folders by double-clicking them or using the and<br />

icons.<br />

<strong>User</strong> <strong>Guide</strong> 351


Queries<br />

State queries by the issue’s state. From the issue drop-down<br />

menu, select a state checkbox. Your administrator defines<br />

states.<br />

Custom fields, such as Description, can be either drop-down<br />

menus or text fields. Your administrator defines custom<br />

fields. Text field queries are case-sensitive.<br />

Tip To close an open filter box you do not want to use, click .<br />

3. For the filters you have selected, select the filter checkboxes ( ).<br />

To create a new query in the Web interface:<br />

Note To create a query in the Web interface, you must save it.<br />

1. Click .<br />

<strong>The</strong> Query Details page appears.<br />

2. In the Name field, enter a name for the query.<br />

3. To share the query with other Change <strong>Integrity</strong> users, select the<br />

Shared checkbox.<br />

4. In the Description field, enter a description of the query.<br />

5. Under Types, select issue types to query for by selecting issue<br />

type checkboxes. Not selecting an issue type checkbox means<br />

that the query is not restricted to any issue types. Your<br />

administrator defines issue types.<br />

352 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Creating a New Query<br />

6. Choose a field to query for by selecting a field from the Fields<br />

drop-down menu.<br />

7. Click Add.<br />

<strong>The</strong> field appears below the Fields drop-down menu.<br />

8. To remove the field, click Remove.<br />

<strong>The</strong> field is removed.<br />

9. Repeat for as many fields as you want to add to the query.<br />

10. In the available fields under the Fields drop-down menu, select<br />

values to query for. Note the following:<br />

To select multiple values in a drop-down menu, select a value<br />

in a field while holding down Ctrl or Shift, then select<br />

additional values.<br />

You can enter up to 100 characters in text fields.<br />

Text field queries are case-sensitive.<br />

Use the format mm/dd/yyyy in date fields.<br />

11. To save the query, click .<br />

<strong>The</strong> results of the query appears in the Query Results page.<br />

<strong>User</strong> <strong>Guide</strong> 353


Queries<br />

Creating Saved Queries<br />

To create a saved query in the graphic user interface:<br />

Note For information on creating a saved query in the Web interface,<br />

see “Creating a New Query” on page 350.<br />

1. Choose Query > New.<br />

<strong>The</strong> New Query dialog box appears.<br />

Tip You can also access the Query menu by right-clicking the Query Bar.<br />

2. In the Name field, enter a name for the new query.<br />

3. To allow all Change <strong>Integrity</strong> users access to the query, select the<br />

Shared checkbox.<br />

4. Choose an image option for your saved query by selecting a radio<br />

button:<br />

Use default image uses the default image for the saved<br />

query’s icon.<br />

354 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Creating Saved Queries<br />

Use custom image to select a custom image for the saved<br />

query’s icon. Click Select and browse to an image file.<br />

No Image is specified for the saved query’s icon.<br />

Note Images must be GIF or JPEG format, and no larger than 16 by 24<br />

pixels.<br />

5. Click the Description tab.<br />

<strong>The</strong> Description panel appears.<br />

6. In the Description field, enter a description of the saved query.<br />

7. Click OK. To discard the new query, click Cancel.<br />

<strong>The</strong> new query appears in the Query Bar.<br />

8. Click the saved query from the Query Bar.<br />

9. Create a query in the Query Builder, as described in “Creating a<br />

New Query” on page 350.<br />

<strong>User</strong> <strong>Guide</strong> 355


Queries<br />

Reverting a Saved Query<br />

Deleting a Saved Query<br />

10. Choose Query > Save.<br />

<strong>The</strong> query is saved.<br />

While making changes to a saved query, you can undo the changes<br />

and revert to the original saved query.<br />

Note Reverting a saved query only works if a save has not been done.<br />

To revert a saved query (graphic user interface only):<br />

Choose Query > Revert, or right-click the query and choose Revert<br />

from the context menu.<br />

<strong>The</strong> query reverts back to its original state.<br />

Eventually, you may want to delete saved queries that you no longer<br />

use, or if you have too many to manage.<br />

Note Shared queries can only be deleted by the owner. In the graphic<br />

user interface, the Save, Revert, and Delete menu items in the Query<br />

menu are greyed out. In the Web interface, a dialog appears, informing<br />

you can not delete the query.<br />

To delete a saved query in the graphic user interface:<br />

1. Select the query you want to delete from the Query Bar.<br />

<strong>The</strong> Query Results appear.<br />

2. Choose Query > Delete, or right-click the query and choose Delete<br />

from the context menu.<br />

Change <strong>Integrity</strong> asks you to confirm that you want to delete the<br />

query.<br />

3. To delete the query, click Yes. To cancel the operation, click No.<br />

356 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


To delete a saved query in the Web interface:<br />

Note Shared queries can only be deleted by the owner.<br />

Creating Saved Queries<br />

1. Select the query from the Saved Queries drop-down menu.<br />

<strong>The</strong> Query Results page appears.<br />

2. Click .<br />

Change <strong>Integrity</strong> asks you to confirm that you want to delete the<br />

query.<br />

3. To delete the query, click Yes. To cancel the operation, click No.<br />

Viewing and Editing Saved Query Properties<br />

To view and edit saved query properties in the graphic user<br />

interface:<br />

Note Share queries can only be edited by the owner. <strong>The</strong> edit options<br />

will be greyed out.<br />

1. Select the query from the Query Bar.<br />

<strong>The</strong> Query Results appear.<br />

2. Choose Query > Properties, or right-click the query and choose<br />

Properties from the context menu.<br />

<strong>User</strong> <strong>Guide</strong> 357


Queries<br />

<strong>The</strong> Edit Query dialog box appears.<br />

3. Edit the query properties, if desired.<br />

4. Click OK to save any changes made to the query. Click Cancel to<br />

discard any changes made to the query.<br />

To view and edit saved query properties in the Web interface:<br />

1. Select a saved query from the Saved Query drop-down menu.<br />

<strong>The</strong> Query Results page appears.<br />

2. Click .<br />

<strong>The</strong> Query Details page appears.<br />

358 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Running Queries<br />

3. Make changes to the query as needed.<br />

Running Queries<br />

4. To save any changes made, click . To discard any changes<br />

made, click the browser’s Back button.<br />

If you made changes to the saved query, the results of the query<br />

appear in Query Results page.<br />

To run a new query in the graphic user interface:<br />

1. Create a query in the Query Builder.<br />

2. Choose Query > Run.<br />

Note Choosing Query > Run only works if Query Only on Demand is<br />

selected in the Preferences dialog box. For more information, see<br />

“Setting Session Preferences” on page 321.<br />

<strong>The</strong> results of your query appear in the Query Results.<br />

<strong>User</strong> <strong>Guide</strong> 359


Queries<br />

To run a query in the Web interface, see “Creating a New Query” on<br />

page 350.<br />

To run a saved query in the graphic user interface:<br />

Click a saved query from the Query Bar, or right-click the query and<br />

choose Run from the context menu.<br />

<strong>The</strong> results of your query appear in the Query Results.<br />

To run a saved query in the Web interface:<br />

Choose a saved query from the Saved Query drop-down menu.<br />

<strong>The</strong> results of your query appear in the Query Results page.<br />

360 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Refreshing Queries<br />

Running Queries<br />

After you run a query, you may want to run it again to see if any<br />

changes have been made to the issues included in the query<br />

Note Queries automatically refresh in the graphic user interface.<br />

To refresh a query (Web interface only):<br />

Click .<br />

<strong>The</strong> results of the query appear in the Query Results page.<br />

<strong>User</strong> <strong>Guide</strong> 361


Queries<br />

362 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Viewing and Editing<br />

Issues<br />

13<br />

When you run a query, you are able to see query results, select<br />

individual issues for further viewing, and edit issues, depending on<br />

the permissions given to you by your administrator.<br />

This chapter explains how to:<br />

view query results<br />

view issue information<br />

edit issue information<br />

edit multiple issues<br />

print issue information<br />

save issue information<br />

<strong>User</strong> <strong>Guide</strong> 363


Viewing and Editing Issues<br />

Viewing Query Results<br />

For information on creating<br />

and running queries, see<br />

“Queries” on page 349.<br />

After you run a query, the results appear in the Query Results. You<br />

can view the issues in a number of ways, such as sorting by a specific<br />

field, or in ascending or descending order. In addition, there are<br />

many common list actions you can perform for viewing and sorting<br />

issues.<br />

To view specific columns in the graphic user interface:<br />

1. Choose Results > Columns, or right-click a column title and<br />

choose Columns from the context menu.<br />

<strong>The</strong> Columns dialog box appears.<br />

2. To add or remove a column from the Query Results, select a<br />

column and click the add ( ) or remove ( ) buttons.<br />

Note Your administrator sets the fields you can select in the Columns<br />

dialog box.<br />

3. To reorder the columns, select a column and click the move up<br />

( ) or move down ( ) buttons.<br />

4. To specify a column’s pixel width, select a column and enter a<br />

value up to 1000 pixels in the pixel width box.<br />

5. To accept the changes, click OK. To discard any changes made,<br />

click Cancel.<br />

364 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Viewing Query Results<br />

If any changes were made in the Columns dialog box, the issues<br />

are re-organized in the Query Results.<br />

Common List Actions<br />

<strong>The</strong> following actions are common to all lists in the graphic user<br />

interface:<br />

To see additional details, scroll the data grid lists horizontally<br />

and vertically.<br />

<strong>The</strong> list is unsorted by default. To sort the list by a specific<br />

column, click any column’s title once—the sort sequence is<br />

displayed in the column’s title by an arrow.<br />

You can re-arrange columns by clicking a column’s title and<br />

dragging it to a new position.<br />

You can also expand or shrink any column by selecting the<br />

vertical dividing bar between two fields on the column title line,<br />

and then dragging it left or right.<br />

Choosing Results > Sort By allows you to select several sort<br />

options:<br />

Sort Ascending sorts the selected column title in ascending<br />

order.<br />

Sort Descending sorts the selected column in descending<br />

order.<br />

You can sort query results by the fields available in the Sort<br />

By drop-down menu. <strong>The</strong> available fields are set in the<br />

Columns dialog box.<br />

Right-clicking a column title allows you to choose several options<br />

from a context menu:<br />

Hide hides the selected column title from view.<br />

Sort allows you to sort the column title in Ascending or<br />

Descending order.<br />

Columns brings up the Columns dialog box so you can set<br />

view options in the Query Results, as explained earlier.<br />

<strong>User</strong> <strong>Guide</strong> 365


Viewing and Editing Issues<br />

You can show custom fields in the Query Results by selecting<br />

a custom field from the context menu. Your administrator<br />

defines custom fields.<br />

To view specific columns in the Web interface:<br />

1. Click .<br />

<strong>The</strong> Columns page appears.<br />

2. Choose the fields you want to view by selecting field checkboxes.<br />

Note Your administrator sets the fields you can select in the Columns<br />

page.<br />

3. To accept the changes made, click Apply. To discard any changes<br />

made, click Reset.<br />

366 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Selecting Issues to View<br />

If any changes were made in the Columns page, the issues are reorganized<br />

in the Query Results page.<br />

Common List Actions<br />

Selecting Issues to View<br />

<strong>The</strong> following actions are common to all lists in the Web interface:<br />

To see additional details, scroll the data grid lists horizontally<br />

and vertically.<br />

<strong>The</strong> list is unsorted by default. To sort the list by a specific<br />

column, click any column’s title once—the sort sequence is<br />

displayed in the column’s title by an arrow.<br />

To view issue details in the graphic user interface:<br />

Select an issue to open by double-clicking the appropriate line in the<br />

Query Results, generated either by listing all issues, or as a result of a<br />

specific issue type query.<br />

<strong>User</strong> <strong>Guide</strong> 367


Viewing and Editing Issues<br />

<strong>The</strong> issue opens in the Issue Details.<br />

<strong>The</strong> top of the Issue Details shows the issue type, ID, who created the<br />

issue and when, and who last modified the issue and when.<br />

To view specific information about the issue, click a tab:<br />

<strong>The</strong> Fields panel displays a summary of the issue, the issue’s<br />

state, who the issue is assigned to, the group the issue is assigned<br />

to, the project the issue is assigned to, a description of the issue,<br />

and custom field information.<br />

<strong>The</strong> History panel displays a read-only log of all state changes to<br />

the issue.<br />

<strong>The</strong> Attachments panel displays a list of attached files.<br />

To open an attachment, see “Opening an Attachment” on page<br />

344.<br />

To save an attachment, see “Saving an Attachment” on page 346.<br />

<strong>The</strong> Relationships panel displays a list of related issues.<br />

To open a related issue, select it from the Attachments list, then<br />

click .<br />

<strong>The</strong> issue opens in the Issue Details.<br />

368 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For more information on<br />

change packages, see<br />

“Integrated Version Control”<br />

on page 437.<br />

Selecting Issues to View<br />

<strong>The</strong> Change Package panel displays a list of files that are affected<br />

by an issue type. For example, a solution’s change package might<br />

include files that are required to change in order to satisfy a<br />

problem.<br />

Tip To resize the Issue Details, point to the divider between the Issue<br />

Details and the Query Results until you get a double arrow, and then<br />

drag the divider up or down.<br />

To select an issue by ID in the graphic user interface:<br />

With issues in the Query Results, click the and buttons at the<br />

top of the Issue Details to move up and down through the list of<br />

issues by ID. You can also type in the issue ID in the ID field.<br />

<strong>The</strong> issue appears in the Issue Details.<br />

<strong>User</strong> <strong>Guide</strong> 369


Viewing and Editing Issues<br />

To view issue details in the Web interface:<br />

Select an issue to view by clicking an issue value, for example, an ID<br />

or user name.<br />

<strong>The</strong> issue opens in the Issue Details page.<br />

<strong>The</strong> top of the Issue Details page shows the issue type, ID, who<br />

created the issue and when, and who last modified the issue and<br />

when.<br />

To view specific information about the issue, click a tab:<br />

<strong>The</strong> Fields panel displays a summary of the issue, the issue’s<br />

state, who the issue is assigned to, the group the issue is assigned<br />

to, the project the issue is assigned to, a description of the issue,<br />

and custom field information.<br />

<strong>The</strong> History panel displays a read-only log of all state changes to<br />

the issue.<br />

<strong>The</strong> Attachments panel displays attached files.<br />

370 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For more information on<br />

change packages, see<br />

“Integrated Version Control”<br />

on page 437.<br />

Printing Issues<br />

Selecting Issues to View<br />

To open an attachment, see “Opening an Attachment” on page<br />

344.<br />

To save an attachment, see “Saving an Attachment” on page 346.<br />

<strong>The</strong> Relationships panel displays related issues.<br />

To open a related issue, see “Opening a Related Issue” on page<br />

339.<br />

<strong>The</strong> Change Package panel displays files that are affected by an<br />

issue type. For example, a solution’s change package might<br />

include files that are required to change in order to satisfy a<br />

problem.<br />

To print an issue in the graphic user interface:<br />

1. Select an issue from the Query Results.<br />

Tip You can select multiple issues to print by selecting an issue, then<br />

while holding down Ctrl or Shift, select additional issues.<br />

2. To print one issue, choose Issue > Print, or right-click and choose<br />

Print from the context menu.<br />

To print multiple issues, choose Issue > Batch > Print, or rightclick<br />

and choose Print from the context menu.<br />

A Print Issues window appears.<br />

<strong>User</strong> <strong>Guide</strong> 371


Viewing and Editing Issues<br />

Note Multiple issues appear in the same Print Issues window.<br />

3. Click Print.<br />

A standard Print dialog box appears.<br />

4. Select the print options you want.<br />

5. Click OK.<br />

372 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Saving Issues<br />

To print an issue in the Web interface:<br />

Selecting Issues to View<br />

1. To print one issue, run a query and open the issue.<br />

To print multiple issues, run a query and select the checkboxes of<br />

the issues that you want to print.<br />

2. Click .<br />

A Print Issues window appears.<br />

Note Multiple issues appear in the same Print Issues window.<br />

3. Choose File > Print.<br />

A standard Print dialog box appears.<br />

4. Select the print options you want.<br />

5. Click OK.<br />

To save an issue in the graphic user interface:<br />

1. Select an issue from the Query Results.<br />

<strong>User</strong> <strong>Guide</strong> 373


Viewing and Editing Issues<br />

Tip You can select multiple issues to save by selecting an issue, then<br />

while holding down Ctrl or Shift, select additional issues.<br />

2. To save one issue, choose Issue > Print, or right-click and choose<br />

Print from the context menu.<br />

To save multiple issues, choose Issue > Batch > Print, or right-click<br />

and choose Print from the context menu.<br />

A Print Issues window appears.<br />

Note Multiple issues appear in the same Print Issues window.<br />

3. Click Save.<br />

A standard Save dialog box appears.<br />

374 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Selecting Issues to View<br />

4. Browse to the location on your local drive where you want to<br />

save the issue.<br />

Note You can only save the issue(s) as an HTML file.<br />

5. Click OK.<br />

To save an issue in the Web interface:<br />

1. To save one issue, run a query and open the issue.<br />

To save multiple issues, run a query and select the checkboxes of<br />

the issues that you want to print.<br />

2. Click .<br />

A Print Issues window appears.<br />

Note Multiple issues appear in the same Print Issues window.<br />

3. Choose File > Save As.<br />

A standard Save dialog box appears.<br />

<strong>User</strong> <strong>Guide</strong> 375


Viewing and Editing Issues<br />

Editing Issues<br />

4. Browse to the location on your local drive where you want to<br />

save the issue.<br />

Note You can only save the issue(s) as an HTML file.<br />

5. Click OK.<br />

Besides making submissions, you can perform other common tasks<br />

as a user of Change <strong>Integrity</strong>, including editing issues. As described<br />

in the previous chapter, each user may list and select issues. In<br />

addition to reviewing the corresponding information, you can edit<br />

and update these issues, depending entirely upon the permissions<br />

assigned to you by your administrator.<br />

Someone on your project team might assign an issue to you, making<br />

you responsible to perform some action. Or you might be responsible<br />

for reviewing all new submissions and assigning them.<br />

To edit an issue in the graphic user interface:<br />

1. Open the issue you want to edit, as described in “Selecting Issues<br />

to View” on page 367.<br />

2. Choose Issue > Edit, or click .<br />

<strong>The</strong> fields become editable.<br />

3. Edit the issue as needed.<br />

376 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Batch Editing<br />

Editing Issues<br />

4. When you are finished making changes to the issue, choose Issue<br />

> Save, or click .<br />

To discard any changes made to the issue, choose Issue > Cancel,<br />

or click .<br />

<strong>The</strong> issue is updated.<br />

To edit an issue in the Web interface:<br />

1. Open the issue you want to edit, as described in “Selecting Issues<br />

to View” on page 367.<br />

2. Click .<br />

<strong>The</strong> fields become editable.<br />

3. Edit the issue as needed.<br />

4. When you are finished making changes to the issue, click<br />

. To discard any changes made to the issue,<br />

click .<br />

<strong>The</strong> issue is updated.<br />

Batch editing allows you to edit the standard and custom fields of<br />

multiple issues at once. For example, you could change the state of<br />

multiple problems from Submitted to Fixed.<br />

In the graphic user interface, you can add related issues and<br />

attachments to multiple issues.<br />

Note Your administrator defines which issue types and custom fields<br />

you can batch edit.<br />

<strong>User</strong> <strong>Guide</strong> 377


Viewing and Editing Issues<br />

To edit a field in multiple issues in the graphic user interface:<br />

Note <strong>The</strong> field you want to edit must exist for all selected issues.<br />

1. Run a query, as explained in “Running Queries” on page 359.<br />

<strong>The</strong> Query Results appears.<br />

2. Choose the issues you want to edit by selecting an issue, then<br />

while holding down Ctrl or Shift, select more issues.<br />

3. Choose Issue > Batch > Edit, or right-click and choose Edit from<br />

the context menu.<br />

4. Choose a standard field to edit. Your administrator defines<br />

custom fields you can edit. <strong>The</strong> available standard fields are:<br />

Summary<br />

Assigned <strong>User</strong><br />

Assigned Group<br />

State<br />

Project<br />

An Edit Issues dialog box appears.<br />

5. Click unspecified or press F2.<br />

A drop-down menu or text field appears.<br />

378 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Editing Issues<br />

6. Select a value from the drop-down menu, or enter text in the text<br />

field, up to 100 characters.<br />

7. If you do not know the information required for a specific field,<br />

click the field.<br />

A appears to the left of the field.<br />

8. Click or press F2.<br />

unspecified appears in the field.<br />

9. To edit the field, click the field and enter text, or choose a menu<br />

item.<br />

10. To accept the changes to the field, click OK. To discard any<br />

changes made, click Cancel.<br />

If any changes were made, the changed issues appear in the<br />

Query Results.<br />

To add attachments to multiple issues (graphic user interface<br />

only):<br />

Note Your administrator defines which issue types you can add<br />

attachments to.<br />

1. Run a query, as explained in “Running Queries” on page 359.<br />

<strong>The</strong> Query Results appears.<br />

2. Choose the issues you want to edit by selecting an issue, then<br />

while holding down Ctrl or Shift, select more issues.<br />

<strong>User</strong> <strong>Guide</strong> 379


Viewing and Editing Issues<br />

3. Choose Issue > Batch > Add Attachment, or right-click and choose<br />

Add Attachment from the context menu.<br />

<strong>The</strong> Add Attachment dialog box appears.<br />

4. Browse to a specific file on your local drive.<br />

5. Click Open.<br />

<strong>The</strong> selected file is added to the issues.<br />

To add related issues to multiple issues (graphic user interface<br />

only):<br />

1. Run a query, as explained in “Running Queries” on page 359.<br />

<strong>The</strong> Query Results appears.<br />

2. Choose the issues you want to edit by selecting an issue, then<br />

while holding down Ctrl or Shift, select more issues.<br />

3. Choose Issue > Batch > Relationship, or right-click and choose<br />

Add Relationship from the context menu.<br />

<strong>The</strong> Add Linked Issue dialog box appears.<br />

380 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


4. Enter the issue ID, for example, 34.<br />

Editing Issues<br />

5. To accept the changes, click OK. To discard any changes made,<br />

click Cancel.<br />

<strong>The</strong> linked issue is added to the issues.<br />

To edit a field in multiple issues in the Web interface:<br />

1. Run a query, as explained in “Running Queries” on page 359.<br />

<strong>The</strong> Query Results page appears.<br />

2. Select the checkboxes of the issues you want to edit.<br />

3. Click .<br />

Note You may have to scroll down to the end of the Query Results to<br />

see the button.<br />

<strong>The</strong> Select Field to Edit page appears.<br />

<strong>User</strong> <strong>Guide</strong> 381


Viewing and Editing Issues<br />

4. Choose a field to edit from the Field drop-down menu, for<br />

example, State.<br />

Note You can only edit one field per batch edit.<br />

5. Click Select new value.<br />

<strong>The</strong> Edit Field page appears.<br />

6. From the New Value drop-down menu or text field, choose or<br />

enter a new value.<br />

7. In the Comment field, enter a comment, for example, the reason<br />

for changing the field value.<br />

8. Click Save Batch Edit.<br />

<strong>The</strong> issues are updated in the Query Results page.<br />

382 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Editing Issues<br />

<strong>User</strong> <strong>Guide</strong> 383


Viewing and Editing Issues<br />

384 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Reports<br />

14<br />

Change <strong>Integrity</strong> allows you to create, edit, and generate various<br />

reports on the data in your projects. Reports can be printed,<br />

displayed on screen, or exported as an HTML file for viewing on the<br />

Web.<br />

This chapter explains how to:<br />

create, edit, and generate reports<br />

save and print reports<br />

<strong>User</strong> <strong>Guide</strong> 385


Reports<br />

Change <strong>Integrity</strong> Reports<br />

Creating Reports<br />

Using Change <strong>Integrity</strong>, you can create, edit, and generate your own<br />

reports. Reports can be based on new queries or saved queries.<br />

Change <strong>Integrity</strong> comes with three example reports: tabular reports,<br />

breakdown by project reports, and problem summary reports.<br />

To create a new report (graphic user interface only):<br />

1. Choose Reports > Customize, or click .<br />

<strong>The</strong> Reports dialog box appears.<br />

2. Click New.<br />

<strong>The</strong> New Report dialog box appears.<br />

386 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Change <strong>Integrity</strong> Reports<br />

3. In the Name field, enter a name for the report. This is the name of<br />

the report as it appears in the Reports menu. A report name is<br />

mandatory.<br />

4. To allow other Change <strong>Integrity</strong> users access to the report, select<br />

the Shared checkbox.<br />

Creating a Report Template<br />

Report templates allow you to specify the appearance of reports and<br />

what data they will include. Once you create a report template, you<br />

can generate the report to view in Change <strong>Integrity</strong>. You can also<br />

import the report to a Web site for others to view.<br />

Report templates are created using HTML (hyper-text markup<br />

language) and special tags for Change <strong>Integrity</strong> objects, such as fields<br />

and issue types. Because reports in Change <strong>Integrity</strong> are written in<br />

HTML, you can create simple text reports or elaborate reports with<br />

graphics, special fonts, background colors, and hyperlinks.<br />

Before you create a report template, carefully consider what data you<br />

want the report to show and how you want the data to appear. Use<br />

HTML table tags to organize the report data and use other tags, such<br />

as headings, bolding, and images, to add style.<br />

<strong>User</strong> <strong>Guide</strong> 387


Reports<br />

<strong>The</strong> following example shows how to create a report that displays<br />

submitted problems for individual projects. <strong>The</strong> data includes each<br />

project’s name, the problem’s ID, who the problem is assigned to, the<br />

problem’s priority, state, and when the problem was created.<br />

To specify a report template:<br />

1. Click the Template tab, if it is not selected already.<br />

<strong>The</strong> Template panel appears.<br />

2. After the tag, start a new line and insert tags to specify<br />

font size, heading size, color, and a title. For example:<br />

<br />

<br />

Issue Summary grouped by Project<br />

<br />

<br />

3. Start a new line and insert a table tag that specifies the border and<br />

width of the table. <strong>The</strong> table organizes the data into columns. For<br />

example:<br />

<br />

388 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Change <strong>Integrity</strong> Reports<br />

4. Insert report tags to specify what data you want the report to<br />

include. Use table row tags to organize field data. <strong>The</strong> following<br />

table shows the available report tags and what they do.<br />

Insert Report Tag... To...<br />

Display the value of a specific<br />

field, such as State.<br />

Possible values for<br />

FIELD_NAME: ID, Created Date,<br />

Created By, Modified Date,<br />

Modified By, Assigned <strong>User</strong>,<br />

Assigned Group, State, Project,<br />

Summary, and Type. <strong>The</strong> name<br />

of custom fields are defined by<br />

your administrator.<br />

Field names are case-sensitive<br />

because you can create two<br />

fields with the same name, but<br />

varying case.<br />

You can not use the < (less than)<br />

symbol in field tags, otherwise,<br />

the values for fields after the <<br />

symbol do not appear in the<br />

report.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Loop all occurrences of the value<br />

for the field specified in<br />

, for<br />

example, the report displays all<br />

problems that have a state of<br />

submitted.<br />

Group the data for a specific<br />

field, for example, the report<br />

displays submitted problems, the<br />

ID, and summary for each project<br />

in the Change <strong>Integrity</strong> database.<br />

<strong>User</strong> <strong>Guide</strong> 389


Reports<br />

For example:<br />

<br />

<br />

Project: <br />

<br />

<br />

.<br />

Title<br />

ID<br />

Assigned <strong>User</strong><br />

Priority<br />

State<br />

Created<br />

<br />

<br />

<br />

.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Tip Right-clicking the Template field allows you to choose basic editing<br />

commands from the context menu: Undo, Cut, Copy, Paste, Delete, and<br />

Select All.<br />

390 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


For information on using<br />

filters in queries, see “Creating<br />

a New Query” on page 350.<br />

Change <strong>Integrity</strong> Reports<br />

5. Start a new line and insert an ending table tag to close the table,<br />

for example:<br />

<br />

Restricting the Report With a Query<br />

When you create a report, you filter your data according to the issue<br />

type(s) you want to match, such as all problems in the database. You<br />

can further restrict the report by filtering specific fields, such as all<br />

problems that are of a certain priority and assigned to a particular<br />

user.<br />

To specify query filters for the report:<br />

1. Click the Query tab.<br />

<strong>The</strong> Query panel appears.<br />

2. From the Type drop-down menu, select an issue type to create a<br />

report for by selecting an issue type checkbox.<br />

3. To add filters to your query, choose filters from the Additional<br />

Constraints list.<br />

To create a report from a saved query:<br />

1. Click the Query tab.<br />

<strong>User</strong> <strong>Guide</strong> 391


Reports<br />

2. Click Copy Saved Query.<br />

<strong>The</strong> Copy Saved Query dialog box appears.<br />

3. Choose a saved query from the drop-down menu.<br />

4. To accept the operation, click OK. To cancel the operation, click<br />

Cancel.<br />

To add a description of the report:<br />

1. Click the Description tab.<br />

<strong>The</strong> Description panel appears.<br />

2. In the Description field, enter a description of the report.<br />

To save the custom report:<br />

1. To save the custom report, click OK. To cancel the operation, click<br />

Cancel.<br />

392 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Editing Reports<br />

<strong>The</strong> report is saved and appears in the Reports list.<br />

2. To close the Reports dialog box, click OK.<br />

To edit a report (graphic user interface only):<br />

Change <strong>Integrity</strong> Reports<br />

Note Shared reports can only be edited by the owner. <strong>The</strong> Edit button is<br />

greyed out.<br />

1. Choose Reports > Customize, or click .<br />

<strong>The</strong> Reports dialog box appears.<br />

<strong>User</strong> <strong>Guide</strong> 393


Reports<br />

2. Choose a report from the Reports list.<br />

3. Click Edit.<br />

<strong>The</strong> Edit Report dialog box appears.<br />

4. Edit the report options as desired.<br />

394 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Running Reports<br />

Change <strong>Integrity</strong> Reports<br />

5. To save your changes, click OK. To discard any changes made,<br />

click Cancel.<br />

6. To close the Reports dialog box, click OK.<br />

To run a report in the graphic user interface:<br />

1. Click , or choose Reports > Customize.<br />

<strong>The</strong> Reports dialog box appears.<br />

2. Select a report from the Reports list.<br />

3. Click Run.<br />

Tip You can also run a report by choosing Reports, then selecting a<br />

saved report from the Reports menu.<br />

<strong>User</strong> <strong>Guide</strong> 395


Reports<br />

<strong>The</strong> report appears in a Report window.<br />

To run a report in the Web interface:<br />

1. Click .<br />

<strong>The</strong> Reports List page appears.<br />

2. Click a report from the Reports list.<br />

<strong>The</strong> report appears in a reports page.<br />

396 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Deleting Reports<br />

To delete a report (graphic user interface only):<br />

Change <strong>Integrity</strong> Reports<br />

Note Shared reports can only be deleted by the owner. <strong>The</strong> Delete<br />

button is greyed out.<br />

1. Choose Reports > Customize, or click .<br />

<strong>User</strong> <strong>Guide</strong> 397


Reports<br />

Copying Reports<br />

<strong>The</strong> Reports dialog box appears.<br />

2. Select a report from the Reports list and click Delete.<br />

Change <strong>Integrity</strong> asks you to confirm that you want to delete the<br />

selected custom report.<br />

3. To confirm the operation, click Yes. To cancel the operation, click<br />

No.<br />

To copy a custom report (graphic user interface only):<br />

1. Choose Reports > Customize, or click .<br />

<strong>The</strong> Reports dialog box appears.<br />

2. Select the report you want to copy from the Reports list.<br />

398 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


3. Click Copy.<br />

<strong>The</strong> Copy Report dialog box appears.<br />

4. Rename the report and make changes as required.<br />

Change <strong>Integrity</strong> Reports<br />

5. To save your changes, click OK. To discard any changes made,<br />

click Cancel.<br />

<strong>User</strong> <strong>Guide</strong> 399


Reports<br />

Saving and Printing Reports<br />

Saving Reports<br />

When you select the type of report you want to generate, the report<br />

appears in a Report window that allows you to save and print the<br />

report.<br />

To save a report in the graphic user interface:<br />

1. Run the report, as described in “Running Reports” on page 395.<br />

<strong>The</strong> reports appears in a Report window.<br />

2. Click Save.<br />

3. Browse to the location on your local drive where you want to<br />

save the report.<br />

Note You can only save the report as an HTML file.<br />

4. Click OK.<br />

400 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Printing Reports<br />

To save a report in the Web interface:<br />

Saving and Printing Reports<br />

1. Run the report, as described in “Running Reports” on page 395.<br />

<strong>The</strong> report appears in the Reports page.<br />

2. Click File > Save As.<br />

A standard browser Save dialog box appears.<br />

3. Browse to the location on your local drive where you want to<br />

save the report.<br />

Note You can only save the report as an HTML file.<br />

4. Click Save.<br />

To print a report in the graphic user interface:<br />

1. Run the report, as described in “Running Reports” on page 395.<br />

<strong>User</strong> <strong>Guide</strong> 401


Reports<br />

<strong>The</strong> reports appears in a Report window.<br />

2. Click Print.<br />

A standard Print dialog box appears.<br />

3. Select the print options you want.<br />

4. Click OK.<br />

To print a report in the Web interface:<br />

1. Run the report, as described in “Running Reports” on page 395.<br />

<strong>The</strong> report appears in the Reports page.<br />

402 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


2. Choose File > Print.<br />

A standard browser Print dialog box appears.<br />

3. Select the print options you want.<br />

4. Click OK.<br />

Saving and Printing Reports<br />

<strong>User</strong> <strong>Guide</strong> 403


Reports<br />

404 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Charts<br />

15<br />

Change <strong>Integrity</strong> allows you to create, edit, and generate<br />

distribution and trend charts on the data in your projects. Charts can<br />

be printed, displayed on screen, or exported as an image file for use<br />

in other applications.<br />

This chapter explains how to:<br />

create, edit, and generate distribution charts<br />

create, edit, and generate trend charts<br />

save and print charts<br />

<strong>User</strong> <strong>Guide</strong> 405


Charts<br />

Change <strong>Integrity</strong> Charts<br />

Charts are graphs that present trends over time, or distributions of the<br />

data in your project. Charts are based on the standard and custom<br />

fields of issue types. Distribution charts may be displayed as pie<br />

graphs or bar graphs. Trend charts may be displayed as line graphs.<br />

<strong>The</strong> graphs can be customized to include titles, legends, point<br />

markers, pie values or percentages, three-dimensional bar graphs,<br />

and three-dimensional pie graphs. <strong>The</strong> color, perspective, shading,<br />

backdrop, three-dimensional effects, fonts, and all other plot<br />

attributes of the graph can also be customized to produce photoquality<br />

presentation graphs.<br />

You can define and store any number of custom charts using Change<br />

<strong>Integrity</strong>. Charts can report on all data in your project, or you can<br />

specify selection criteria to restrict the data to analyze. <strong>The</strong> selection<br />

criteria is a logical expression of specific values, or ranges of values,<br />

of the standard and custom fields of issue types. Charts are unique<br />

for each project because each project may have different custom<br />

fields.<br />

<strong>The</strong> custom charts you define are stored in the Change <strong>Integrity</strong><br />

database and may be run by any user if the chart is shared. Also, any<br />

user may view and edit the chart for any project he or she has<br />

visibility into.<br />

A distribution chart shows the distribution of all values of a specified<br />

standard or custom choice field for issue types. Selection criteria can<br />

be attached to the report to limit the records chosen for analysis. For<br />

example, you can generate a pie graph of the distribution of<br />

submitted problems by specific users.<br />

A trend chart is based on the submit date and shows the trend of issue<br />

types that have a specific field value, over a specified time period.<br />

For example, you may want to see the number of problems submitted<br />

over the last 10 months that have a state of fixed, plotted on a<br />

monthly basis.<br />

406 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Creating Distribution Charts<br />

Change <strong>Integrity</strong> Charts<br />

To create a distribution chart (graphic user interface only):<br />

1. Choose Charts > Customize, or click .<br />

<strong>The</strong> Charts dialog box appears.<br />

2. Click New.<br />

<strong>The</strong> Chart Type dialog box appears.<br />

3. Select Distribution from the drop-down menu.<br />

4. Click OK.<br />

<strong>User</strong> <strong>Guide</strong> 407


Charts<br />

<strong>The</strong> New Distribution Chart dialog box appears.<br />

5. In the Name field, enter a name for the distribution chart. This is<br />

the name of the chart as it appears in the Charts menu. A chart<br />

name is mandatory.<br />

6. To allow other Change <strong>Integrity</strong> users access to the chart, select<br />

the Shared checkbox.<br />

7. In the Title field, enter a title for the distribution chart. This is the<br />

title as it appears on the chart. A title is optional.<br />

8. To choose a font for the title, click Font, then select a font and size<br />

from the Select Font dialog box.<br />

9. In the Description field, enter a description of the distribution<br />

chart. This is optional.<br />

10. To show the description on the chart, select the Show description<br />

checkbox.<br />

11. To choose a font for the description, click Font, then select a font<br />

and size from the Select Font dialog box.<br />

12. In the Footnote field, enter a footnote for the trend chart. A<br />

footnote is optional.<br />

408 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Change <strong>Integrity</strong> Charts<br />

13. To choose a font for the footnote, click Font, then select a font and<br />

size from the Select Font dialog box.<br />

To specify the fields:<br />

1. Click the Fields tab.<br />

<strong>The</strong> Fields panel appears.<br />

2. From the Field drop-down menu, choose a field to base the<br />

distribution chart on, such as State.<br />

3. From the Grouping drop-down menu, choose a corresponding<br />

value, such as Project, or none.<br />

Note You can not create distribution charts using non-absolute values,<br />

such as text-based and interger-based fields. For example, Summary and<br />

Build are not selectable from the Field and Grouping drop-down menus.<br />

<strong>User</strong> <strong>Guide</strong> 409


Charts<br />

For information on using<br />

filters in queries, see “Creating<br />

a New Query” on page 350.<br />

Restricting the Chart With a Query<br />

When you create a distribution chart, you filter your data according<br />

to the issue type(s) you want to match, such as all problems in the<br />

database. You can further restrict the chart by filtering specific fields,<br />

such as all problems that are of a certain priority and assigned to a<br />

particular user.<br />

To specify query filters for the chart:<br />

1. Click the Query tab.<br />

<strong>The</strong> Query panel appears.<br />

2. From the Type drop-down menu, select an issue type to create a<br />

chart for by selecting an issue type checkbox.<br />

3. To add filters to your query, choose filters from the Additional<br />

Constraints list.<br />

To create a distribution chart from a saved query:<br />

1. Click Copy Saved Query.<br />

<strong>The</strong> Copy Saved Query dialog box appears.<br />

410 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


2. Choose a saved query from the drop-down menu.<br />

Change <strong>Integrity</strong> Charts<br />

3. To accept the operation, click OK. To cancel the operation, click<br />

Cancel.<br />

To specify a graph:<br />

1. Click the Graph tab.<br />

<strong>The</strong> Graph panel appears.<br />

2. Under Graph Type, choose a graph type by clicking a graph type<br />

button:<br />

vertical bar graph<br />

vertical stacked bar graph<br />

horizontal bar graph<br />

horizontal stacked bar graph<br />

pie graph<br />

<strong>User</strong> <strong>Guide</strong> 411


Charts<br />

3. To create a 3D chart, select the 3D Chart checkbox.<br />

4. To specify the outline color of the graph bars, click Edit in the<br />

Outline Color field, then select a color from the Select Color dialog<br />

box.<br />

5. To specify the background color of the chart, click Edit in the<br />

Background Color field, then select a color from the Select Color<br />

dialog box.<br />

6. Under Data Labels, choose an option:<br />

None does not show any values for the data labels.<br />

Show Values shows values for the data labels.<br />

To specify the chart’s data colors:<br />

1. Click the Colors tab.<br />

<strong>The</strong> Colors panel appears.<br />

2. Choose a data color option:<br />

To allow Change <strong>Integrity</strong> to select data colors automatically,<br />

select the Automatic radio button.<br />

To customize the data colors, select the Custom radio button,<br />

then proceed to step 3.<br />

412 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


3. Click Add.<br />

<strong>The</strong> Select Color dialog box appears.<br />

4. Choose a color from the palette.<br />

5. Click OK.<br />

Change <strong>Integrity</strong> Charts<br />

<strong>User</strong> <strong>Guide</strong> 413


Charts<br />

<strong>The</strong> data series appears in the Data Colors list.<br />

6. To edit the color of an existing data series, select it from the list,<br />

and click Edit, then select a color from the Select Color dialog box.<br />

7. To remove an existing data series, select it from the list, and click<br />

Remove.<br />

8. Repeat for each data series in the chart.<br />

To specify the chart’s axes:<br />

Note If you chose a pie graph, the Axes tab is grayed out.<br />

1. Click the Axes tab.<br />

<strong>The</strong> Axes panel appears.<br />

414 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Change <strong>Integrity</strong> Charts<br />

2. From the Label Rotation drop-down menu for the Horizontal Axis,<br />

choose a location for the horizontal axis labels. <strong>The</strong> available<br />

locations are:<br />

Horizontal<br />

Vertical (90 degrees)<br />

Vertical (270 degrees)<br />

3. From the Orientation drop-down menu for the Horizontal Axis,<br />

choose a position for the horizontal axis. <strong>The</strong> available positions<br />

are:<br />

Right<br />

Left<br />

4. To show gridlines on the horizontal axis, select the Show Gridlines<br />

checkbox.<br />

5. To show the title for the horizontal axis, select the Horizontal Axis’<br />

Show Title checkbox.<br />

6. From the Label Rotation drop-down menu for the Vertical Axis,<br />

choose a location for the vertical axis labels. <strong>The</strong> available<br />

locations are:<br />

Horizontal<br />

Vertical (90 degrees)<br />

<strong>User</strong> <strong>Guide</strong> 415


Charts<br />

Vertical (270 degrees)<br />

7. From the Orientation drop-down menu for the Vertical Axis,<br />

choose a position for the vertical axis. <strong>The</strong> available positions are:<br />

Up<br />

Down<br />

8. To show gridlines on the vertical axis, select the Show Gridlines<br />

checkbox.<br />

9. To show the title for the vertical axis, select the Vertical Axis’ Show<br />

Title checkbox.<br />

To specify the legend:<br />

1. Click the Legend tab.<br />

<strong>The</strong> Legend panel appears.<br />

2. To show the legend, select the Show Legend checkbox.<br />

3. In the Title field, enter a title for the chart legend. A title is<br />

optional.<br />

4. In the Number of Columns field, enter the number of columns for<br />

the legend, or click or .<br />

416 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Creating Trend Charts<br />

Change <strong>Integrity</strong> Charts<br />

5. In the Position field, choose a position for the legend on the chart<br />

from the drop-down menu. <strong>The</strong> available positions:<br />

Right<br />

Left<br />

Top<br />

Bottom<br />

6. To choose a background color for the legend, click Edit, then<br />

select a color from the Select Color dialog box.<br />

To save the distribution chart:<br />

1. To save the chart, click OK. To cancel the operation, click Cancel.<br />

<strong>The</strong> distribution chart appears in the Charts list, indicated by a<br />

distribution chart icon.<br />

2. To close the Charts dialog box, click OK.<br />

To define a trend chart (graphic user interface only):<br />

1. Choose Charts > Customize, or click .<br />

<strong>User</strong> <strong>Guide</strong> 417


Charts<br />

<strong>The</strong> Charts dialog box appears.<br />

2. Click New.<br />

<strong>The</strong> Chart Type dialog box appears.<br />

3. Select Trend from the drop-down menu.<br />

4. Click OK.<br />

<strong>The</strong> New Trend Chart dialog box appears.<br />

418 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Change <strong>Integrity</strong> Charts<br />

5. In the Name field, enter a name for the trend chart. This is the<br />

name of the chart as it will appear in the Charts menu. A chart<br />

name is mandatory.<br />

6. To share the chart with other Change <strong>Integrity</strong> users, select the<br />

Shared checkbox.<br />

7. In the Title field, enter a title for the trend chart. This is the title as<br />

it appears on the chart. A title is optional.<br />

8. To choose a font for the title, click Font, then select a font and size<br />

from the Select Font dialog box.<br />

9. In the Description field, enter a description of the trend chart. A<br />

description is optional.<br />

10. To show the description on the chart, click the Show Description<br />

checkbox.<br />

11. To choose a font for the description, click Font, then select a font<br />

and size from the Select Font dialog box.<br />

12. In the Footnote field, enter a footnote for the trend chart. A<br />

footnote is optional.<br />

13. To choose a font for the footnote, click Font, then select a font and<br />

size from the Select Font dialog box.<br />

<strong>User</strong> <strong>Guide</strong> 419


Charts<br />

Restricting the Chart by Fields<br />

When you create a trend chart, you filter your data by specific time<br />

intervals, dates, and fields. For example, you might want your trend<br />

chart to show the number of submitted problems each day from<br />

March 1, 2000 to April 15, 2000.<br />

To filter trend chart data:<br />

1. Click the Fields tab.<br />

<strong>The</strong> Fields panel appears.<br />

2. From the Type drop-down menu, choose an interval for each<br />

point on the graph, such as Day. <strong>The</strong> available intervals are:<br />

Hour<br />

Day<br />

Week<br />

Month<br />

Quarter<br />

Year<br />

3. From the Start drop-down menu, choose a starting date from the<br />

calendar, for example, Feb. 15, 2000. <strong>The</strong> default is the current<br />

system date.<br />

420 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Change <strong>Integrity</strong> Charts<br />

4. From the End drop-down menu, choose an ending date from the<br />

calendar, for example, March 21, 2000. <strong>The</strong> default is the current<br />

system date.<br />

5. From the Field drop-down menu, choose a field to monitor, such<br />

as Type.<br />

Note You can not create trend charts using non-absolute values, such as<br />

text-based and interger-based fields. For example, Summary and Build<br />

are not selectable from the Field drop-down menu.<br />

To specify a graph:<br />

1. Click the Graph tab.<br />

<strong>The</strong> Graph panel appears.<br />

2. To specify the background color of the chart, click Edit in the<br />

Background Color field, then select a color from the Select Color<br />

dialog box.<br />

3. Under Data Labels, choose an option:<br />

None does not show any values for the graph.<br />

Show values shows values for the graph.<br />

<strong>User</strong> <strong>Guide</strong> 421


Charts<br />

To specify data colors in the chart:<br />

1. Click the Colors tab.<br />

<strong>The</strong> Colors panel appears.<br />

2. Choose a data color option:<br />

To allow Change <strong>Integrity</strong> to select data colors automatically,<br />

select the Automatic radio button.<br />

To customize the data colors, select the Custom radio button,<br />

then proceed to step 3.<br />

3. Click Add.<br />

<strong>The</strong> Select Color dialog box appears.<br />

422 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


4. Choose a color from the palette.<br />

5. Click OK.<br />

<strong>The</strong> data series appears in the Data Colors list.<br />

Change <strong>Integrity</strong> Charts<br />

6. To edit the color of an existing data series, select it from the list,<br />

and click Edit, then select a color from the Select Color dialog box.<br />

<strong>User</strong> <strong>Guide</strong> 423


Charts<br />

7. To remove an existing data series, select it from the list, and click<br />

Remove.<br />

8. Repeat for each data series in the chart.<br />

To specify the chart’s axes:<br />

1. Click the Axes tab.<br />

<strong>The</strong> Axes panel appears.<br />

2. From the Label Rotation drop-down menu for the Horizontal Axis,<br />

choose a location for the horizontal axis labels. <strong>The</strong> available<br />

locations are:<br />

Horizontal<br />

Vertical (90 degrees)<br />

Vertical (270 degrees)<br />

3. From the Orientation drop-down menu for the Horizontal Axis,<br />

choose a position for the horizontal axis. <strong>The</strong> available positions<br />

are:<br />

Right<br />

Left<br />

4. To show gridlines on the horizontal axis, select the Show Gridlines<br />

checkbox.<br />

424 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Change <strong>Integrity</strong> Charts<br />

5. To show the title for the horizontal axis, select the Horizontal Axis’<br />

Show Title checkbox.<br />

6. From the Label Rotation drop-down menu for the Vertical Axis,<br />

choose a location for the vertical axis labels. <strong>The</strong> available<br />

locations are:<br />

Horizontal<br />

Vertical (90 degrees)<br />

Vertical (270 degrees)<br />

7. From the Orientation drop-down menu for the Vertical Axis,<br />

choose a position for the vertical axis. <strong>The</strong> available positions are:<br />

Up<br />

Down<br />

8. To show gridlines on the vertical axis, select the Show Gridlines<br />

checkbox.<br />

9. To show the title for the vertical axis, select the Vertical Axis’ Show<br />

Title checkbox.<br />

To specify the legend:<br />

1. Click the Legend tab.<br />

<strong>The</strong> Legend panel appears.<br />

2. To show the legend, select the Show Legend checkbox.<br />

<strong>User</strong> <strong>Guide</strong> 425


Charts<br />

3. In the Title field, enter a title for the chart legend. A title is<br />

optional.<br />

4. In the Number of Columns field, enter the number of columns for<br />

the legend, or click or .<br />

5. In the Position field, choose a position for the legend on the chart<br />

from the drop-down menu. <strong>The</strong> available positions are:<br />

Right<br />

Left<br />

Top<br />

Bottom<br />

6. To choose a background color for the legend, click Edit, then<br />

select a color from the Select Color dialog box.<br />

To save the trend chart:<br />

1. To save the chart, click OK. To cancel the operation, click Cancel.<br />

<strong>The</strong> trend chart appears in the Charts list, indicated by a trend<br />

chart icon.<br />

2. To close the Charts dialog box, click OK.<br />

426 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Editing Existing Charts<br />

To edit an existing chart (graphic user interface only):<br />

Change <strong>Integrity</strong> Charts<br />

Note Shared charts can only be deleted by the owner. <strong>The</strong> Edit button is<br />

greyed out.<br />

1. Choose Charts > Customize, or click .<br />

<strong>The</strong> Charts dialog box appears.<br />

2. Select a chart to edit from the Charts list.<br />

3. Click Edit.<br />

<strong>User</strong> <strong>Guide</strong> 427


Charts<br />

Running Charts<br />

<strong>The</strong> Edit Chart dialog box appears.<br />

4. Edit the chart options as desired.<br />

5. To save the chart, click OK. To discard any changes, click Cancel.<br />

6. To close the Charts dialog box, click OK.<br />

To run a chart in the graphic user interface:<br />

1. Choose Charts, or click .<br />

Note Trend charts that include a long time span, for example, a year,<br />

and a small step, for example, an hour, may take a long time to generate.<br />

<strong>The</strong> Charts dialog box appears.<br />

428 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


2. Select a chart from the Charts list.<br />

3. Click Run.<br />

<strong>The</strong> chart appears in a Chart View window.<br />

Change <strong>Integrity</strong> Charts<br />

<strong>User</strong> <strong>Guide</strong> 429


Charts<br />

Tip You can change the view of the chart data by clicking the graph and<br />

dragging it in any direction. Hovering your cursor over a graph unit<br />

displays a value tooltip.<br />

To run a chart in the Web interface:<br />

1. Click .<br />

<strong>The</strong> Charts List page appears.<br />

2. Click a chart from the Charts list.<br />

<strong>The</strong> chart appears in a charts page.<br />

Note <strong>The</strong> Change <strong>Integrity</strong> Web interface does not support chart view<br />

options.<br />

430 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Deleting Charts<br />

To delete a chart (graphic user interface only):<br />

Change <strong>Integrity</strong> Charts<br />

Note Shared charts can only be deleted by the owner. <strong>The</strong> Delete button<br />

is greyed out.<br />

1. Choose Charts > Customize, or click .<br />

<strong>The</strong> Charts dialog box appears.<br />

2. Select a chart from the Charts list.<br />

3. Click Delete.<br />

Change <strong>Integrity</strong> asks you to confirm that you want to delete the<br />

selected chart.<br />

4. To confirm the operation, click Yes. To cancel the operation, click<br />

No.<br />

<strong>User</strong> <strong>Guide</strong> 431


Charts<br />

Copying Charts<br />

To copy a chart (graphic user interface only):<br />

1. Select the chart you want to copy from the Charts list.<br />

2. Click Copy.<br />

<strong>The</strong> Copy dialog box appears.<br />

432 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Saving and Printing Charts<br />

3. Rename the chart and make changes as required.<br />

Saving and Printing Charts<br />

When you select the type of chart you want to generate, the chart<br />

appears in a Chart window so you can save and print the chart.<br />

<strong>User</strong> <strong>Guide</strong> 433


Charts<br />

Saving Charts<br />

Printing Charts<br />

To save a chart (graphic user interface only):<br />

1. Click Save.<br />

A Save dialog box appears.<br />

2. Browse to the location on your local drive where you want to<br />

save the chart.<br />

Note You can only save the chart as a JPEG image.<br />

3. Click OK.<br />

To print a chart in the graphic user interface:<br />

1. Click Print.<br />

434 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


A standard Print dialog box appears.<br />

2. Select the print options you want.<br />

3. Click OK.<br />

To print a chart in the Web interface:<br />

1. Choose File > Print.<br />

A standard browser Print dialog box appears.<br />

2. Select the print options you want.<br />

3. Click OK<br />

Saving and Printing Charts<br />

<strong>User</strong> <strong>Guide</strong> 435


Charts<br />

436 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Integrated Version<br />

Control<br />

16<br />

As part of the integration with <strong>Source</strong> <strong>Integrity</strong>, you can associate<br />

project members with an issue, effectively adding the project<br />

members as part of a change package.<br />

A change package allows you to specify groups of files that are<br />

affected by an issue type, for example, a solution’s change package<br />

might contain files that need to be changed in order to satisfy a<br />

problem.<br />

Administrators define what issue types can use change packages and<br />

configure <strong>Source</strong> <strong>Integrity</strong> to allow files to be checked in or checked<br />

out only if they are associated with an issue.<br />

This chapter provides details on:<br />

configuring Change <strong>Integrity</strong> Connect<br />

associating active issue types with project members<br />

viewing change packages in Change <strong>Integrity</strong><br />

<strong>User</strong> <strong>Guide</strong> 437


Integrated Version Control<br />

Configuring Change <strong>Integrity</strong> Connect<br />

To configure Change <strong>Integrity</strong> Connect (Windows interface<br />

only):<br />

1. With the <strong>Source</strong> <strong>Integrity</strong> Windows interface open, choose<br />

Configuration > Change <strong>Integrity</strong> Connect.<br />

<strong>The</strong> Change <strong>Integrity</strong> Connect - Configuration dialog box appears.<br />

Note If the configuration has already been defined by your<br />

administrator in SAM, then the dialog is filled with the pre-defined<br />

values.<br />

2. To activate Change <strong>Integrity</strong> Connect, select the Enable Change<br />

<strong>Integrity</strong> Connect checkbox.<br />

All fields and buttons become active.<br />

438 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Configuring Change <strong>Integrity</strong> Connect<br />

3. In the <strong>Integrity</strong> Server field, enter the name of the server you want<br />

to connect to, for example, localhost, or the numerical IP<br />

address, for example, 1.234.53.<br />

Note Do not use back slashes (\) in the server name, for example,<br />

\\localhost.<br />

4. In the CI <strong>User</strong> Name field, enter your Change <strong>Integrity</strong> user name.<br />

Your <strong>Source</strong> <strong>Integrity</strong> <strong>User</strong> Name appears by default. <strong>The</strong> SAM<br />

policy option AllowCIMultipleRoles must be set in order to change<br />

this field.<br />

5. As an option, you can choose to track locked and unlocked<br />

project members in <strong>Source</strong> <strong>Integrity</strong> by selecting the Track Locks<br />

checkbox. This field may be set and enforced by your<br />

administrator in SAM with the TrackLocks policy option.<br />

6. As an option, you can choose to add tracking labels to project<br />

members in <strong>Source</strong> <strong>Integrity</strong> by checking the Add Tracking Labels<br />

check-box. This field may be set and enforced by your<br />

administrator in SAM with the AddTrackingLabel policy option.<br />

7. To view active issues, click Refresh. <strong>The</strong> Current Set of Active CI<br />

Issues section displays information about active issues.<br />

Note You can only view active issues assigned to you.<br />

Default Issue displays the selected default issue. To make an<br />

issue your default issue, select an issue from the active issues<br />

list, then click Make Default.<br />

Selected Issue displays the selected issue in the list of active<br />

issues.<br />

Summary displays a brief summary about the issue.<br />

<strong>User</strong> <strong>Guide</strong> 439


Integrated Version Control<br />

Active issues are displayed in the active issue list below the<br />

Default Issue field.<br />

Note Your administrator defines which issue types can include change<br />

packages.<br />

8. To set no default issue, select None from the active issues list. This<br />

option does not appear if Enforce Mandatory Tracking is set in the<br />

Change <strong>Integrity</strong> Connect policy statement in SAM.<br />

9. When you have finished configuring the Change <strong>Integrity</strong><br />

Connect options, choose an option by clicking a button:<br />

OK saves the current configuration options.<br />

Cancel closes the configuration dialog box without saving<br />

any changes.<br />

Launch CIWI connects to the Change <strong>Integrity</strong> Web interface<br />

and displays complete information about the issue.<br />

<strong>The</strong> Change <strong>Integrity</strong> Web interface opens, displaying the<br />

issue.<br />

440 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Associating Active Issues With Project<br />

Members<br />

Associating Active Issues With Project Members<br />

Once you have configured Change <strong>Integrity</strong> Connect, you can<br />

associate active issues with project members, effectively adding the<br />

project members as part of a change package.<br />

To associate an active issue with a project member (Windows<br />

interface only):<br />

1. In the <strong>Source</strong> <strong>Integrity</strong> Windows interface, check out one or more<br />

files in the Sandbox or Project window. If you are tracking locks,<br />

then these files are associated with the default issue.<br />

2. Select one or more files in the Sandbox or Project window.<br />

3. Choose Member > Check In.<br />

<strong>User</strong> <strong>Guide</strong> 441


Integrated Version Control<br />

<strong>The</strong> Check In dialog box appears.<br />

Viewing Change Packages<br />

4. Choose an issue from the Active CI Issue drop-down list.<br />

5. Add additional metadata if needed, such as a revision<br />

description.<br />

6. Click OK.<br />

If you select more than one file to check in, you can either<br />

associate them all with the same issue, by selecting the All Files<br />

checkbox, or associate each file with a different issue.<br />

Once you associate project members with an issue, Change <strong>Integrity</strong><br />

adds the members as part of the issue’s change package. You can<br />

view change packages in the Change <strong>Integrity</strong> graphic user interface<br />

and Web interface.<br />

To view a change package in the graphic user interface:<br />

1. Open the issue, as described in “Selecting Issues to View” on<br />

page 367.<br />

<strong>The</strong> issue opens in the Issue Details.<br />

442 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


2. Click the Change Package tab.<br />

<strong>The</strong> Change Package panel appears.<br />

Viewing Change Packages<br />

<strong>The</strong> Change Package panel displays the project the member belongs<br />

to, member name, revision number, author name, lock status,<br />

revision date, and revision description.<br />

To view a change package in the Web interface:<br />

1. Open the issue, as described in “Selecting Issues to View” on<br />

page 367.<br />

<strong>The</strong> issue opens in the Issue Details page.<br />

<strong>User</strong> <strong>Guide</strong> 443


Integrated Version Control<br />

2. Click the Change Package tab.<br />

<strong>The</strong> Change Package panel appears.<br />

<strong>The</strong> Change Package panel displays the project the member belongs<br />

to, member name, revision number, author name, lock status,<br />

revision date, and revision description.<br />

444 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


A P P E N D I X<br />

Glossary<br />

<strong>Source</strong> <strong>Integrity</strong> Terms<br />

archived (project<br />

member)<br />

A<br />

archive A file containing the most recent version of a document and a record<br />

of all the changes made to it since it was put under revision control.<br />

From the information contained in the record of changes,<br />

<strong>Source</strong> <strong>Integrity</strong> can reconstruct any previous version of the file.<br />

<strong>The</strong> archive is sometimes referred to as the RCS file, for historical<br />

reasons.<br />

<strong>The</strong> data of an archived project member is held in a revision of a<br />

<strong>Source</strong> <strong>Integrity</strong> archive. <strong>The</strong> actual project member is, therefore, the<br />

revision in the archive, not the archive itself.<br />

archive description A set of general comments that describes the purpose of an archive.<br />

You are asked to enter an archive description when an archive is<br />

created. <strong>The</strong> text of the archive description can be viewed with the<br />

Archive Information command.<br />

archive directory <strong>The</strong> default location where <strong>Source</strong> <strong>Integrity</strong> looks for archives when<br />

checking in working files. <strong>The</strong> archive directory is specified with the<br />

Configuration > Personal command (Directories panel).<br />

archive file See archive.<br />

archive information In addition to an archive’s contents, <strong>Source</strong> <strong>Integrity</strong> also maintains<br />

detailed information about each archive, including:<br />

a list of revision labels used in the archive<br />

a list of users who have locks on revisions in the archive<br />

the starting point of the default branch revision<br />

the type of data stored in the archive (that is, text or binary)<br />

whether the archive is compressed<br />

<strong>User</strong> <strong>Guide</strong> 445


Appendix A: Glossary<br />

whether the archive is encrypted<br />

whether a strict-locking policy is applied to the archive<br />

a description of the archive (supplied by the user when the<br />

archive was created)<br />

archive log <strong>The</strong> file where archive transactions are recorded when logging is<br />

turned on. <strong>The</strong> name and location of the log file is specified with the<br />

Configuration > Personal command (Logging panel). If it exists, the log<br />

file contains a record of each check-in and check-out (locked)<br />

operation performed on the archive.<br />

archive path <strong>The</strong> default location where <strong>Source</strong> <strong>Integrity</strong> looks for archives when<br />

checking in files, if no appropriate WorkToArch statement is defined.<br />

<strong>The</strong> archive path is specified with the Configuration > Personal<br />

command (Directories panel).<br />

archive transaction Any check-in or check-out (locked) action that is performed on an<br />

archive. If logging is turned on, archive transactions are recorded in<br />

the log file.<br />

Archive window A window that allows you to view the contents of an archive, and<br />

information about the archive and the revisions it contains.<br />

author Usually, this is the name of the user who checked in a revision,<br />

although any name can be used. On systems that use a login<br />

procedure, this is typically the user’s login name. If the system does<br />

not use login names, <strong>Source</strong> <strong>Integrity</strong> uses the name specified with<br />

the Configuration > Personal command (Preferences panel).<br />

author name <strong>The</strong> name <strong>Source</strong> <strong>Integrity</strong> knows you by. Your author name is<br />

defined with the Configuration > Personal command (Preferences<br />

panel). It is used to prime the Author field during check-in.<br />

binary file A file containing unprintable characters, or lines too long to be<br />

handled by text editors.<br />

branch A secondary revision path that diverges from the main line of<br />

development (or trunk) in an archive. A branch is created by<br />

checking in a file to a revision other than the head revision. This most<br />

recent revision of a branch is called the tip revision.<br />

Changes made on a branch can be merged back into the trunk with<br />

the Visual Difference utility’s Merge feature.<br />

446 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>Source</strong> <strong>Integrity</strong> Terms<br />

check in An operation that adds a new revision of a file to an archive. <strong>The</strong> new<br />

revision becomes the archive’s head revision unless you specifically<br />

check in the file to a revision other than the head revision. When a file<br />

is checked in to a revision other than the head revision or a branch tip<br />

revision, a new branch is created.<br />

check out An operation that extracts the contents of a revision in an archive and<br />

copies it to a working file. You can check out any revision by<br />

specifying either its revision number or label.<br />

checkpoint An operation that creates an archive for your project file and checks it<br />

in. When you checkpoint a project, you save all the information<br />

needed to recreate the project completely at any time in the future.<br />

<strong>The</strong> saved information includes the directory tree and the list of<br />

members with their revision numbers.<br />

compare window A window in which two text-based files or revisions are displayed for<br />

comparison, along with a summary of the differences between them.<br />

configuration file A file containing detailed descriptions of where archive and working<br />

files are stored, locking policies, and other tailoring options.<br />

Configuration files are referenced by <strong>Source</strong> <strong>Integrity</strong> each time the<br />

program is started and are updated with the Configuration command.<br />

data types <strong>The</strong> data preserved in <strong>Source</strong> <strong>Integrity</strong> archives can be one of three<br />

types:<br />

Binary<br />

A file containing unprintable characters, or lines too long to be<br />

handled by text editors.<br />

Text<br />

This is the file format expected by DOS and Windows text file<br />

editors. When a file of type “Text” is checked out,<br />

<strong>Source</strong> <strong>Integrity</strong> adds a carriage return at the end of each line.<br />

Unspecified<br />

This is the file format expected by most UNIX and other non-<br />

DOS text file editors. When a file of type “Unspecified” is<br />

checked out, <strong>Source</strong> <strong>Integrity</strong> does not add a carriage return<br />

character to the end of each line.<br />

date <strong>The</strong> date and time when a revision was checked in.<br />

<strong>User</strong> <strong>Guide</strong> 447


Appendix A: Glossary<br />

default branch <strong>The</strong> branch <strong>Source</strong> <strong>Integrity</strong> tries to check in files to. <strong>The</strong> default<br />

branch is set with the Archive Information command. If unspecified,<br />

files are checked in to the trunk.<br />

default editor <strong>The</strong> editor used by the View Revision and View/Edit Working File<br />

commands to display a working file or revision. It is also used to<br />

view the log file. <strong>The</strong> default editor is defined with the Configuration<br />

> Personal command (Directories panel).<br />

deltas <strong>The</strong> differences (stored in an archive) between one revision and its<br />

immediate ancestor. An archive contains one complete version of the<br />

working file and all the deltas needed to reconstruct any revision.<br />

demotion <strong>The</strong> process of changing a revision’s promotion state setting from a<br />

higher to a lower level. When promotion is turned on, the range of<br />

state settings that can be applied to revisions in an archive is defined<br />

by the Configuration > Personal command (Promotion panel).<br />

enforce An attribute that can be applied in SAM to protect file options from<br />

being overridden by your personal configuration settings.<br />

freeze (a member) To place a member in a state that prevents changes being made to the<br />

member information that resides in the project file. For example, you<br />

cannot update the member revision or change the member type for a<br />

frozen member. <strong>The</strong> opposite of thaw.<br />

freeze (a project) To place a project in a state that prevents changes being made to the<br />

information in the project file. For example, you cannot perform<br />

operations such as adding or deleting members, changing<br />

configuration blocks, or setting variables on a frozen project. <strong>The</strong><br />

opposite of thaw.<br />

global configuration<br />

file<br />

folder A term used in Microsoft Windows and NT to replace directory.<br />

frozen <strong>The</strong> state a project or member (archived) exists in after you perform a<br />

freeze action upon it.<br />

A file containing default information about where archives and<br />

working files are stored, locking policies and other tailoring options.<br />

Global Configuration File settings cannot be set with the<br />

Configuration command.<br />

head revision <strong>The</strong> most recent revision on the main path of development (the trunk)<br />

in an archive.<br />

448 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>Source</strong> <strong>Integrity</strong> Terms<br />

keyword A special variable construct (for example, $Date$, $Author$,<br />

$State$) used to represent textual information in a working file.<br />

Keywords can be expanded (that is, replaced with their literal values)<br />

when a revision is checked out.<br />

keyword expansion <strong>The</strong> process of automatically adding or updating information to a<br />

keyword reference when a revision is checked out or viewed.<br />

non-archived (project<br />

member)<br />

label See revision label.<br />

lock A <strong>Source</strong> <strong>Integrity</strong> feature that prevents more than one user from<br />

simultaneously making changes to the same revision. When a<br />

revision is locked, no one other than the locker can check in changes<br />

to that revision. A revision can be locked when it is checked in,<br />

checked out, or with the Lock Revision command.<br />

locker <strong>The</strong> person who has a revision locked.<br />

log file <strong>The</strong> file where archive transactions are recorded when logging is<br />

turned on. <strong>The</strong> name and location of the log file is specified with the<br />

Configuration > Personal command (Logging panel). If it exists, the log<br />

file contains a record of each check-in and check-out (locked)<br />

operation performed on the archive.<br />

metadata Information about a revision or archive, as opposed to the information<br />

that is part of the object. For example, a revision’s Revision<br />

Description is information about the revision, while the text of the<br />

revision is part of the revision itself.<br />

Personal<br />

Configuration File<br />

A project member whose content is held in a single file that is not<br />

under <strong>Source</strong> <strong>Integrity</strong> revision control.<br />

A file containing user-specific information about where archive and<br />

working files are stored, locking policies, and other tailoring options.<br />

Personal Configuration File values are set with the Configuration<br />

command.<br />

<strong>The</strong> Personal Configuration File is called mksrcs.rc and is located in<br />

the directory where Windows is installed.<br />

project A group of files that, taken together, forms a single body of work.<br />

Projects are presented in Project Windows, which list the members of<br />

the project and provide access to them.<br />

project directory <strong>The</strong> root of the directory tree where project member files reside.<br />

<strong>User</strong> <strong>Guide</strong> 449


Appendix A: Glossary<br />

project log A file that contains a record of all project transactions (for example,<br />

check in, check out, and add member) since the last time the project<br />

was checked in. It is viewed with the Project > View Log command.<br />

project member Any file that is included in a project. Project members may include:<br />

archived files<br />

non-archived files<br />

other <strong>Source</strong> <strong>Integrity</strong> projects (see subproject)<br />

Project members are displayed in a Project window.<br />

Project view In the <strong>Source</strong> <strong>Integrity</strong> Web Interface, a page that displays all the<br />

members of a single project.<br />

Project window In the Windows interface version, a window displayed in the<br />

<strong>Source</strong> <strong>Integrity</strong> application window that contains all the members of<br />

a single project.<br />

promotion <strong>The</strong> process of managing data as it moves through a structured<br />

development cycle. Any project (whether it is software development,<br />

document production, or any other type of data management) goes<br />

through recognizable phases: from inception, through development,<br />

testing, quality assurance, and completion.<br />

Using promotion, you can define the phases (or states) of your<br />

development cycle and track and manage the progress of each file as<br />

it moves through the process.<br />

promotion state A state setting defined with the Configuration > Personal command<br />

(Promotion panel). When promotion is turned on, only the defined<br />

promotion state settings may be used.<br />

revision A version of a file under revision control. Revisions are held in an<br />

archive and may be stored as the complete content of the file (in the<br />

case of the head revision) or a record of the changes that must be<br />

applied to rebuild a specific version of the file.<br />

A new revision is produced each time a working file is checked into<br />

its archive.<br />

revision description Free-form comments describing a revision. <strong>The</strong> revision description<br />

can contain anything from a detailed description of changes, to<br />

instructions for the next person who will work on the file.<br />

450 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


<strong>Source</strong> <strong>Integrity</strong> Terms<br />

<strong>The</strong> revision description (sometimes referred to the log message) is<br />

attached to a new revision at check-in time, and may be viewed and<br />

appended with the Revision Information command. In the Windows<br />

interface version, the Revision Description is also displayed in the<br />

bottom panel of the Archive window.<br />

revision label Text that describes and refers to revisions in an archive. When a file is<br />

checked in, you are given the option of assigning it a revision label.<br />

Revisions in an archive can be displayed and selected either by<br />

revision number or revision label.<br />

Revision labels can be added, appended, or deleted with the Revision<br />

Information command.<br />

revision number A unique number used to identify a revision in an archive. Revisions<br />

on the trunk are numbered as two-part decimals (that is, 1.1, 1.2, 1.3,<br />

…). Revisions on a branch are numbered by adding two-part<br />

decimals to the number of the revision they branch from.<br />

For example, if a branch is started from revision 1.3, its members<br />

would be numbered<br />

1.3.1.3<br />

1.3.1.2<br />

1.3.1.1<br />

and so on.<br />

sandbox A mirror image of a <strong>Source</strong> <strong>Integrity</strong> project. Although it looks and<br />

acts like the project it mirrors, it is actually a collection of pointers to<br />

its real-life counterparts in the master project.<br />

Sandboxes provide a way for developers to work on projects in a<br />

personal, protected workspace, without immediately impacting the<br />

condition of the project or disrupting the work patterns of other<br />

project developers.<br />

With sandboxes, each user creates a personal workspace for a project<br />

where changes can be made and tested before being merged back into<br />

the master project. A <strong>Source</strong> <strong>Integrity</strong> sandbox consists of a sandbox<br />

file and the directory it resides in.<br />

Sandbox view In the <strong>Source</strong> <strong>Integrity</strong> Web Interface, a page that displays all the<br />

members of a single project.<br />

Sandbox window In the Windows interface version, a window displayed in the<br />

<strong>Source</strong> <strong>Integrity</strong> application window that contains all the members of<br />

a single sandbox.<br />

<strong>User</strong> <strong>Guide</strong> 451


Appendix A: Glossary<br />

state Free-form text used to classify the condition of a revision in an<br />

archive. For example, a document could initially have a state of<br />

“Draft”. As work progresses it might be changed to “Review” and<br />

eventually “Complete”. If no state is assigned to a revision, a default<br />

value of “Exp” (for Experimental) is used.<br />

<strong>The</strong> state of a revision is assigned at check-in time. If promotion is<br />

turned on, only the predefined promotion states may be used.<br />

strict locking When strict locking is enabled for an archive, revisions must be<br />

checked out locked if they are to be checked back into the archive as a<br />

new revision. Revisions checked out unlocked are copied into readonly<br />

files and may not be checked into the archive until a lock has<br />

been obtained.<br />

When strict locking is not enabled, revisions may be checked out<br />

unlocked, edited, and checked back in.<br />

subproject A member type applied to a sandbox or project member that is itself a<br />

<strong>Source</strong> <strong>Integrity</strong> project.<br />

tip revision <strong>The</strong> most recent revision on a branch of an archive.<br />

thaw To remove the frozen state of a project or member so that changes can<br />

again be made to the project file or member information. <strong>The</strong><br />

opposite of freeze.<br />

trunk <strong>The</strong> primary line of a file’s change history in an archive. <strong>The</strong> first<br />

member of the trunk is always the original file checked into the<br />

archive. <strong>The</strong> most recently checked in member of the trunk is referred<br />

to as the head revision.<br />

type (project member) Project members may be one of following types of files:<br />

archived (files under <strong>Source</strong> <strong>Integrity</strong> revision control)<br />

non-Archived (files not under <strong>Source</strong> <strong>Integrity</strong> revision control)<br />

subproject (another <strong>Source</strong> <strong>Integrity</strong> project)<br />

user name <strong>The</strong> name <strong>Source</strong> <strong>Integrity</strong> knows you by. <strong>User</strong> name is defined using<br />

the Configuration > Personal command (Preferences panel). By<br />

default, user name is used as the author during check-in.<br />

variant sandbox A sandbox that is created from a previous project checkpoint rather<br />

than the current (or head) revision of a project. You create a variant<br />

sandbox when you want to branch to a variant development path. It<br />

is akin to creating a branch archive.<br />

452 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Visual Difference<br />

window<br />

<strong>Source</strong> <strong>Integrity</strong> Terms<br />

<strong>The</strong> main window of the Visual Difference utility used by the<br />

Compare Files, Compare Revisions, and Differences commands to<br />

display the differences between text-based files or revisions.<br />

working directory <strong>The</strong> complete path to the root of the work tree (that is, the directory or<br />

hierarchy of directories where working files are stored and changes<br />

are made to them). Each sandbox or project has its own working<br />

directory.<br />

See sandbox directory; project directory.<br />

working file A file that contains a working copy of a checked-out revision. <strong>User</strong>s<br />

edit and change the working file, not the revision itself. Changes to<br />

the working file are added to the archive (as a new revision) when the<br />

working file is checked in.<br />

work tree <strong>The</strong> directory or hierarchy of directories where working files are<br />

stored and changes are made to them.<br />

<strong>User</strong> <strong>Guide</strong> 453


Appendix A: Glossary<br />

Change <strong>Integrity</strong> Terms<br />

administrator <strong>The</strong> administrator installs the Change <strong>Integrity</strong> database on a<br />

network, defines and customizes issue types and workflow, and<br />

creates additional user accounts, allowing users to access the<br />

program.<br />

attached files Change <strong>Integrity</strong> allows you to attach copies of files to an issue, so<br />

that other users may view them.<br />

change package A change package allows you to specify groups of files that are<br />

affected by an issue type, for example, a solution’s change package<br />

might contain files that need to be changed in order to satisfy a<br />

problem.<br />

charts Charts are graphs that present trends over time, or distributions of the<br />

data in your project. Charts are based on the standard and custom<br />

fields of issue types. Trend charts may be displayed as line graphs.<br />

Distribution charts may be displayed as pie graphs or bar graphs.<br />

database A database is the container of Change <strong>Integrity</strong> projects, and may<br />

contain any number of Change <strong>Integrity</strong> projects. You can easily<br />

access multiple databases from Change <strong>Integrity</strong>, but only one at a<br />

time.<br />

group A group consists of one or more users who need to work with<br />

Change <strong>Integrity</strong> issues.<br />

issues Issues track changes in the software development cycle. For example,<br />

your administrator can configure Change <strong>Integrity</strong> in a way that a<br />

problem issue may be associated with a solution issue for easy tracking<br />

and monitoring of both issues. Each issue has an audit trail, which<br />

may be used to evaluate internal processes for the effectiveness of the<br />

problem resolution process. In effect, issues track all aspects of any<br />

engineering endeavor.<br />

issue types Issue types capture and track a specific change request, defect,<br />

problem, solution, or task.<br />

project Projects are labels that help you sort and organize issues in a<br />

hierarchical structure.<br />

454 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Change <strong>Integrity</strong> Terms<br />

query A query is a request to select and list the issue types that meet specific<br />

selection criteria. <strong>The</strong> selection criterion is a logical expression of<br />

specific values, or ranges of values, of the standard and custom fields<br />

of the issue type. Queries are unique for each project because each<br />

issue type may have different custom fields.<br />

reports Reports are summaries of the data in your project. Reports are based<br />

on the standard and custom fields of issue types. Reports can be<br />

customized to include images, fonts, hyperlinks, and can be saved as<br />

HTML files for viewing on the Web.<br />

states Issue types can each have their own set of states to advance through.<br />

<strong>The</strong>y can also follow a state model defined by the project<br />

administrator, giving greater control over who has access to a specific<br />

issue type at a given time, as well as who has responsibility for<br />

approving the advancement of the state.<br />

user A user is anyone who needs to work with Change <strong>Integrity</strong> issues.<br />

<strong>User</strong>s are assigned user permissions to them by the administrator.<br />

<strong>User</strong>s are also assigned to groups that have specific Change <strong>Integrity</strong><br />

group permissions assigned to them by the administrator.<br />

workflow Each issue follows workflow, the process established by your<br />

administrator to capture and track information during your software<br />

development cycle. Each issue type can have its own set of states to<br />

advance through the development cycle. For example, a change<br />

request may go through the following states: submitted, work<br />

started, tested, reviewed, closed. Issues and their current states<br />

provide change management information necessary to support<br />

business decisions.<br />

<strong>User</strong> <strong>Guide</strong> 455


Appendix A: Glossary<br />

456 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Index<br />

-, 251<br />

$, 274<br />

$$, 274<br />

$$*, 276<br />

$$@, 276<br />

$%, 274<br />

$&, 274<br />

$*, 274<br />

$>, 274<br />

$?, 274<br />

$@, 274<br />

$^, 274<br />

+, 251<br />

.DEFAULT, 282<br />

.ELSE, 296<br />

.ELSIF, 297<br />

.END, 297<br />

.EPILOG, 266, 273, 280<br />

.EXPORT, 268, 268<br />

.GROUPEPILOG, 280<br />

.GROUPPROLOG, 280, 290<br />

.IGNORE, 266, 284<br />

.IMPORT, 261<br />

.INCLUDE, 269, 279<br />

.INCLUDEDIRS, 270, 279<br />

.LIBRARY, 293, 295<br />

.NOAUTODEPEND, 293<br />

.POSIX, 270, 288, 293<br />

.PRECIOUS, 266, 273<br />

.PROLOG, 266, 273, 280, 290<br />

.SETDIR, 267, 305, 305<br />

.SILENT, 267, 273, 284, 291<br />

.SOURCE, 271, 277, 305, 306<br />

.SOURCE.x, 271<br />

.SUFFIXES, 287, 287<br />

.SYMBOL, 284<br />

@, 251<br />

@Depends configuration statement, 237<br />

@Template configuration statement, 237<br />

A<br />

accessing metadata, 152<br />

activating an issue, 438<br />

active issue, 92<br />

Add Label<br />

Web interface command, 116, 183<br />

Add Members<br />

Windows interface command, 72<br />

adding<br />

attachments<br />

batch edit, 379<br />

labels, 116<br />

members to a project, 72<br />

related issues<br />

batch edit, 380<br />

administrator<br />

described, 454<br />

All Files option, 92<br />

application window<br />

graphic user interface, 317<br />

archive<br />

branches, 17<br />

checking in revisions, 174<br />

checking out revisions, 172<br />

commands, 61<br />

creating, 167<br />

automatically or interactively, 67<br />

using Microsoft Windows Explorer, 228<br />

defined, 10, 13<br />

deltas, 16<br />

described, 445<br />

editing information, 176<br />

file format<br />

<strong>User</strong> <strong>Guide</strong> 457


Index<br />

text or binary, 170<br />

importing, 171<br />

existing RCS archives using CLI, 151<br />

in configuration management, 10<br />

information<br />

using CLI, 152<br />

library extensions, 257<br />

managing, 165–196<br />

settings, 169<br />

structure, 14<br />

trunks, 17<br />

viewing archive information, 176<br />

archive<br />

overview, 13<br />

archive description<br />

described, 445<br />

archive directory<br />

described, 445<br />

archive file<br />

described, 445<br />

Archive Information<br />

Windows interface command, 176<br />

archive information<br />

described, 445<br />

archive log<br />

described, 446<br />

archive path<br />

described, 446<br />

archive transaction<br />

described, 446<br />

Archive window<br />

described, 446<br />

archived (project member)<br />

described, 445<br />

archived member type, 86<br />

ARFLAGS, 294<br />

Associating, 441<br />

associating<br />

active issues with project members, 441<br />

at-sign in Make, 251<br />

attached files<br />

described, 454<br />

attachments<br />

adding to an issue, 340<br />

opening, 344<br />

removing, 343<br />

saving, 346<br />

attributes, 32, 265–267<br />

in Make, 250<br />

member, 153<br />

removing using CLI, 155<br />

setting using CLI, 153<br />

project, 97, 155<br />

assigning using CLI, 155<br />

removing using CLI, 156<br />

sandbox, 97<br />

author<br />

described, 446<br />

Author keyword, 131<br />

author name<br />

described, 446<br />

Author option, 91<br />

automatic encryption, 160<br />

B<br />

backslash, 250, 291<br />

back-up, 308<br />

batch editing, 377<br />

adding attachments, 379<br />

adding related issues, 380<br />

fields, 378<br />

bcc, 247<br />

before starting<br />

Change <strong>Integrity</strong>, 314<br />

binary files, 17<br />

described, 446<br />

storing in Reference format, 196<br />

blank characters, 249<br />

Borland C++, 247, 256, 299<br />

Borland Delphi 1.0, 2.0, &3.0, 197<br />

Borland Delphi extension, 223<br />

checking in, 226<br />

multiple files, 227<br />

checking out, 225<br />

multiple files, 226<br />

creating<br />

<strong>Source</strong> <strong>Integrity</strong> project, 224<br />

<strong>Source</strong> <strong>Integrity</strong> sandbox, 225<br />

Borland Make, 299<br />

branch, 17<br />

default, 20<br />

defined, 11<br />

described, 446<br />

in configuration management, 11<br />

level, 19<br />

458 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


number, 19<br />

root revision, 17<br />

specifying, 19, 19<br />

starting, 18<br />

starting during check-in, 87<br />

branch revision<br />

defined, 87<br />

revision numbers, 87, 87<br />

browser plugin for <strong>Source</strong> <strong>Integrity</strong> Web Interface,<br />

48, 50<br />

BSD UNIX Make, 300<br />

Build<br />

Windows interface command, 119<br />

building, 234<br />

conditional expansion, 236<br />

language statements, 236<br />

object file associations, 235<br />

preparation, 232<br />

projects, 118<br />

template files, 236<br />

variables, 237<br />

built-in commands in Make, 289<br />

built-in rules in Make, 255<br />

C<br />

CC, 257, 302–304<br />

cc, 302, 303<br />

CFLAGS, 257, 304<br />

Change <strong>Integrity</strong><br />

before starting, 314<br />

concepts, 312<br />

graphic user interface, 317<br />

Web interface, 320<br />

Change <strong>Integrity</strong> Connect<br />

add tracking labels, 439<br />

Change <strong>Integrity</strong> Server, 439<br />

Change <strong>Integrity</strong> user name, 439<br />

configuration, 438<br />

configuring, 438<br />

default issue, 439<br />

enable Change <strong>Integrity</strong> Connect, 438<br />

issue summary, 439<br />

launch Change <strong>Integrity</strong> Web interface, 440<br />

refresh, 439<br />

selected issue, 439<br />

track locks and unlocks, 439<br />

change package<br />

described, 454<br />

viewing, 442<br />

changing<br />

search order in Make, 245<br />

charts, 406<br />

copying, 432<br />

deleting, 431<br />

described, 313, 454<br />

distribution, 406<br />

editing, 427<br />

printing, 434<br />

running, 428<br />

saving, 434<br />

trend, 406<br />

Check In<br />

Web interface command, 92<br />

Windows interface command, 89<br />

working file, 174<br />

check in<br />

described, 447<br />

Check In Same option, 91<br />

Check Out<br />

Windows interface command, 81<br />

check out<br />

described, 447<br />

keywords, 129<br />

Check Out Locked<br />

Web interface command, 84<br />

checking in<br />

active issue, 92<br />

members, 87<br />

multiple files<br />

using Borland Delphi, 227<br />

using Borland Delphi, 226<br />

using Microsoft Developer Studio, 220<br />

using Microsoft Visual Basic, 217<br />

using Microsoft Windows Explorer, 229<br />

what happens, 15, 15<br />

Windows interface options<br />

All Files, 92<br />

Author, 91<br />

Check In Same, 91<br />

Keep Work File, 91<br />

Locked, 91<br />

Replace Label, 91<br />

Revision Description, 92<br />

Revision Label, 90<br />

Revision Number, 91<br />

<strong>User</strong> <strong>Guide</strong> 459


Index<br />

State, 91<br />

Update Member, 91<br />

checking out<br />

by revision, 173<br />

by state setting, 174<br />

locked<br />

using CLI, 172<br />

multiple files<br />

using Borland Delphi, 226<br />

revision number, 173<br />

state settings, 174<br />

unlocked<br />

using CLI, 172<br />

using Borland Delphi, 225<br />

using Microsoft Developer Studio, 219<br />

using Microsoft Visual Basic, 216<br />

using Microsoft Windows Explorer, 229<br />

Windows interface options<br />

All Files, 83<br />

Expand Keywords, 83<br />

Locked (for editing), 83<br />

name of working file, 82<br />

Restore Timestamp, 83<br />

Update Member, 83<br />

which revision, 82<br />

checkpoint<br />

described, 447<br />

Checkpoint Project<br />

Web interface command, 139<br />

Windows interface command, 137<br />

checkpointing projects, 20, 136<br />

ci CLI command, 170<br />

cleaning up<br />

makefiles, 307<br />

working files, 159, 195<br />

CLI commands, 68–128, 136–158, 170–196<br />

pj build, 234<br />

pj mkmf, 233<br />

closing a session, 328<br />

cmd.exe, 250, 289<br />

cnvrnt72, 28<br />

co CLI command, 172<br />

code blocks<br />

editing using CLI, 157<br />

command prefixes<br />

Make, 251<br />

command.com, 250, 289<br />

commands<br />

bcc, 247<br />

cc, 303, 303<br />

CLI<br />

ci, 170<br />

co, 172<br />

delvariant, 158<br />

pj add, 74<br />

pj addrule, 153<br />

pj build, 156<br />

pj checkpoint, 80, 139<br />

pj ci, 93<br />

pj clean, 159, 195<br />

pj co, 84<br />

pj create, 68<br />

pj dropblock, 157<br />

pj droprule, 155<br />

pj editblock, 157<br />

pj freeze, 107<br />

pj freezeproject, 135<br />

pj header, 153<br />

pj label, 117<br />

pj mods, 145, 153<br />

pj print, 152<br />

pj refresh, 105<br />

pj sandbox, 79, 159<br />

pj set, 157<br />

pj thaw, 108, 174<br />

pj thawproject, 136<br />

pj unset, 156<br />

pj what, 152<br />

pvcs2rcs, 148<br />

rcs, 183, 189, 191, 193, 196<br />

rcsclean, 195<br />

report, 128, 152<br />

rlog, 180<br />

sccs2rcs, 148<br />

ident, 130<br />

link, 292<br />

make, 252<br />

syntax<br />

line length, 62<br />

naming files, 63<br />

path separator, 62<br />

wildcard expansion, 62<br />

touch, 308<br />

Web interface<br />

Add Label, 116, 183<br />

Check In, 92<br />

460 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Check Out Locked, 84<br />

Checkpoint Project, 139<br />

Create Sandbox, 78<br />

Delete, 189<br />

Delete Label, 118, 183<br />

Differences, 99<br />

Drop, 75<br />

History > Demote, 142<br />

History > Promote, 142<br />

Lock, 101<br />

Member > Demote, 112<br />

Member > Promote, 112<br />

Member Commands > Add, 73<br />

Member Commands > View, 185<br />

Merge, 192<br />

Open History View, 140, 166<br />

Open Member View, 167<br />

Open Project, 70<br />

Open Sandbox, 71<br />

Promote, 186<br />

Refresh, 115<br />

Refresh Project, 115<br />

Refresh Sandbox, 115<br />

Register Project, 69<br />

Register Sandbox, 69<br />

Resynchronize, 105, 113<br />

Unlock, 103<br />

Update to Tip Revision, 113, 114<br />

View, 87<br />

which, 244<br />

Windows interface<br />

Add Members, 72<br />

Archive Information, 176<br />

Build, 119<br />

Check In, 89<br />

Check Out, 81<br />

Checkpoint Project, 137<br />

Configuration > Personal, 114<br />

Create Sandbox, 76<br />

Delete Revision, 189<br />

Demote, 186<br />

Demote Revision, 186<br />

Differences, 99<br />

Edit Working File, 85<br />

Freeze, 106<br />

Freeze Project, 134<br />

Lock, 101<br />

Member > Demote, 111<br />

Member > Promote, 111<br />

Member Information, 109<br />

Open Member Archive, 86, 166<br />

Open Project Archive, 140, 166<br />

Open Project/Sandbox, 70<br />

Open Subproject, 85<br />

Project/Sandbox Information, 95<br />

Promote Revision, 185<br />

Refresh, 115<br />

Remove Members, 75<br />

Remove Unused Locks, 103<br />

Reports, 124<br />

Resynchronize, 104, 113<br />

Revision Information, 178<br />

Scan for Changes, 115<br />

Thaw, 107<br />

Thaw Project, 135<br />

Undo Checkout, 100<br />

Unlock, 102<br />

Update to Head Rev, 113<br />

Update to Tip Rev, 114<br />

View Log, 142<br />

View Revision, 86, 184<br />

View Working File, 85<br />

View/Edit Working File, 184<br />

comments in Make, 250<br />

common list actions, 365, 367<br />

compare window<br />

described, 447<br />

comparing<br />

files, 190<br />

revisions, 190<br />

working file to member revision, 99<br />

compatibility in Make, 244, 296<br />

compilation configuration files in Make, 302<br />

concepts<br />

Change <strong>Integrity</strong>, 312<br />

conditional expansion, 236<br />

conditionals in Make, 296<br />

Configuration > Personal<br />

Windows interface command, 114<br />

configuration file<br />

described, 447<br />

configuration management<br />

concepts, 10<br />

introduction, 6<br />

configuration statements<br />

@Depends, 237<br />

<strong>User</strong> <strong>Guide</strong> 461


Index<br />

@Template, 237<br />

configuring<br />

Change <strong>Integrity</strong> Connect, 438<br />

content page<br />

Web interface, 321<br />

context menu<br />

graphic user interface, 318<br />

continuation lines in Make, 250<br />

control macros<br />

in Make, 272–273<br />

used with group recipes, 290<br />

copying<br />

charts, 432<br />

reports, 398<br />

Create Sandbox<br />

Web interface command, 78<br />

Windows interface command, 76<br />

wizard, 76<br />

creating<br />

archives, 167<br />

distribution charts, 407<br />

makefiles, 233<br />

projects<br />

in <strong>Source</strong> <strong>Integrity</strong> Web Interface, 68<br />

reports, 386<br />

sandboxes, 76<br />

saved queries, 354<br />

trend charts, 417<br />

D<br />

dash in Make, 251<br />

data types<br />

described, 447<br />

database<br />

described, 454<br />

date<br />

described, 447<br />

Date keyword, 131<br />

DEFAULT, 282<br />

default branch, 20<br />

described, 448<br />

default editor<br />

described, 448<br />

default rules in Make, 255<br />

default startup rules for Make, 298<br />

defining<br />

Make macros on the CLI, 259<br />

Delete<br />

Web interface command, 189<br />

Delete Label<br />

Web interface command, 118, 183<br />

Delete Revision<br />

Windows interface command, 189<br />

deleting<br />

charts, 431<br />

files, 170<br />

labels, 116<br />

queries, 356<br />

reports, 397<br />

revisions, 189<br />

variant sandboxes<br />

using CLI, 158<br />

deltas<br />

archives, 16<br />

described, 448<br />

storing changes only, 16, 17<br />

storing entire file by reference, 17<br />

delvariant CLI command, 158<br />

Demote<br />

Windows interface command, 186<br />

Demote Revision<br />

Windows interface command, 186<br />

demoting<br />

members, 110<br />

projects, 140<br />

revisions, 185<br />

demotion<br />

described, 448<br />

dependencies, 118<br />

dependency of files in Make, 246<br />

descriptions<br />

reports, 392<br />

development cycle, 36<br />

development objects<br />

defined, 12<br />

development paths<br />

and variant sandboxes, 24<br />

development, managing, 36<br />

Differences<br />

Web interface command, 99<br />

Windows interface command, 99<br />

directories<br />

master, 307<br />

mksnt, 244<br />

mksos2, 244<br />

462 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


DIRSEPSTR, 272<br />

distribution charts, 406<br />

creating, 407<br />

creating from a saved query, 410<br />

saving, 417<br />

specifying a graph, 411<br />

specifying a legend, 416<br />

specifying axes, 414<br />

specifying colors, 412<br />

specifying fields, 409<br />

specifying query filters, 410<br />

specifying text, 408<br />

Drop<br />

Web interface command, 75<br />

dynamic prerequisite macros, 276<br />

E<br />

Edit Working File<br />

Windows interface command, 85<br />

editing<br />

archive information, 176<br />

charts, 427<br />

code blocks using CLI, 157<br />

issues, 376<br />

members, 85<br />

multiple issues, 377<br />

project information, 94<br />

reports, 393<br />

revision information, 178<br />

revisions, 184<br />

sandbox information, 94<br />

saved query properties, 357<br />

working file, 184<br />

ELSE, 296<br />

ELSIF, 297<br />

encrypting files<br />

using CLI, 160<br />

encryption<br />

automatic, 160<br />

changing encryption key, 162<br />

choosing encryption key, 161<br />

explicit, 160, 161<br />

using CLI, 160<br />

with other applications, 162<br />

working with, 162<br />

END, 297<br />

enforce<br />

described, 448<br />

environment variables<br />

MAKESTARTUP, 255<br />

PROJECT, 62<br />

ROOTPROJECT, 62<br />

EPILOG, 266, 280<br />

examples<br />

.EPILOG, 280<br />

.GROUPEPILOG, 280<br />

.GROUPPROLOG, 280<br />

.INCLUDE, 279<br />

.INCLUDEDIRS, 279<br />

.PROLOG, 280<br />

.SETDIR, 267<br />

cc, 303, 304<br />

cleaning up makefiles, 307<br />

conditionals in Make, 296<br />

continuation lines in Make, 250<br />

defining Make macros on the CLI, 259<br />

finding files in Make, 278<br />

group recipes in Make, 290<br />

macro expansion in Make, 256<br />

macro naming conventions in Make, 258<br />

make, 253<br />

makefile, 256<br />

makefiles, 247<br />

making libraries in Make, 293<br />

prefix and suffix modifiers, 264<br />

printchk, 308<br />

recipes in Make, 292<br />

running Make without a makefile, 304<br />

run-time macros in Make, 275<br />

simple makefile, 305<br />

specifying targets on the CLI in Make, 252<br />

string substitution, 262–263<br />

suffix rules in Make, 286<br />

tokenization, 263<br />

using a library, 306<br />

using a separate object directory in Make, 305<br />

using different makefile, 252<br />

writing rules in Make, 248<br />

executable file extensions, 257<br />

expansion, 256<br />

wildcard, 62<br />

explicit encryption, 160<br />

EXPORT, 268<br />

expressions in Make, 297<br />

extensions<br />

<strong>User</strong> <strong>Guide</strong> 463


Index<br />

archive window, 206<br />

Borland Delphi, 223<br />

creating projects, 210<br />

creating sandboxes, 212<br />

difference between extensions and <strong>Source</strong> <strong>Integrity</strong>,<br />

210<br />

features, 198<br />

Microsoft Developer Studio 97, 218<br />

Microsoft Visual Basic, 214<br />

Microsoft Windows Explorer, 227<br />

project window, 199<br />

using, 209<br />

F<br />

fields<br />

batch editing, 378<br />

file names containing a colon in Make, 249<br />

files<br />

.bat, 290<br />

.obj, 248, 257, 297<br />

format<br />

text or binary, 170<br />

filters<br />

project view, 57<br />

sandbox view, 53<br />

using within extensions Project window, 200<br />

Windows interface<br />

all members, 44<br />

frozen members, 45<br />

locked by me, 45<br />

locked members, 45<br />

members with label, 45<br />

members with state, 45<br />

modified members, 44<br />

out-of-sync members, 45<br />

subprojects, 45<br />

using, 44<br />

finding files<br />

Make, 277–278<br />

folder<br />

described, 448<br />

Freeze<br />

Windows interface command, 106<br />

freeze (a member)<br />

described, 448<br />

freeze (a project)<br />

described, 448<br />

Freeze Project<br />

Windows interface command, 134<br />

freezing<br />

members, 106<br />

projects, 134<br />

frozen<br />

described, 448<br />

G<br />

generic command line format in Make, 303<br />

global configuration file<br />

described, 448<br />

glossary of terms, 445<br />

graph, 124<br />

graphic user interface<br />

application window, 317<br />

context menu, 318<br />

Issue Details, 319<br />

menu bar, 317<br />

Query Bar, 318<br />

Query Builder, 318<br />

Query Results, 318<br />

status bar, 318<br />

toolbar, 318<br />

group<br />

described, 313, 454<br />

permissions<br />

described, 313<br />

group recipes, 289<br />

GROUPEPILOG, 280<br />

GROUPFLAGS, 290<br />

GROUPPROLOG, 280, 290<br />

groups<br />

defined, 35<br />

GROUPSHELL, 290<br />

GROUPSUFFIX, 290<br />

H<br />

head rev<br />

updating to, 113<br />

head revision<br />

described, 448<br />

Header keyword, 131<br />

headers<br />

makefile variable, 238<br />

History > Demote<br />

464 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Web interface command, 142<br />

History > Promote<br />

Web interface command, 142<br />

history view, 58<br />

I<br />

Id keyword, 131<br />

ident command, 130<br />

IDEs, 197<br />

IGNORE, 266, 284<br />

Ignore Non-Members option, 122<br />

ignoring errors in Make, 299<br />

IMPORT, 261<br />

importing<br />

archives, 171<br />

files<br />

PVCS, 149<br />

SCCS, 149<br />

using CLI, 148<br />

INCLUDE, 269, 279<br />

INCLUDEDIRS, 270, 279<br />

inheriting meta-rules, 284<br />

installing<br />

<strong>Source</strong> <strong>Integrity</strong> Web Interface, 50<br />

<strong>Source</strong> <strong>Integrity</strong> Web Interface browser plugin,<br />

48, 50<br />

Integrated Development Environments<br />

see IDEs<br />

<strong>Integrity</strong> Server, 48, 49<br />

Issue Details<br />

graphic user interface, 319<br />

issue type relationships<br />

described, 312<br />

issue types<br />

described, 312, 454<br />

relationships<br />

described, 312<br />

issues<br />

adding attachments, 340<br />

associating with project members, 441<br />

described, 312, 454<br />

editing, 376<br />

linking, 347<br />

printing, 371, 371<br />

relating, 335<br />

saving, 373<br />

selecting, 367<br />

submitting, 332<br />

viewing, 367<br />

K<br />

Keep Work File option, 91<br />

keyword<br />

Author, 131<br />

Date, 131<br />

described, 449<br />

Header, 131<br />

Id, 131<br />

Locker, 131<br />

Log, 132<br />

Name, 132<br />

ProjectName, 132<br />

ProjectRevision, 132<br />

RCSfile, 132<br />

Revision, 132<br />

<strong>Source</strong>, 132<br />

State, 132<br />

keyword expansion, 129<br />

described, 449<br />

keywords, 33<br />

check out, 129<br />

defined, 33, 129<br />

locating, 130<br />

removing keyword values, 131<br />

using, 129<br />

working file, 129<br />

L<br />

label<br />

described, 449<br />

labels, 29<br />

adding, 116<br />

assigning<br />

in GUI and <strong>Source</strong> <strong>Integrity</strong> Web Interface,<br />

116<br />

in Windows and Web interfaces, 183<br />

with CLI, 94<br />

changing, 175<br />

deleting, 116<br />

requirements, 30<br />

language statements for building, 236<br />

LDFLAGS, 304<br />

LDLIBS, 295<br />

<strong>User</strong> <strong>Guide</strong> 465


Index<br />

LIBRARY, 293<br />

link, 292<br />

linking<br />

issues, 347<br />

lists<br />

common actions, 365, 367<br />

local default rules in Make, 255<br />

locating keywords, 130<br />

Lock<br />

Web interface command, 101<br />

Windows interface command, 101<br />

lock<br />

described, 449<br />

Locked option, 91<br />

locker<br />

described, 449<br />

Locker keyword, 131<br />

locking<br />

in variant sandboxes, 26<br />

members, 101<br />

revisions, 187<br />

locks<br />

removing unused, 103<br />

log file<br />

described, 449<br />

log files, 33<br />

Log keyword, 132<br />

logging, 142, 193<br />

cleaning up log files, 142, 195<br />

log file format, 194<br />

logging in, 314<br />

password, 315, 316<br />

port number, 315<br />

server name, 315<br />

user name, 315, 316<br />

logging out, 328<br />

M<br />

macro definitions, 254<br />

macro expansion in Make, 256<br />

modifying, 261–265<br />

macro modifiers in Make, 262<br />

macro naming conventions in Make, 258<br />

MAKE, 307<br />

Make<br />

attributes, 265–267<br />

back-up, 308<br />

built-in commands, 289<br />

built-in rules, 255<br />

cc, 303<br />

changing your search order, 245<br />

cleaning up, 307<br />

colons in file names, 249<br />

command prefixes, 251<br />

compatibility, 244, 296<br />

compilation configuration files, 302<br />

conditionals, 296<br />

control macros, 272–273<br />

used with group recipes, 290<br />

default rules, 255<br />

default startup rules, 298<br />

defining macros on the CLI, 259<br />

dependency of files, 246<br />

dynamic prerequisite macros, 276<br />

finding files, 277–278<br />

forms of expressions, 297<br />

generic command line format, 303<br />

group recipes, 289<br />

ignoring errors, 299<br />

local default rules, 255<br />

macro definitions, 254<br />

macro naming conventions, 258<br />

makefiles, 246, 247<br />

MAKESTARTUP, 255<br />

making libraries, 293–296<br />

metarules, 282–286<br />

metarules for library support, 294<br />

missing rules, 251<br />

modifying macro expansions, 261–265<br />

nesting macros in other macros, 259–261<br />

options<br />

-D, 254, 255<br />

-f, 255<br />

-f file, 254<br />

-k, 254<br />

-n, 254<br />

-u, 254<br />

prefix and suffix modifiers, 264<br />

problems, 304–308<br />

recipes, 288–293<br />

recursive makes, 307<br />

rules, 247, 250–251<br />

running Make without a makefile, 304<br />

run-time macros, 274–275<br />

search order, 245<br />

466 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


special target directives, 267–271<br />

specifying targets on the CLI, 252<br />

string substitution, 262–263<br />

suffix rules, 286–288<br />

suffix rules for library support, 295<br />

text diversions, 291<br />

tokenization, 263<br />

transitive closure, 285<br />

using a separate object directory, 305<br />

using CC, 302–304<br />

using different makefile, 252<br />

using inference rules, 281–288<br />

using macros, 256–265<br />

writing rules, 248–249<br />

make command, 252, 253<br />

makefile, 246, 247, 255<br />

creating, 233<br />

template, 236<br />

MAKEFLAGS, 307<br />

MAKESTARTUP, 255, 292<br />

making libraries, 293–296<br />

managing archives, 165–196<br />

managing development, 36<br />

master project<br />

see project<br />

Member > Demote<br />

Web interface command, 112<br />

Windows interface command, 111<br />

Member > Promote<br />

Web interface command, 112<br />

Windows interface command, 111<br />

member attributes, 153<br />

removing using CLI, 155<br />

setting using CLI, 153<br />

Member Commands > Add<br />

Web interface command, 73<br />

Member Commands > View<br />

Web interface command, 185<br />

Member Information<br />

Windows interface command, 109<br />

member type<br />

archived, 86<br />

non-archived, 86<br />

subproject, 86<br />

member view, 55<br />

members<br />

associating an active issue, 441<br />

checking in, 87<br />

demoting, 110<br />

editing, 85<br />

freezing, 106<br />

information<br />

active issue, 109<br />

Archive File, 108<br />

Author, 108<br />

Date, 108<br />

Label, 108<br />

Locker, 108<br />

Member, 108<br />

Revision, 108<br />

Revision description, 109<br />

State, 108<br />

Type, 108<br />

Working File, 108<br />

locking, 101<br />

promoting, 110<br />

removing from project, 75<br />

thawing, 106<br />

unlocking, 101<br />

viewing, 85<br />

viewing information, 108<br />

menu bar<br />

graphic user interface, 317<br />

Merge<br />

Web interface command, 192<br />

merging working files, 192<br />

metadata, 152<br />

attributes, 32<br />

defined, 11<br />

described, 449<br />

in configuration management, 11<br />

keywords, 33<br />

labels, 29<br />

log files, 33<br />

revision descriptions, 30<br />

timestamps, 31<br />

and building, 31<br />

setting, 31<br />

metarules, 282–286<br />

for library support in Make, 294<br />

Microsoft C++, 300<br />

Microsoft C/C++, 247<br />

Microsoft Developer Studio, 197<br />

Microsoft Developer Studio 97 extension, 218<br />

Microsoft Developer Studio extension<br />

checking in, 220<br />

<strong>User</strong> <strong>Guide</strong> 467


Index<br />

checking out, 219<br />

creating <strong>Source</strong> <strong>Integrity</strong> project, 219<br />

creating <strong>Source</strong> <strong>Integrity</strong> sandbox, 219<br />

Microsoft Make, 300<br />

Microsoft Visual Basic extension, 214<br />

checking in, 217<br />

checking out, 216<br />

creating <strong>Source</strong> <strong>Integrity</strong> project, 215<br />

creating <strong>Source</strong> <strong>Integrity</strong> sandbox, 216<br />

Microsoft Windows Explorer, 197<br />

Microsoft Windows Explorer extension, 227<br />

checking in, 229<br />

checking out, 229<br />

creating archives, 228<br />

missing rules in Make, 251<br />

mksnt, 244<br />

mksos2, 244<br />

modifiers, 262<br />

N<br />

Name keyword, 132<br />

nesting macros in other macros, 259–261<br />

new submissions<br />

notifications, 323<br />

NOAUTODEPEND, 293<br />

non-archived<br />

member type, 86<br />

non-archived (project member)<br />

described, 449<br />

notifications<br />

new submissions, 323<br />

NULL, 258, 272, 273, 277<br />

O<br />

object file, 257<br />

associations, 235<br />

OBJECTS, 292<br />

objects<br />

makefile variable, 238<br />

Open History View<br />

Web interface command, 140, 166<br />

Open Member Archive<br />

Windows interface command, 86, 166<br />

Open Member View<br />

Web interface command, 167<br />

Open Project<br />

Web interface command, 70<br />

Open Project Archive<br />

Windows interface command, 140, 166<br />

Open Project/Sandbox<br />

Windows interface command, 70<br />

Open Sandbox<br />

Web interface command, 71<br />

Open Subproject<br />

Windows interface command, 85<br />

opening<br />

attachments, 344<br />

project archives, 140<br />

projects, 70<br />

in <strong>Source</strong> <strong>Integrity</strong> Web Interface, 70, 71<br />

in Windows interface, 70<br />

related issues, 339<br />

OS, 272<br />

OS/2, 245<br />

OSRELEASE, 273<br />

OSVERSION, 272<br />

P<br />

PATH, 245<br />

Path, 245<br />

path separator, 62<br />

Personal Configuration File<br />

described, 449<br />

pj add CLI command, 74<br />

pj addrule CLI command, 153<br />

pj build CLI command, 156, 234<br />

pj checkpoint CLI command, 80, 139<br />

pj ci CLI command, 93<br />

pj clean CLI command, 159, 195<br />

pj co CLI command, 84<br />

pj create CLI command, 68<br />

pj dropblock CLI command, 157<br />

pj droprule CLI command, 155<br />

pj editblock CLI command, 157<br />

pj freeze CLI command, 107<br />

pj freezeproject CLI command, 135<br />

pj header CLI command, 153<br />

pj label CLI command, 117<br />

pj mkmf CLI command, 233<br />

pj mods CLI command, 145, 153<br />

pj print CLI command, 152<br />

pj refresh CLI command, 105<br />

pj sandbox CLI command, 79, 159<br />

468 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


pj set CLI command, 157<br />

pj thaw CLI command, 108, 174<br />

pj thawproject CLI command, 136<br />

pj unset CLI command, 156<br />

pj what CLI command, 152<br />

plugin for <strong>Source</strong> <strong>Integrity</strong> Web Interface, 48, 50<br />

plus-sign in Make, 251<br />

policy<br />

defined, 34<br />

POSIX, 244, 257, 270, 288, 293<br />

PRECIOUS, 266<br />

prefix and suffix modifiers in Make, 264<br />

prerequisites in Make, 251<br />

printing<br />

charts, 434<br />

issues, 371, 371<br />

reports, 401<br />

product terms<br />

defined, 445<br />

project<br />

adding members, 72<br />

with CLI, 74<br />

attributes, 155<br />

assigning using CLI, 155<br />

removing using CLI, 156<br />

building, 118<br />

checkpointing, 20, 136<br />

commands, 61<br />

creating<br />

in <strong>Source</strong> <strong>Integrity</strong> Web Interface, 68<br />

using Borland Delphi, 224<br />

using Microsoft Developer Studio, 219<br />

using Microsoft Visual Basic, 215<br />

using <strong>Source</strong> <strong>Integrity</strong> extensions, 210<br />

defined, 13<br />

demoting, 140<br />

described, 313, 449, 454<br />

editing information, 94<br />

freezing, 134<br />

opening, 70, 328<br />

in <strong>Source</strong> <strong>Integrity</strong> Web Interface, 70<br />

in Windows interface, 70<br />

opening in <strong>Source</strong> <strong>Integrity</strong> Web Interface, 71<br />

opening project archives, 140<br />

organization, 13<br />

overview, 13<br />

promoting, 140<br />

refreshing, 115<br />

registering, 69<br />

removing members, 75<br />

resynchronizing, 104<br />

scanning for changes, 114<br />

structure, 13<br />

thawing, 134<br />

viewing information, 94<br />

project directory<br />

described, 449<br />

PROJECT environment variable, 62<br />

project file, 143<br />

changes, 143<br />

project information<br />

changed members, 152<br />

list of members, 152<br />

reports, 128<br />

variables and attributes, 153<br />

project log<br />

described, 450<br />

project member<br />

described, 450<br />

project members<br />

associating with an active issue, 441<br />

Project view<br />

described, 450<br />

project view, 56–58<br />

filters, 57<br />

selections, 58<br />

Project window<br />

described, 450<br />

Project/Sandbox Information<br />

Windows interface command, 95<br />

projectFiles<br />

makefile variable, 238<br />

ProjectName keyword, 132<br />

ProjectRevision keyword, 132<br />

PROLOG, 266, 273, 280, 290<br />

Promote<br />

Web interface command, 186<br />

Promote Revision<br />

Windows interface command, 185<br />

promoting<br />

members, 110<br />

projects, 140<br />

revisions, 185<br />

promotion<br />

described, 450<br />

promotion state<br />

<strong>User</strong> <strong>Guide</strong> 469


Index<br />

described, 450<br />

PVCS<br />

importing, 149<br />

pvcs2rcs CLI command, 148<br />

PWD, 272, 273<br />

Q<br />

queries<br />

creating saved, 354<br />

deleting, 356<br />

filters<br />

reports, 391<br />

refreshing, 361<br />

reverting, 356<br />

running, 359<br />

query<br />

described, 313, 455<br />

Query Bar<br />

graphic user interface, 318<br />

Query Builder<br />

graphic user interface, 318<br />

Query Results<br />

graphic user interface, 318<br />

viewing, 364<br />

query toolbar<br />

Web interface, 320<br />

R<br />

rcs CLI command, 183, 189, 191, 193, 196<br />

rcsclean CLI command, 195<br />

RCSfile keyword, 132<br />

recipes in Make, 251, 288–293<br />

recursive makes, 307<br />

Reference format, 17, 196<br />

Refresh<br />

Web interface command, 115<br />

Windows interface command, 115<br />

refresh<br />

queries, 361<br />

Refresh Project<br />

Web interface command, 115<br />

Refresh Sandbox<br />

Web interface command, 115<br />

refreshing project or sandbox, 115<br />

Register Project<br />

Web interface command, 69<br />

Register Sandbox<br />

Web interface command, 69<br />

registering<br />

projects, 69<br />

related issues<br />

opening, 339<br />

removing, 338<br />

relating<br />

issues, 335<br />

Remove Members<br />

Windows interface command, 75<br />

Remove Unused Locks<br />

Windows interface command, 103<br />

removing<br />

attachments, 343<br />

keyword values, 131<br />

project members, 75<br />

related issues, 338<br />

unused locks, 103<br />

Replace Label option, 91<br />

report CLI command, 128, 152<br />

report types, 37<br />

Reporter, 124<br />

overview, 37<br />

report types, 37<br />

change history, 37<br />

changes by author, 37<br />

changes from member to label, 37<br />

changes from member to revision, 37<br />

locked revisions, 37<br />

newer revisions, 37<br />

revisions with label, 37<br />

revisions with state, 37<br />

summary of changes by file type, 37<br />

Reports<br />

Windows interface command, 124<br />

reports, 128, 386<br />

copying, 398<br />

creating, 386<br />

creating from saved queries, 391<br />

deleting, 397<br />

described, 313, 455<br />

descriptions, 392<br />

editing, 393<br />

graphs, 124<br />

printing, 401<br />

query filters, 391<br />

running, 395<br />

470 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


saving, 392, 400<br />

templates, 387<br />

Resynchronize<br />

Web interface command, 105, 113<br />

Windows interface command, 104, 113<br />

resynchronizing<br />

projects, 104<br />

sandboxes, 104<br />

reverting<br />

queries, 356<br />

revision<br />

described, 450<br />

revision description<br />

described, 450<br />

Revision Description option, 92<br />

revision descriptions, 30<br />

adding, 175<br />

Revision Information<br />

Windows interface command, 178<br />

revision information<br />

locked revisions, 182<br />

revision description, 175<br />

using CLI, 152<br />

Revision keyword, 132<br />

revision label<br />

described, 451<br />

see labels<br />

Revision Label option, 90<br />

revision labels<br />

changing, 175<br />

revision number<br />

described, 451<br />

Revision Number option, 91<br />

revision numbers<br />

changing, 91<br />

defined, 19<br />

valid, 88<br />

revisions<br />

comparing, 190<br />

defined, 10, 12<br />

deleting, 189<br />

demoting, 185<br />

editing, 184<br />

revision information, 178<br />

in configuration management, 10<br />

locking, 187<br />

promoting, 185<br />

unlocking, 187<br />

viewing, 184<br />

revision information, 178<br />

viewing metadata<br />

with archive commands, 180<br />

rlog CLI command, 180<br />

roles<br />

defined, 35<br />

root revision, 17<br />

defined, 17<br />

ROOTDIR, 244<br />

ROOTPROJECT environment variable, 62<br />

rule operator in Make, 250<br />

rules in Make, 250–251<br />

running<br />

charts, 428<br />

queries, 359<br />

reports, 395<br />

run-time macros in Make, 274–275<br />

S<br />

SAM, 34–35<br />

groups<br />

defined, 35<br />

overview, 34<br />

policy<br />

defined, 34<br />

roles<br />

defined, 35<br />

structure, 34<br />

users<br />

defined, 34<br />

Sandbox view<br />

described, 451<br />

filters, 53<br />

sandbox view, 52–55<br />

selections, 54<br />

Sandbox window<br />

described, 451<br />

sandboxes, 21, 115<br />

and projects, 22<br />

applications, 22<br />

creating, 76<br />

using Borland Delphi, 225<br />

using Microsoft Developer Studio, 219<br />

using Microsoft Visual Basic, 216<br />

using <strong>Source</strong> <strong>Integrity</strong> extensions, 212<br />

described, 451<br />

<strong>User</strong> <strong>Guide</strong> 471


Index<br />

editing information, 94<br />

overview, 21<br />

resynchronizing, 104<br />

sparse, 81<br />

using, 21<br />

variant, 24<br />

viewing information, 94<br />

saved queries<br />

creating reports, 391<br />

properties<br />

editing, 357<br />

viewing, 357<br />

undo changes, 356<br />

saving<br />

attachments, 346<br />

charts, 434<br />

distribution charts, 417<br />

issues, 373<br />

reports, 392, 400, 400<br />

session preferences, 327<br />

trend charts, 426<br />

Scan for Changes<br />

Windows interface command, 115<br />

scanning projects for changes, 114<br />

SCCS<br />

importing, 149<br />

sccs2rcs CLI command, 148<br />

SCM<br />

see Software Configuration Management<br />

search order, 245<br />

security, 34–35<br />

and SAM, 34–35<br />

Security and Administration Module<br />

see SAM<br />

selecting<br />

issues, 367<br />

selecting a project, 328<br />

selections<br />

project view, 58<br />

sandbox view, 54<br />

session<br />

closing, 328<br />

logging in, 314<br />

logging out, 328<br />

preferences<br />

email notification, 323<br />

general, 321<br />

layout, 322<br />

saving, 327<br />

setting, 321<br />

toolbar, 327<br />

session preferences<br />

setting, 321<br />

SETDIR, 267, 305<br />

setting<br />

session preferences, 321<br />

SHELL, 273<br />

SHELLFLAGS, 289<br />

SHELLMETAS, 288<br />

SILENT, 267, 273, 284, 291<br />

slash, 263<br />

Software Configuration Management, 1<br />

solving problems in Make, 304–308<br />

SOURCE, 271, 277, 305, 306<br />

source control, 437<br />

<strong>Source</strong> <strong>Integrity</strong>, 284, 300<br />

<strong>Source</strong> <strong>Integrity</strong> extensions<br />

features, 198<br />

using, 209<br />

<strong>Source</strong> <strong>Integrity</strong> Web Interface, 49, 50<br />

browser plugin, 48, 50<br />

client component, 48<br />

installing, 50<br />

session applet, 48<br />

starting, 50–51<br />

<strong>Source</strong> keyword, 132<br />

SOURCE.x, 271<br />

sources<br />

makefile variable, 238<br />

sparse sandboxes, 81<br />

special target directives, 267–271<br />

macros and, 261<br />

specifying targets on the CLI in Make, 252<br />

starting<br />

branch during check-in, 87<br />

<strong>Source</strong> <strong>Integrity</strong> Web Interface, 50–51<br />

state<br />

assigning, 94<br />

described, 452<br />

settings<br />

assigning, 94, 176<br />

State keyword, 132<br />

State option, 91<br />

states<br />

described, 455<br />

status<br />

472 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


Web interface, 321<br />

status bar<br />

graphic user interface, 318<br />

storing<br />

binary files, 17<br />

text files, 16, 17<br />

strict locking, 84<br />

check in using CLI, 172<br />

described, 452<br />

using CLI, 172<br />

string substitution, 262–263<br />

submissions<br />

notifications, 323<br />

submitted issues<br />

relating<br />

issues, 335<br />

submitting<br />

issues, 332<br />

subproject<br />

described, 452<br />

member type, 86<br />

suffix rules, 286–288<br />

for library support in Make, 295<br />

SUFFIXES, 287<br />

SWITCHAR, 273, 289<br />

SYMBOL, 284<br />

symbols<br />

beside members<br />

frozen member, 56<br />

inaccessible archive, 57<br />

tip revision, 56<br />

beside revisions<br />

member revision, 55<br />

System V MAKE, 301<br />

T<br />

template files, 236<br />

templates<br />

reports, 387<br />

terms<br />

defined, 445<br />

text diversions in Make, 291<br />

Thaw<br />

Windows interface command, 107<br />

thaw<br />

described, 452<br />

Thaw Project<br />

Windows interface command, 135<br />

thawing<br />

members, 106<br />

projects, 134<br />

timestamps, 31<br />

and building, 31<br />

in build environment, 32<br />

setting, 31<br />

tip rev<br />

updating to, 114<br />

tip revision<br />

defined, 17<br />

described, 452<br />

tokenization, 263<br />

toolbar, 320<br />

graphic user interface, 318<br />

Web interface, 320<br />

touch, 308<br />

transitive closure, 285<br />

trend charts, 406<br />

creating, 417<br />

saving, 426<br />

specifying a graph, 421<br />

specifying a legend, 425<br />

specifying axes, 424<br />

specifying colors, 422<br />

specifying filters, 420<br />

specifying text, 418<br />

trunk, 17<br />

described, 452<br />

type (project member)<br />

described, 452<br />

U<br />

undo changes<br />

saved queries, 356<br />

Undo Checkout<br />

Windows interface command, 100<br />

UNIX, 244, 257, 283, 294<br />

UNIX System V, 263<br />

Unlock<br />

Web interface command, 103<br />

Windows interface command, 102<br />

unlocking<br />

members, 101<br />

revisions, 187<br />

Update Member option, 91<br />

<strong>User</strong> <strong>Guide</strong> 473


Index<br />

Update to Head Rev<br />

Windows interface command, 113<br />

Update to Tip Rev<br />

Windows interface command, 114<br />

Update to Tip Revision<br />

Web interface command, 113, 114<br />

updating<br />

to head rev, 113<br />

to tip rev, 114<br />

URL<br />

Change <strong>Integrity</strong> home page, 315<br />

user<br />

described, 312, 455<br />

user name<br />

described, 452<br />

users<br />

defined, 34<br />

using<br />

different makefile, 252<br />

extensions, 209<br />

inference rules in Make, 281–288<br />

keywords, 129<br />

macros in Make, 256–265<br />

V<br />

VanillaRCS configuration option, 151<br />

variant sandbox, 24<br />

converting old-style, 28<br />

deleting<br />

using CLI, 158<br />

described, 452<br />

locking in, 26<br />

using to build, 232<br />

version control, 437<br />

View<br />

Web interface command, 87<br />

View Log<br />

Windows interface command, 142<br />

View Revision<br />

Windows interface command, 86, 184<br />

View Working File<br />

Windows interface command, 85<br />

View/Edit Working File<br />

Windows interface command, 184<br />

viewing<br />

archive information, 176<br />

change packages, 442<br />

issues, 367<br />

member information, 108<br />

members, 85<br />

project information, 94<br />

Query Results, 364<br />

revision information, 178<br />

revisions, 184<br />

sandbox information, 94<br />

saved query properties, 357<br />

working file, 184<br />

views<br />

history, 58<br />

introduction, 52–58<br />

member, 55<br />

project, 56–58<br />

sandbox, 52–55<br />

Visual Basic<br />

see Microsoft Visual Basic<br />

Visual C++, 197<br />

Visual Difference window<br />

described, 453<br />

Visual J++, 197<br />

W<br />

Watcom C/C++, 247<br />

Web interface<br />

Change <strong>Integrity</strong>, 320<br />

content page, 321<br />

query toolbar, 320<br />

status, 321<br />

toolbar, 320<br />

which, 244<br />

white space in Make, 249<br />

wildcard, 63<br />

expansion, 62<br />

Windows 95, 272, 298<br />

Windows Explorer<br />

see Microsoft Windows Explorer<br />

Windows interface filters<br />

all members, 44<br />

frozen members, 45<br />

locked by me, 45<br />

locked members, 45<br />

members with label, 45<br />

members with state, 45<br />

modified members, 44<br />

out-of-sync members, 45<br />

474 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>


subprojects, 45<br />

using, 44<br />

Windows NT, 272, 298<br />

work tree<br />

described, 453<br />

workflow<br />

described, 312, 455<br />

working directory<br />

described, 453<br />

working file<br />

check in, 174<br />

cleaning up, 159, 195<br />

comparing to member revision, 99<br />

deleting, 170<br />

described, 453<br />

discarding changes, 100<br />

editing, 184<br />

keywords, 129<br />

merging, 192<br />

viewing, 184<br />

writing a rule in Make, 248–249<br />

<strong>User</strong> <strong>Guide</strong> 475


Index<br />

476 <strong>Source</strong> <strong>Integrity</strong> <strong>Professional</strong> <strong>Edition</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!