Plastic SCM User’s Guide


Table of Contents

1.     Introduction. 1

1.1.     What is Plastic SCM? 1

1.2.     Problems without version control 1

1.3.     Components 1

2.     Basic concepts. 3

2.1.     Repository. 3

2.2.     Item.. 3

2.3.     Revisions 4

2.4.     Branch. 5

2.4.1.     Version tree. 7

2.4.2.     Branch explorer 9

2.5.     Smart branches 10

2.6.     Workspace. 11

2.7.     Label (marker) 12

3.     Plastic SCM operations. 14

3.1.     Creating a repository. 14

3.2.     Creating workspaces 15

3.3.     Add. 16

3.4.     Check in. 20

3.5.     Update. 21

3.5.1.     Modified items in the workspace. 21

3.5.2.     Items marked as .unloaded. 22

3.5.3.     Checkout shelving. 22

3.5.4.     Parallel update. 23

3.6.     Check out 23

3.6.1.     Internal Checkout details 24

3.7.     Displaying pending checkins 25

3.8.     Undo checkout 26

3.9.     Revert to a previous revision. 27

3.10.  Creating a branch. 29

3.11.  Editing branch properties 30

3.12.  Merge (integration) 33

3.12.1.  Merge conflict types 33

3.12.2.  Contributors 34

3.12.3.  Merges from the same branch. 35

3.12.4.  Merging from different branches 36

3.12.5.  Merging from a branch and a label 37

3.12.6.  Merge from a label 38

3.12.7.  Merging from a changeset 38

3.12.8.  Merging from a revision. 39

3.12.9.  Merging from the command line. 39

3.12.10.        Cherry Picking or selective merge. 40

3.12.11.        Merging an interval of changes 42

3.13.  Subtractive merge (desintegration) 42

Subtracting a revision interval 46

Subtracting a changeset 48

3.14.  Creating a label 48

3.15.  Applying a label 48

3.16.  Working with attributes 49

3.17.  Creating an attribute. 50

3.18.  Applying an attribute. 50

3.19.  Editing an attribute value. 51

3.20.  Deleting an attribute application. 52

3.21.  Querying objects with attributes 52

4.     Starting up a project 54

4.1.     Creating a repository. 54

4.2.     Creating workspaces 54

4.3.     Performing a first code import 55

4.4.     Starting to work. 58

4.4.1.     Update. 58

4.5.     Checking out items to work with them.. 58

4.6.     Finding checked out files 60

5.     Workspace selectors in depth. 61

5.1.     Selector´s appearance. 61

5.2.     Selector definition. 61

5.3.     Path rules 63

5.4.     The norecursive path rule option. 63

5.5.     Specifying wildcards on the path selection rule. 64

5.6.     Retrieving an item’s specific revision. 65

5.7.     Smart branch rules 65

6.     Object specifications. 67

6.1.     Revision specifications 67

6.2.     Branch specifications 67

6.3.     Item specifications 67

6.4.     Label specifications 67

6.5.     Repository specifications 68

6.6.     Workspace specifications 68

6.7.     Repository server specifications 68

6.8.     Workspace server specifications 68

7.     Plastic SCM GUI Tool 69

7.1.     The main window. 69

7.2.     The view system.. 70

7.3.     Workspace selection. 70

7.4.     Modifying the workspace selector 71

7.5.     Context menus 71

7.6.     The differences dialog. 77

7.7.     The differences tool 78

7.8.     The image diff tool 78

7.9.     The merge dialog. 79

7.10.  The merge tool for text files 80

7.11.  The binary merge tool 82

8.     Managing projects with Plastic SCM.. 84

8.1.     Working on the main branch. 84

8.2.     Branch per developer 84

8.3.     Branch per task. 85

9.     Visual Studio Plug In. 87

9.1.     Adding projects to the source control system.. 87

9.2.     Opening existing projects under source control 87

9.3.     Operations 88

9.4.     Additional source control operations 89

9.5.     Working disconnected. 90

10.  Jdeveloper plugin. 92

10.1.  Adding projects to the source control system.. 92

10.2.  Operations 94

10.3.  Decorators 95

11.  Eclipse Plug In. 96

11.1.  Adding projects to the source control system.. 96

11.2.  Opening existing projects under source control 98

11.3.  Operations 99

11.4.  Refactor support 100

11.5.  Preferences 101

11.6.  Decorators 102

12.  Simple Query System.. 103

12.1.  Query Language. 103

12.2.  Usage examples 106

12.3.  Query language grammar 108

13.  Advanced Query System (AQS). 110

13.1.  Query Language. 110

