post-review: support perforce pending changelists
Review Request #804 — Created April 3, 2009 and discarded
This adds support for pending changelists, including the default changelist, to post-review.
This patch is being used internally in my $DAYJOB group; works great from all indications
-
-
-
-
-
-
-
Not wild about this. It's one thing to call a new method, and another to change expectations for return values. I don't feel diff is the right place to really transform changenum, so maybe another function is in order. Perhaps a function that returns whether or not a changenum is valid for upload to a server. Then new_review_request could call this before determining whether to upload it, like: if changenum and tool.is_uploadable_changenum(changenum): Not sure about that name, but something along those lines.
MW
- Change Summary:
-
Rebase to r1929 and improve based on feedback. This adds a new function submitted_changenum to get the changenum to feed RB from the changenum being posted, instead of overloading diff().
- Diff:
-
Revision 2 (+43 -11)
EH
-
I'm not so hot about this change, though I'm having trouble describing exactly why. Some of the terminology and the statements in issue #1020 are what confuse me. post-review handles pending changelists just fine. It just doesn't handle the *default* changelist. When I first started using reviewboard I thought it was a little odd that I had to run "p4 change" in order to post a review, but I got used to it and it ends up being convenient to keep the changelist description in sync with the reviewboard description. The only thing I can see about this change is that it clobbers the change number for pending changelists (for non-default changes). I think that would cause problems when you try to repost a review without specifying -r.
MW
- Change Summary:
-
Don't strip change number unless p4d version is "old". Also fix breakage with recent no-change-number support. NOTE: I have no way of knowing what is the correct threshold for p4d version to strip vs. not strip, so I'm arbitrarily picking "any p4d prior to 2003.x" (which includes our p4d) as the cutoff. If anyone knows the exact version where "describe -s" started listing files for pending changelists, the test should be changed to reflect that...
- Diff:
-
Revision 3 (+47 -11)
MW
- Change Summary:
-
According to the p4d release notes, the behavior of 'p4 describe' changed in 2002.2 (perforce issue #35391); update the strip-change-number test to reflect this.
- Diff:
-
Revision 4 (+47 -11)