summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Hammond <chipx86@chipx86.com>2010-02-21 15:47:01 -0800
committerChristian Hammond <chipx86@chipx86.com>2010-02-21 16:03:59 -0800
commitf989b7cdbbc848cad8a14d87cf02a81b7a182f8a (patch)
tree6637ed9cceb26463a471d82be7c40d6f1fff9053
parent24b1e9d1193ed200aeae303b33616a9d02bd6213 (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/
-rw-r--r--AUTHORS1
-rwxr-xr-xrbtools/postreview.py8
2 files changed, 6 insertions, 3 deletions
diff --git a/AUTHORS b/AUTHORS
index 928fb95..39bf0b2 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -15,6 +15,7 @@ Contributors:
* Flavio Castelli
* Jason Felice
* Jeremy Bettis
+ * Laurent Nicolas
* Lepton Wu
* Luke Lu
* Luke Robison
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)