Implement revision parsing for Perforce.

Review Request #5151 — Created Dec. 20, 2013 and submitted

Information

RBTools
master

Reviewers

Implement revision parsing for Perforce.

This change implements PerforceClient.parse_revision_spec. This can take in
zero, one, or two arguments.

With zero arguments, this will return the 'default' changelist. With one, it
can be a changelist that's either pending, shelved, or submitted. In all three
of those cases, the changes that will be posted will be the changes introduced
in that changelist. With two arguments, the first argument must be a submitted
changelist, and the second can be any of pending, shelved, or submitted.

This is not yet used for diffs, since handling submitted and shelved changesets
will take additional work.

Ran unit tests.

Description From Last Updated

What happens if someone provides something other than a number?

chipx86chipx86

Should remove the blank line for consistency.

chipx86chipx86

Can consolidate this.

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

    What happens if someone provides something other than a number?

  3. rbtools/clients/perforce.py (Diff revision 2)
     
     
     
     
    Show all issues

    Should remove the blank line for consistency.

  4. rbtools/clients/perforce.py (Diff revision 2)
     
     

    If you wanted, a nice shorthand is:

    if status in ('pending', 'shelved'):
    
  5. rbtools/clients/perforce.py (Diff revision 2)
     
     
     
    Show all issues

    Can consolidate this.

  6. 
      
david
chipx86
  1. Ship It!
  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (60657fd).
Loading...