Use revision parsing for perforce diffs, refactor pending change posting.

Review Request #5171 — Created Dec. 26, 2013 and submitted

Information

RBTools
master

Reviewers

Use revision parsing for perforce diffs, refactor pending change posting.

This change uses parse_revision_spec inside the perforce diff routine, and does
some refactoring to clean up the method for posting pending changes. There was
some code in here that theoretically would handle non-pending changes, but
since 'p4 opened' doesn't work for submitted changes, that was effectively dead
code. I'll be handling that later once I implement two-revision diffs.

The one unexpected change in the diff hashes is when we're dealing with moved
files when the server doesn't have the capability. The reason for the hash
change is that the new list of repo files in the test case is iterating in a
different order than the dict.

  • Posted changes for pending changesets that involved added, moved, and deleted
    files.
  • Ran unit tests
Description From Last Updated

While it should always be an int, we should probably wrap this in a try/except and log something useful, in …

chipx86chipx86
david
david
chipx86
  1. 
      
  2. rbtools/clients/perforce.py (Diff revision 2)
     
     
    Show all issues

    While it should always be an int, we should probably wrap this in a try/except and log something useful, in case.

    1. This is actually addressed in the next change that's going up. I'll backport that part of the change to this one.

  3. rbtools/clients/tests.py (Diff revision 2)
     
     
     
     
     

    Out of curiosity, why not keep the generator?

  4. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed
Status:
Completed
Change Summary:
Pushed to master (5d12350).