equal
deleted
inserted
replaced
21 # |
21 # |
22 |
22 |
23 # |
23 # |
24 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
24 # Copyright 2008 Sun Microsystems, Inc. All rights reserved. |
25 # Use is subject to license terms. |
25 # Use is subject to license terms. |
26 # |
|
27 # ident "%Z%%M% %I% %E% SMI" |
|
28 # |
26 # |
29 |
27 |
30 # |
28 # |
31 # Check on RTI status for bug IDs passed. |
29 # Check on RTI status for bug IDs passed. |
32 # |
30 # |
61 rtiType = "MarketingRelease" |
59 rtiType = "MarketingRelease" |
62 gateType = "MarketingRelease" |
60 gateType = "MarketingRelease" |
63 |
61 |
64 # Check to see if we were given a gate to lookup with |
62 # Check to see if we were given a gate to lookup with |
65 if gatePath != None: |
63 if gatePath != None: |
66 # strip any trailing / |
64 |
67 gatePath.rstrip('/') |
65 # |
68 gateName = os.path.split(gatePath)[1] |
66 # The gate name should be the last component of the gate path, |
|
67 # no matter how it's accessed. |
|
68 # |
|
69 # We make a special case for "closed," and check to see if it |
|
70 # appears to be the "usr/closed" portion of a nested repository. |
|
71 # In that case, we really want the parent repository name. |
|
72 # |
|
73 gatePath = gatePath.rstrip(os.path.sep).split(os.path.sep) |
|
74 gateName = gatePath[-1] |
|
75 try: |
|
76 if gatePath[-2:] == ['usr', 'closed']: |
|
77 gateName = gatePath[-3] |
|
78 except IndexError: |
|
79 pass |
69 |
80 |
70 # Is this a patch gate? |
81 # Is this a patch gate? |
71 if patchGateRe.search(gatePath): |
82 if patchGateRe.search(gateName): |
72 rtiType = "Patch" |
83 rtiType = "Patch" |
73 gateType = "Patch" |
84 gateType = "Patch" |
74 |
85 |
75 # Is this a test gate? |
86 # Is this a test gate? |
76 if testGateRe.search(gatePath): |
87 if testGateRe.search(gateName): |
77 rtiType = "RTI" |
88 rtiType = "RTI" |
78 gateType = "RTI" |
89 gateType = "RTI" |
79 else: |
90 else: |
80 gateName = None |
91 gateName = None |
81 |
92 |