diff options
author | Christian Hammond <chipx86@chipx86.com> | 2010-02-21 15:47:01 -0800 |
---|---|---|
committer | Christian Hammond <chipx86@chipx86.com> | 2010-02-21 16:03:59 -0800 |
commit | f989b7cdbbc848cad8a14d87cf02a81b7a182f8a (patch) | |
tree | 6637ed9cceb26463a471d82be7c40d6f1fff9053 /rbtools | |
parent | 24b1e9d1193ed200aeae303b33616a9d02bd6213 (diff) |
Fix the default changeset support with more recent versions of P4.
The new default changeset support was failing to set a default changeset
description on newer versions of P4, which we would later need to parse
in order to get the file listing. We now go through the same code path we went
through with older versions of P4 in order to generate a default description
in order to get those generated files.
Patch by Laurent Nicolas.
Reviewed at http://reviews.reviewboard.org/r/1418/
Diffstat (limited to 'rbtools')
-rwxr-xr-x | rbtools/postreview.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/rbtools/postreview.py b/rbtools/postreview.py index 91adb50..330054c 100755 --- a/rbtools/postreview.py +++ b/rbtools/postreview.py @@ -1636,9 +1636,11 @@ class PerforceClient(SCMClient): v = self.p4d_version - if cl_is_pending and (v[0] < 2002 or (v[0] == "2002" and v[1] < 2)): - # Pre-2002.2 doesn't give file list in pending changelists, so we - # have to get it a different way + if cl_is_pending and (v[0] < 2002 or (v[0] == "2002" and v[1] < 2) + or changenum == "default"): + # Pre-2002.2 doesn't give file list in pending changelists, + # or we don't have a description for a default changeset, + # so we have to get it a different way. info = execute(["p4", "opened", "-c", str(changenum)], split_lines=True) |