Book Image

Learning Perforce SCM

By : Neal Ralph Firth, Robert Cowham
Book Image

Learning Perforce SCM

By: Neal Ralph Firth, Robert Cowham

Overview of this book

<p>Learning Perforce SCM is a pragmatic how-to guide, explaining the key concepts and usage of Perforce. Based on the authors' experiences training thousands of users around the globe, it explains those key concepts in a clear, incremental manner, combining sound theory with the pragmatic application of principles.<br /><br />Learning Perforce SCM provides practical knowledge which will transform you into confident and competent Perforce users in your day-to-day operations.<br /><br />You'll start by learning how to use Perforce to track your day-to-day coding activities. Once a solid foundation is established you'll learn how to apply the data mining features to evaluate current and past activities. Then you'll learn how to configure Perforce so that it adapts to support your specific development needs. All the while you'll be learning how to deal with conflicts and use the tool to communicate with other team members. Finally, you'll learn about using branches and streams to provide seamless support for concurrent development. Along the way, pragmatic hints and tips will help you avoid issues and identify areas for further personal exploration.</p> <p><em>"It's wonderful to see a new book about Perforce, especially one written by Robert Cowham and Neal Firth. No one can teach Perforce better than these seasoned subject matter experts"</em><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;&nbsp; -&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <em>Laura Wingerd, author of Practical Perforce.</em></p>
Table of Contents (19 chapters)
Learning Perforce SCM
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

This book is about using Perforce. There are many tools within the Perforce ecosystem ranging from clients, to plug-ins for IDEs (Integrated Development Environments), such as Eclipse or Microsoft's Visual Studio.

The focus of this book is the P4V client (Perforce Visual Client). P4V has many graphical and presentation features that make it an ideal client for new users, and can be used on a variety of different operating systems including Windows, Unix/Linux, and Macs.

What this book covers

Chapter 1, Getting Started with Perforce, is an introduction to the technology, terminology, and concepts at the core of Perforce operation. A basic knowledge of these core factors will make it easier to relate your actions to the results you're trying to achieve.

Chapter 2, The P4V GUI, introduces the P4V interface. The chapter focuses on the mechanisms for viewing status, performing actions, and viewing the results of those actions.

Chapter 3, Basic Functions, covers the techniques for adding, modifying, and deleting files within a workspace. It discusses how to do this as an individual and as a member of a team.

Chapter 4, Changelists, describes changelists which are the core record of change within Perforce. The chapter covers how to use changelists for organizing work, communicating with other users, and avoiding problems.

Chapter 5, File Information, is the key to understanding the history of a repository, how a code base has evolved, and what is happening to it now. This chapter covers how to make the most efficient use of the Perforce reporting commands to examine the information associated with a file.

Chapter 6, Managing Workspaces, describes the Perforce model where client programs work with copies of repository files in local storage areas called workspaces. This chapter covers how to establish and maintain the relationship between server copies of files and workspace copies of those same files.

Chapter 7, Dealing with Conflicts, covers how conflict in Perforce refers to the need for a human to resolve issues that may arise from independent modifications of the same repository file. Conflict scenarios are a natural consequence of the flow of development and this chapter addresses the origins of conflicts, and ways of predicting future conflicts, identifying current conflicts, resolving conflicts, and avoiding them.

Chapter 8, Classic Branching and Merging, introduces branching as the key version control technology for managing parallel development. This chapter covers the classic Perforce branching interface that provides you with complete control over the entire range of branching features supporting almost any branching pattern that you can envision.

Chapter 9, Perforce Streams, describes Perforce streams which use the mainline model to support parallel development. This chapter looks at the concept of branch stability and how streams use the merge-down, copy-up paradigm to support stability.

Chapter 10, The P4V User Experience, covers various ways that you can adapt P4V to make your work easier and more productive.

Appendix A, A Demo Server, provides a straightforward, step-by-step setup for running examples that align with the contents of this book. Only a limited level of experience is required to follow these steps.

Appendix B, Command Line, documents the underlying Perforce interfaces and the common set of commands used. This appendix relates P4V features to the underlying commands that implement them as an aid to understanding the automation associated with builds and other activities.

What you need for this book

This book does not require the P4V software. Many of the concepts and best practices have standalone descriptions.

However, it is best to have an operational copy of P4V available for follow-along exploration. You can download P4V and server software for free from the Perforce website. A license is not required for the examples in the book. Appendix A, A Demo Server provides straightforward, step-by-step instructions for establishing your own server, a test repository, and the client software.

Who this book is for

This book is intended for Perforce beginners although it includes concepts and information that advanced users will find educational. People in our training courses with years of basic user experience are often pleasantly surprised at the number of things they learn or perhaps realize that they hadn't properly understood previously.

Version control tools such as Perforce are traditionally thought of as the domain of software developers. However, anyone who deals with electronic files or "digital assets" can benefit from version control. Digital assets include source code, XML configuration files, documents, graphic files, web pages, IC test patterns, router configurations or almost anything. This means that Perforce and the concepts in this book apply to a wide range of users such as quality assurance engineers, hardware developers, analysts, documentation writers, artists, and designers.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "We can include other contexts through the use of the include directive."

Any command-line input or output is written as follows:

Perforce client error:
        Connect to server failed; check $P4PORT.
        TCP connect to 1248 failed.
        connect: 127.0.0.1:1248: WSAECONNREFUSED

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "clicking on the Next button moves you to the next screen".

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.