Add support for moved file handling for Perforce.

Review Request #3744 — Created Jan. 13, 2013 and submitted — Latest diff uploaded


Review Board


Add support for moved file handling for Perforce.

This adds support for representing moved files properly in Perforce.
This handles both files moved with and without changes made.

An accompanying change to post-review is needed in order to add moved
information to the diff format. Like the other fields in Perforce diffs
we respond to, this is entirely custom, as Perforce doesn't have any
useful information in p4 diff to provide.

This feature is funded by NetApp, Inc.
Unit tests pass.

Tested this with the accompanying RBTools change, using a resulting diff
from a Perforce environment that contained 4 files: 1 new file, 1 moved file
without changes, 1 new file, and 1 moved file with changes. This order was
chosen to make sure parsing worked correctly.

In the tests, the moved files appeared with the "(moved)" suffix. The unchanged
file said that no changes were made to the file. The changed file showed the
changes only.