From f989b7cdbbc848cad8a14d87cf02a81b7a182f8a Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Sun, 21 Feb 2010 15:47:01 -0800 Subject: 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/ --- AUTHORS | 1 + rbtools/postreview.py | 8 +++++--- 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) -- cgit v1.2.3