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

Dealing with installation


Perforce is a very straight forward system to install on various operating systems. It is not deeply embedded and thus it is relatively independent of different versions of operating systems.

Client and server version compatibility

Unlike many version control systems, Perforce does not require that clients and servers be at the exact same version. When a client connects with a server, they both determine the set of features they have in common and act accordingly. Some clients require a minimum server version. The 2013.2 version of P4V requires a server that is version 2008.1 or later.

The examples and images in this book are based on the 2013.2 version of P4V and the 2013.2 version of the Perforce server. If your P4V or server versions are not the same, you may see slightly different choices and options. The information you'll find in this book is still applicable.

Perforce platforms

Perforce servers and clients are available for a wide range of operating systems. The 2013.2 release of P4V is available for Windows, Linux, and Macintosh. You can download any of these from the Perforce website. However, some organizations have standardized on specific (older) releases. Check with your system administrator as appropriate.

Clients and servers can be running on different operating systems and still be able to work together. The servers take care of the differences between client and server host machines. The clients take care of issues that are specific to the host machine on which they operate such as text file line endings and directory separator characters.

As a user you may need to deal with character case sensitivity in directory paths and filenames. This typically comes up when a Windows-based client connects with a Perforce server that is not Windows-based. We discuss this in more detail in Chapter 6, Managing Workspaces, which focuses on workspaces. That chapter also addresses settings to handle different line endings between Windows and Linux/Unix operating systems.

Another issue that may come up is internationalization. The server is responsible for the character set used for the names of files or any part of their path. This allows you to store files with Unicode names, such as クライアントサーバモデル .doc which is the Japanese name for a file which would be called client-server model.doc in English. Consult with your Perforce administrator for further details. The client is responsible for dealing with the character set used within the contents of files.

Perforce interfaces

This book uses P4V as the client interface. P4V is a good choice as it has many presentation and graphical features. These features help to manage the large amount of information that typically describes files in a project.

P4 is the command-line client: p4.exe on Windows or just p4 on Linux/Unix. P4 is available for all of the operating systems supported by Perforce. The p4 client is ideal for automation and scripting. To assist with automation, there are language-specific interfaces providing optimized ways to execute p4 commands and process their results. These include interfaces for Perl, Ruby, Python, .NET, and Java. There is a logging option in P4V that shows the basic p4 commands being used to provide the P4V functionality. This can be very useful for individuals learning to how to automate actions or processes.

Appendix B, Command Line helps to relate the p4 commands to the P4V operations described in the various chapters.

Perforce integrations with IDEs such as Visual Studio and Eclipse are also common. All of the concepts and command features described within this book apply to the IDE integrations. It is not uncommon for users to use both P4V and an IDE integration. P4V provides access to the advanced information management features that don't always fit within the context of an IDE.

There are many more interfaces and integrations to Perforce. See the Perforce website (www.perforce.com) for the current list.