O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Learning Perforce SCM

Book Description

Taking control of your coding activities is simple using this guide to Perforce SCM. Written by an expert in the field, it takes you through the key concepts and practical day-to-day applications in an accessible, friendly style.

  • Master the use of P4V - the Perforce Visual Client
  • Get into the Perforce mindset for seamless use in your daily work
  • Grasp key concepts and learn how to apply them for proper software configuration management
  • Clear step-by-step instructions with pointers and ideas for self-exploration

In Detail

Perforce has long been one of the leading names in enterprise version management. Flexible and scalable, Perforce allows your team to work together and access the file versions you need, when you need them.

"Learning Perforce SCM" is a pragmatic how-to guide, explaining the key concepts and usage of Perforce. Based on the authors' experiences gained from training thousands of users around the globe, we will explore the knowledge and build the confidence to use Perforce in day-to-day operations.

"Learning Perforce SCM" explains key concepts and provides practical knowledge that will transform us into a confident and competent Perforce user.

We’ll start by learning how to use Perforce to track our day-to-day coding activities. Once a solid foundation is established we’ll learn how to apply the data mining features to evaluate current and past activities. Then we’ll learn how to configure Perforce so that it adapts to support our specific development needs. All the while we’ll be learning how to deal with conflicts and use the tool to communicate with other team members. Finally, we’ll learn about using branches and streams to provide seamless support for concurrent development. All along the way, pragmatic hints and tips will help us avoid issues and identify areas for personal exploration.

