Merge lp:~jontai/openvista-gtm-integration/bug446650 into lp:openvista-gtm-integration

Proposed by Jon Tai
Status: Merged
Merged at revision: not available
Proposed branch: lp:~jontai/openvista-gtm-integration/bug446650
Merge into: lp:openvista-gtm-integration
Diff against target: 75 lines (+16/-10)
2 files modified
mumps/MSCXUS3A.m (+14/-9)
mumps/ZCD.m (+2/-1)
To merge this branch: bzr merge lp:~jontai/openvista-gtm-integration/bug446650
Reviewer Review Type Date Requested Status
JSHER Approve
jeff.apple Approve
Review via email: mp+15451@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Jon Tai (jontai) wrote :

I've tested this lightly on GT.M. Jeff, could you do a quick code review? If you have no objections, I'll merge it.

Revision history for this message
jeff.apple (jeff-apple) wrote :

I'll admit I don't fully understand the details of the implementation. I don't see any obvious problems, however. If it unit tests OK, then it's probably just fine. How many test cases could there be?

review: Approve
Revision history for this message
Jon Tai (jontai) wrote :

> I'll admit I don't fully understand the details of the implementation. I don't
> see any obvious problems, however. If it unit tests OK, then it's probably
> just fine. How many test cases could there be?

I just flipped back and forth between two instances.

The only thing that concerns me about the patch is line 17 where he's doing some path manipulation manually. I want to keep all the path manipulation in ZCD so that we only have 1 routine to change when we go to fix #336166.

I guess I should ask him about it before I merge. Now that I look closer, it seems like he can call NEWZGZRO^CD(Y(0)) instead.

Revision history for this message
JSHER (joel-sher) wrote :

I agree Jon. Lets make the change to call ZCD for the path.

105. By Jon Tai

call ZCD to get path to .gld file instead of doing the path manipulation ourselves

106. By Jon Tai

remove debugging statements

Revision history for this message
Jon Tai (jontai) wrote :

OK I've made the changes and re-tested. Can I get one final ACK before I merge?

Revision history for this message
JSHER (joel-sher) wrote :

For next time we might want to combine this into one line in ZCD.

  . Q:%ROUTINE="GTM$DMOD"
  . Q:%ROUTINE="ZCD"
