Chapter 3. Resolving and Merging Files

The previous chapter blithely mentions that you may have to resolve and merge files before submitting them. Resolving instructs Perforce to take care of files that been changed in parallel; merging is one way to resolve files. Resolving files is usually easy, and the result is usually exactly want you want, whether you understand how it came about or not. However, there are times when you do need to know exactly how files are resolved and merged. That is what this chapter is about.

This chapter starts out with a review of the Perforce resolve operation:what it’s for, when you do it, and what you do with it. It nails down the meanings of “yours” and “theirs,” the often-puzzling names Perforce gives to files being resolved. Next, it describes how Perforce actually merges text files. It shows how a merged file is constructed, and explains where and why conflicts are detected. (Merge results that seemed random to you before you read this chapter will seem completely predictable to you once you have read it.) This chapter also explains how to reconcile files that can’t be resolved because they’ve been added, deleted, renamed, or moved. It offers tips for developers to resolve, merge, and reconcile files. Finally, it closes with a bit of arcana, including information about configuring alternate merge tools.

Resolving: When, What, and How

You must resolve files when:

  • You have files opened for editing, and you synchronize them with newer revisions.

  • You ...

Get Practical Perforce now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.