Table of Contents

  1. Learning Perforce SCM
    1. Table of Contents
    2. Learning Perforce SCM
    3. Credits
    4. About the Authors
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers, and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
        3. Instant Updates on New Packt Books
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Getting Started with Perforce
      1. Version control
      2. Software configuration management
      3. Centralized and distributed version control
      4. Understanding Perforce clients and servers
        1. Servers
        2. Client programs
      5. Introducing the core Perforce concepts
        1. Depots
        2. Workspaces
        3. Changelists
      6. Dealing with installation
        1. Client and server version compatibility
        2. Perforce platforms
        3. Perforce interfaces
      7. The Perforce mindset
      8. Following along
      9. Summary
    9. 2. The P4V GUI
      1. Understanding the P4V display
      2. Accessing P4V actions
        1. Command menus
        2. Shortcut key combinations
        3. The Toolbar
        4. The Address bar
      3. Exploring the tree pane
        1. The depot tree tab
        2. The workspace tree tab
      4. Exploring the view pane
        1. Closing, undocking, or docking information views
        2. Viewing tabs with detail panes
        3. Filtering view tabs
        4. Right (context) click menus
      5. Reviewing activities
        1. The Log tab
        2. The Dashboard tab
      6. Summary
    10. 3. Basic Functions
      1. Getting something to work with
        1. Connecting (log in)
        2. Passwords
        3. You're done (log off)
        4. Specifying a workspace
          1. Creating an initial workspace
        5. Updating a workspace – populating it with files
        6. Populating a workspace from the depot tab
        7. Workstation files
      2. Basic SCM actions
        1. Selecting a changelist
        2. Modifying existing files (check out)
        3. Adding files (mark for add)
        4. Deleting files (mark for delete)
        5. Reverting an action
        6. Which files are you working on?
        7. Identifying local changes (diff against have revision)
        8. Submit – updating the server
      3. Fast access file information
        1. Icons
        2. Versions and type
        3. File status tool tips
      4. Getting help
        1. The help menu
        2. Help buttons
        3. The Perforce website
      5. Summary
    11. 4. Changelists
      1. Creating useful changelists
        1. Associating files with a changelist
        2. Effective descriptions
        3. Updating descriptions for submitted changelists
      2. Using changelists for an organization
        1. The default changelist
        2. Other pending changelists
        3. The select pending changelist dialog
        4. Moving files between pending changelists
        5. Dynamic organization at submit
        6. Limits to multiple pending changelists
      3. File management at submit
        1. Handling unmodified files
        2. Making multiple changes to the same set of files
        3. Failed submits
      4. Changelist numbering
        1. How submitted changelists are numbered
        2. Implications for changelist numbering
        3. Deleting pending changelists
      5. Shelving
        1. Shelving files in a changelist
        2. Unshelving files
        3. Deleting shelved files
        4. Finding shelved files
        5. Modifying shelved files
        6. Managing shelved files
      6. Summary
    12. 5. File Information
      1. File properties
        1. Customizing the tabular display
        2. Explaining the # characters
        3. Showing deleted files
        4. Type and filetype
      2. Understanding file versions and history
        1. Getting different revisions of files
        2. How file revisions relate to changelists
        3. Potentially surprising get revision results!
        4. Changelists and folders
        5. Get revision options
        6. Referencing a specific date and/or time
        7. Referencing a label
        8. Files in another workspace
      3. Depot paths
      4. Finding files – an introduction to wildcards
      5. Showing history
        1. File history
        2. Folder history
      6. Showing differences between file revisions
        1. The P4V diff tool – P4Merge
          1. Navigating between diffs
          2. More P4Merge options
      7. Showing folder/directory differences
        1. The folder diff tool – recursive folder differences
          1. Filtering the folder diff view
          2. Showing individual file diffs
      8. Other options for comparing files or folders
        1. Showing local changes for edited files
        2. Ctrl + D as a useful shortcut for diffing
        3. Diff against for files
        4. Using Diff against for different files
        5. Diff against for folders
      9. P4V time-lapse view
      10. Summary
    13. 6. Managing Workspaces
      1. What does workspace mean?
        1. Actions within a workspace context
        2. A workspace – the specification
        3. Classic workspaces versus stream workspaces
      2. Managing workspaces
        1. Switching workspaces
        2. Creating workspaces by copying
        3. Editing workspaces
        4. Deleting workspaces
      3. Specifying a workspace
        1. Workspace names
        2. Workspace location
        3. Relating repository files to workspace files
          1. A workspace specification example
        4. What the ... (ellipsis) notation means
        5. How to exclude files
        6. Can I reference more than one depot in a workspace?
        7. The potential of workspace mappings
        8. Population characteristics
        9. Line endings
        10. Submit options
        11. Perforce filetypes
      4. Common best practice questions
        1. Changelists and open files
        2. More than one workspace
        3. Sharing workspaces
      5. Summary
    14. 7. Dealing with Conflicts
      1. The origin of a conflict
        1. Working with conflicts
        2. Conflicts and submit
        3. Base, Source, and Target: a 3-way merge
        4. An introduction to the P4Merge tool
        5. Differences from base
        6. Dealing with content conflicts
          1. Editing in the merge pane
          2. File content during merge
          3. Overwriting or discarding changes on purpose
        7. Other P4Merge options
        8. What if you miss a conflict?
        9. Delaying resolution
        10. Automatic resolution
      2. Avoiding conflicts
        1. Priority modifications – locking files
        2. Files that can't be merged
      3. Summary
    15. 8. Classic Branching and Merging
      1. Understanding branching
        1. Why you should branch
        2. Using classic branching in Perforce
      2. The basic branching pattern
        1. Viewing classic branches in Perforce
      3. Creating our first branch
        1. An introduction to Options
      4. Propagating changes between branches
        1. Resolving our merge conflicts
        2. Perforce only propagates changes once
        3. The meaning of integrate in merge/integrate
      5. Automatic resolve
      6. More on P4V Revision Graph
        1. Diffing and other actions
        2. Compressing the history
      7. Selectively propagating changes
      8. Using branch mappings
        1. The power of branch mappings
        2. Merging – the gory details
        3. Merges and file content
        4. How selective merges are done and tracked
        5. Dealing with renames and deletes
          1. Dealing with deletes
          2. Using branch mappings to ignore deletes
        6. Dealing with renames
          1. When renames cause complications
      9. Other branching patterns
        1. Characteristics of a branching pattern
        2. The mainline pattern – why it is better than alternatives
        3. Release branches
        4. The integration pattern
      10. OS copy is not a branching activity
      11. Summary
    16. 9. Perforce Streams
      1. Understanding streams
        1. The primary stream models
        2. Branch stability
          1. The merge-down, copy-up paradigm
      2. Creating a stream
        1. Stream workspaces
        2. Moving your workspace between streams
        3. Communicating the status of changes to be propagated
        4. Merging changes from the Mainline
        5. Copying our changes to the Mainline
      3. Migrating from classic branches to streams
        1. Creating a new Mainline stream
        2. Populating our Mainline stream
      4. Other standard types of stream
        1. Release streams
          1. Change propagation for Release streams
        2. Virtual streams
        3. Task streams
      5. Managing streams
        1. Applying the stream filter
        2. Mapping stream files
          1. Paths/access levels
          2. Remapping of files
          3. Ignoring files
        3. Re-parenting streams
          1. Propagating changes across the stream hierarchy
          2. Moving groups of development streams
          3. Directly editing versus drag-and-drop
      6. How streams handle renames
      7. Summary
    17. 10. The P4V User Experience
      1. Navigating large trees of folders
      2. Custom P4V tools
      3. P4V preferences
      4. Reconciling offline work
      5. Summary
    18. A. A Demo Server
      1. Examples in the book
      2. Sample repository
      3. Platform specific executables
      4. Install it
        1. The contents of the zip file
        2. Detailed installation instructions for Windows
        3. Detailed installation instructions for non-Windows operating systems
        4. Windows privileges and details
    19. B. Command Line
      1. What is P4V using?
        1. The Perforce API
      2. Command-line help is always available
        1. P4 Command Reference Guide
          1. Setting environment variables
        2. P4 help
      3. Basic notes on using commands
        1. Command options
        2. Command input and output
          1. Logging in – an interactive command
          2. Action commands
          3. Reporting commands
          4. An editor form command – submitting a changelist
      4. Command summary
        1. Tree reporting commands
        2. File information – chapter 2
        3. Basic operations – chapter 3
        4. Changelists – chapter 4
        5. Detailed file information – chapter 5
        6. Workspaces – chapter 6
        7. Dealing with conflicts – chapter 7
        8. Branching – chapter 8
        9. Streams – chapter 9
      5. Some basic best practices
        1. Scripting Perforce
      6. Summary
    20. Index