13.2.  Usage examples 114

14.  Import from other SCM.. 116

14.1.  Introduction. 116

14.2.  Operating Mode. 116

i.      Previous steps 116

ii.     Execution. 116

iii.    Users 116

iv.   Import mechanism.. 117

14.3.  Importer providers 118

i.      Microsoft Visual SourceSafe. 118

ii.     CVS  119

iii.    Subversion. 120

15.  References. 121


Figures

Figure 1: Plastic SCM components and structure. 2

Figure 2: Types of objects a repository can hold. 3

Figure 3: Sample items and private items 4

Figure 4: Relation between revisions and items 4

Figure 5: Sample item history. 4

Figure 6: Representation of the item history. 5

Figure 7: Item revisions contained in a branch. 5

Figure 8: Branch representation. 5

Figure 9: Branch inheritance representation. 6

Figure 10: How the workspace maps branch’s revisions 7

Figure 11: version tree in the repository structure. 8

Figure 12: hello.cpp item calculated by Plastic SCM. 8

Figure 13: Sample version tree. 9

Figure 14: Sample Branch Explorer 10

Figure 15. Smart branches define dynamic branch hierarchies 11

Figure 16: How revisions map to a workspace. 12

Figure 17: Each developer can have many workspaces 12

Figure 18: Labels applied to revisions 13

Figure 19: base version control operations 14

Figure 20: Repository creation dialog. 15

Figure 21: Creating a new workspace. 15

Figure 22: Items added from visual studio. 17

Figure 23: Add to source control from Visual Studio. 18

Figure 24: Elements protected under Visual Studio. 18

Figure 25: Eclipse share project option. 19

Figure 26: Add to source control from Eclipse. 19

Figure 27: Eclipse check in recursively functionality. 20

Figure 28: Checked out elements before update. 22

Figure 29: Check out protection. 22

Figure 30: Check out view. 22

Figure 31: Check out recovery. 23

Figure 32: Checked-out tick detail in Visual Studio. 24

Figure 33: checkout dialog in Visual Studio. 24

Figure 34: A revision is created in the checkout operation. 25

Figure 35: Pending checkouts view in the GUI tool 25

Figure 36: View pending checkins in Visual Studio. 26

Figure 37: Undo checkout from the GUI tool 27

Figure 38. Revert operation. 28

Figure 39. Revert from GUI 28

Figure 40: Creating a child branch in the GUI tool 29

Figure 41. Smart branch creation dialog. 30

Figure 42. Editing smart branch properties 31

Figure 43. How smart branches evolve through time. 32

Figure 44. Two smart branches hierarchy samples 32

Figure 45: List of items to be merged. 33

Figure 46: Revisions included on a merge operation. 34

Figure 47: Merge from the same branch. 35

Figure 48: Basic merge, merge completed. 36

Figure 49: parallel development scenario. 36

Figure 50: Developers work on the item.. 37

Figure 51: Both branches have been integrated. 37

Figure 52: Labeled revisions on the branch have been merged. 38

Figure 53: Regular Merge. 41

Figure 54: Cherry pick. 41

Figure 55. Subtractive merge, initial code. 42

Figure 56. Subtractive merge, first modification. 43

Figure 57. Subtractive merge, second modification. 43

Figure 58. Subtractive merge, version tree after merging the first change. 44

Figure 59. Subtractive merge, file after the two changes 44

Figure 60. Substractive revision merge from the GUI 45

Figure 61. Subtractive merge showing the result of the file. 45

Figure 62. How subtractive merge works 46

Figure 63. Version tree after a subtractive merge showing the subtractive link. 46

Figure 64. Subtractive merge of an interval 47

Figure 65. Subtractive merge from GUI 47

Figure 66: Creating a new label 48

Figure 67: Apply label to workspace content 49

Figure 68: Create new attribute. 50

Figure 69: How to apply an attribute. 51

Figure 70: Apply attribute dialog. 51

Figure 71: Edit the attribute value. 52

Figure 72: Delete the attribute application. 52

Figure 73: Query objects with attributes 53

Figure 74: New Repository. 54

Figure 75: Creating a workspace. 55

Figure 76: Add solution to source control 56

Figure 77: Checked in items 56

Figure 78: Share project to Plastic SCM. 57

Figure 79: Checked out items 57

Figure 80: Check in recursively. 58

Figure 81: Update operation. 58

Figure 82: Checked out items in Visual Studio. 59

Figure 83: Check out dialog in Visual Studio 2005. 59

Figure 84: Checked out revision list 60

Figure 85: Default selector appearance. 61

Figure 86: Selector definition. 62