+ . I "^MSCXUS3A^XQ1^XUP^%MSCXUCI^%ZMSCXUCI^"[("^"_%ROUTINE_"^") Q ;switch UCI option

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mumps/MSCXUS3A.m'
2--- mumps/MSCXUS3A.m 2009-06-05 20:09:12 +0000
3+++ mumps/MSCXUS3A.m 2009-12-01 19:06:10 +0000
4@@ -1,4 +1,4 @@
5-MSCXUS3A ;SF-ISC/STAFF MSC/JDS - CHANGE UCI'S ;30APR2009
6+MSCXUS3A ;SF-ISC/STAFF MSC/JDS,JKT - CHANGE UCI'S ;1DEC2009
7 ;;8.0;KERNEL;**13,282,MSC**;Jul 10, 1995
8 Q
9 ;PICK A UCI TO SWITCH TO
10@@ -13,14 +13,19 @@
11 D ^DIR K DIR I $D(DUOUT)!$D(DTOUT)!(U[X) Q
12 SAME I X="" Q ;Didn't select anythIng.
13 ;D PM
14- S (X,%UCI)=Y(0) X ^%ZOSF("UCICHECK") I 0[Y G BAD
15+ S (MSCX,X,%UCI)=Y(0) X ^%ZOSF("UCICHECK") I 0[Y G BAD
16+ I ^%ZOSF("OS")["GT.M" D
17+ . N %ZG,%ZRO
18+ . D NEWZGZRO^ZCD(Y(0))
19+ . S (X,%UCI)=%ZG
20 K XQY0 S Y=$O(^[%UCI]VA(200,"B",USERNAME,0))
21 I Y S DIR=$P($G(^[%UCI]VA(200,Y,201)),U)
22- I DIR,$P($G(^[%UCI]DIC(19,DIR,0)),U,4)="M" S DUZ=Y,XQY=DIR,(DEF,PGM)="%MSCXUCI" G NXT
23+ I DIR,$P($G(^[%UCI]DIC(19,DIR,0)),U,4)="M" S DUZ=Y,XQY=DIR,(DEF,PGM)="M^XQ" G NXT
24 BAD W !,"UCI not found!" D SHOW G UCI
25 ;
26 NXT ;Here we go.
27 D C^XUSCLEAN K ^XUTL("XQ",$J),^XUTL($J),^TMP($J),^UTILITY($J)
28+ I $G(^%ZOSF("OS"))["GT.M" S A=$$SWITCH^ZCD(MSCX) K ^XUTL("XQ",$J),^UTILITY($J) S ^XUTL("XQ",$J,"T")=0,^("XQM")=XQY,XQTT=0 G @(PGM) Q
29 K DA G GO^%MSCXUCI
30 ;
31 ;
32@@ -41,19 +46,19 @@
33 ;
34 NSP(USERNAME) ;LIST OTHER NAMESPACES WHERE THIS USER IS
35 N X,L,I,Y
36- X ^%ZOSF("UCI") S Y=$P(Y,",") I ^%ZOSF("OS")["GT.M" G GTMNSP
37- f I=1:1:$zu(90,0) s L($zu(90,2,0,I))="" ;***CACHE-SPECIFIC FROM %NSP
38+ X ^%ZOSF("UCI") S Y=$P(Y,",") I ^%ZOSF("OS")["GT.M" Q $$GTMNSP
39+ X "F I=1:1:$zu(90,0) s L($zu(90,2,0,I))=""""" ;***CACHE-SPECIFIC FROM %NSP
40 S (I,L,X)="" F S I=$O(L(I)) Q:I="" I I'=Y D ;NOT THE CURRENT ONE
41 .N DUZ S DUZ=$O(^[I]VA(200,"B",USERNAME,0)) Q:'DUZ
42 .I $P($G(^[I]VA(200,DUZ,0)),U,3)=""!'$G(^(201)) Q ;THEY MUST HAVE ACCESS CODE AND PRIMARY MENU OPTION OVER THERE
43 .S L=L+1,X=X_L_":"_I_";"
44 Q X
45-GTMNSP ;
46- N CURRENT S CURRENT=Y
47- D LIST^ZCD()
48+GTMNSP() ;
49+ N CURRENT S CURRENT=Y N Y
50+ D LIST^ZCD
51 S (I,L,X)="" F S I=$O(Y(I)) Q:'I S A=Y(I) I A'=CURRENT D ;NOT THE CURRENT ONE
52 .S A=$P($ZG,"/"_$$CURRENT^ZCD_"/")_"/"_A_"/"_$P($ZG,"/"_$$CURRENT^ZCD_"/",2)
53 .N DUZ S DUZ=$O(^[A]VA(200,"B",USERNAME,0)) Q:'DUZ
54 .I $P($G(^[A]VA(200,DUZ,0)),U,3)=""!'$G(^(201)) Q ;THEY MUST HAVE ACCESS CODE AND PRIMARY MENU OPTION OVER THERE
55- .S L=L+1,X=X_L_":"_A_";"
56+ .S L=L+1,X=X_L_":"_Y(I)_";"
57 Q X
58
59=== modified file 'mumps/ZCD.m'
60--- mumps/ZCD.m 2009-06-25 23:15:27 +0000
61+++ mumps/ZCD.m 2009-12-01 19:06:10 +0000
62@@ -1,4 +1,4 @@
63-ZCD ; MSC/JKT,JDS ; "Namespace" utilities for GT.M/Unix ; 25JUN2009
64+ZCD ; MSC/JKT,JDS ; "Namespace" utilities for GT.M/Unix ; 17JUL2009
65 ;;8.0;KERNEL;**MSC**;April 21 2009
66 ; This routine assumes that your global directory file exists one
67 ; directory below the root of the instance, e.g.,
68@@ -71,6 +71,7 @@
69 NEXT F S %ROUTINE=$VIEW("rtnnext",%ROUTINE) Q:%ROUTINE="" D
70 . Q:%ROUTINE="GTM$DMOD"
71 . Q:%ROUTINE="ZCD"
72+ . I "^MSCXUS3A^XQ1^XUP^%MSCXUCI^%ZMSCXUCI^"[("^"_%ROUTINE_"^") Q ;switch UCI option
73 . ;
74 . ; The only % routines that we ship start with %Z other % routines are allocated to the
75 . ; vendor (GTM) and do not need to be recompiled (and may only have object code)

Subscribers

People subscribed via source and target branches