Figure 87: Sample directory structure. 64

Figure 88. Smart branch scenario to study selector 65

Figure 89: Workspace selection dialog. 69

Figure 90: GUI main window. 69

Figure 91: Workspace selection. 70

Figure 92: Workspace information area. 71

Figure 93: Change selector dialog. 71

Figure 94. Item menu on items view. 72

Figure 95: Differences dialog. 77

Figure 96: Directory diff showing an added directory. 78

Figure 97: Source code diff with syntax highlight 78

Figure 98: The image diff showing differences side by side. 79

Figure 99: The image diff tool showing blended images 79

Figure 100: The merge dialog. 80

Figure 101: Merge tool file selection dialog. 81

Figure 102: Merge tool showing differences between two files 81

Figure 103: Merge tool 82

Figure 104: Binary merge tool 83

Figure 105: All changes on the main branch. 84

Figure 106: Branch per developer pattern. 85

Figure 107: Branch per task pattern. 86

Figure 108: Adding to the version control from Visual Studio. 87

Figure 109: Change source control from Visual Studio. 88

Figure 110: Linking projects 88

Figure 111: Operations on a checked in file. 89

Figure 112: Operations on a checked out file. 89

Figure 113: Additional SCM operations in Visual Studio. 90

Figure 114: Change source control 91

Figure 115: Checked out without connection. 91

Figure 116: Protection when regaining connection. 91

Figure 117: Select Plastic SCM as version system.. 92

Figure 118: Plastic SCM location. 93

Figure 119: Preference empty. 93

Figure 120: Refresh status 94

Figure 121: Plastic SCM operations from JDeveloper 94

Figure 122: Error when changing without checking out 95

Figure 123: Share project option. 96

Figure 124: Choosing your version control: Plastic SCM. 97

Figure 125: Plastic SCM settings 97

Figure 126: Adding items to Plastic SCM. 98

Figure 127: Checked out items 98

Figure 128: Check in recursively. 98

Figure 129: Eclipse plug in operations 99

Figure 130: Plastic SCM toolbar in Eclipse. 100

Figure 131: Plastic SCM preferences 101

Figure 132: Plastic SCM decorators in Eclipse. 102

Figure 133: Query language grammar 109

 

 

 

 

 


Foreword

 

A Brief Introduction to Software Configuration Management

A Software configuration management solution often contains the following components:

Having all of those pieces doesn’t mean that you have an effective SCM solution, however. To have an effective (as opposed to complete) SCM solution you need to understand that there are many ways that one can have implement the set of items in the list, and the right way will be different for every organization. You also need to know that these items are focused on the macro level; for your SCM process to work the micro process: what happens each day in the developer’s workspace needs to be correct. It is also necessary to remember that the reason we have SCM processes and tools is communication and teamwork.

To create an appropriate and effective SCM process you need to understand that the SCM process works together with your architecture and organizational structure (and culture). An SCM process that works well for a 3-person startup building web applications will not work for a larger application development process distributed across countries. What these two types of organizations will share is that the process is simple to use and allows for repeatability. This is where good use of patterns comes in.

Some of the key things that your SCM process should allow for, but which you won’t often see on a list are the ability for developers to create a Private Workspace that contains the version of the application that they need to work with; the ability for developers to build the application before integrating with the rest of the team, and testing to verify that everyone is meeting each other’s expectations.

The theme that underlies all effective SCM processes is that SCM is there to facilitate communication. A good SCM toll will help your team work together.

 

Stephen P. Berczuk

October 2006

 


About this guide

This guide describes Plastic SCM’s regular use. It will introduce the features and techniques used to get the most out of the tool.

Audience

This guide is targeted to the average developer, assuming familiarity with operating system concepts, programming languages and integrated development environments (IDEs) like Microsoft Visual Studio or Eclipse.

Online documentation

Besides this and the rest of the guides, Plastic SCM provides online reference throughout its different client frontends.

On the command line interface, both Windows and Linux, this reference can be obtained with the command:

cm help

For extended information on a specific command, type:

cm help command 

The graphical interface provides online reference through the Help menu.

Documentation errors

If you find any problem in this guide or any other part of the online reference, please notify it using the following email address:

 

support@codicesoftware.com

 

 


1.          Introduction

1.1.              What is Plastic SCM?

Plastic SCM is a complete Software Configuration Management (SCM) platform, able to manage the evolution in time of source code and any development asset. It improves visibility and parallel development, ensuring optimum collaboration among teams and introducing new visualization formulas on a user-friendly interface.

1.2.              Problems without version control

Development groups not using SCM are most likely familiar with the following topics: