Fossil SCM
Fix table linkage in query, and duplicated conditions :(
Commit
f7cca3f082ea5a47499da3a26a0bc113eee2159a
Parent
9c5705502507e99…
1 file changed
+3
-6
| --- tools/cvs2fossil/lib/c2f_prev.tcl | ||
| +++ tools/cvs2fossil/lib/c2f_prev.tcl | ||
| @@ -1077,19 +1077,19 @@ | ||
| 1077 | 1077 | return [state run " |
| 1078 | 1078 | SELECT C.cid |
| 1079 | 1079 | FROM revision R, csitem CI, changeset C |
| 1080 | 1080 | WHERE R.rid IN $theset -- Restrict to revisions of interest |
| 1081 | 1081 | AND R.child IS NOT NULL -- Has primary child |
| 1082 | - AND CI.iid = R.rid | |
| 1082 | + AND CI.iid = R.child | |
| 1083 | 1083 | AND C.cid = CI.cid |
| 1084 | 1084 | AND C.type = 0 |
| 1085 | 1085 | UNION |
| 1086 | 1086 | SELECT C.cid |
| 1087 | 1087 | FROM revision R, revisionbranchchildren B, csitem CI, changeset C |
| 1088 | 1088 | WHERE R.rid IN $theset -- Restrict to revisions of interest |
| 1089 | 1089 | AND R.rid = B.rid -- Select subset of branch children |
| 1090 | - AND CI.iid = R.rid | |
| 1090 | + AND CI.iid = B.brid | |
| 1091 | 1091 | AND C.cid = CI.cid |
| 1092 | 1092 | AND C.type = 0 |
| 1093 | 1093 | UNION |
| 1094 | 1094 | SELECT C.cid |
| 1095 | 1095 | FROM revision R, revision RA, csitem CI, changeset C |
| @@ -1096,14 +1096,11 @@ | ||
| 1096 | 1096 | WHERE R.rid IN $theset -- Restrict to revisions of interest |
| 1097 | 1097 | AND R.isdefault -- Restrict to NTDB |
| 1098 | 1098 | AND R.dbchild IS NOT NULL -- and last NTDB belonging to trunk |
| 1099 | 1099 | AND RA.rid = R.dbchild -- Go directly to trunk root |
| 1100 | 1100 | AND RA.child IS NOT NULL -- Has primary child. |
| 1101 | - AND CI.iid = R.rid | |
| 1102 | - AND C.cid = CI.cid | |
| 1103 | - AND C.type = 0 | |
| 1104 | - AND CI.iid = R.rid | |
| 1101 | + AND CI.iid = RA.child | |
| 1105 | 1102 | AND C.cid = CI.cid |
| 1106 | 1103 | AND C.type = 0 |
| 1107 | 1104 | UNION |
| 1108 | 1105 | SELECT C.cid |
| 1109 | 1106 | FROM revision R, tag T, csitem CI, changeset C |
| 1110 | 1107 |
| --- tools/cvs2fossil/lib/c2f_prev.tcl | |
| +++ tools/cvs2fossil/lib/c2f_prev.tcl | |
| @@ -1077,19 +1077,19 @@ | |
| 1077 | return [state run " |
| 1078 | SELECT C.cid |
| 1079 | FROM revision R, csitem CI, changeset C |
| 1080 | WHERE R.rid IN $theset -- Restrict to revisions of interest |
| 1081 | AND R.child IS NOT NULL -- Has primary child |
| 1082 | AND CI.iid = R.rid |
| 1083 | AND C.cid = CI.cid |
| 1084 | AND C.type = 0 |
| 1085 | UNION |
| 1086 | SELECT C.cid |
| 1087 | FROM revision R, revisionbranchchildren B, csitem CI, changeset C |
| 1088 | WHERE R.rid IN $theset -- Restrict to revisions of interest |
| 1089 | AND R.rid = B.rid -- Select subset of branch children |
| 1090 | AND CI.iid = R.rid |
| 1091 | AND C.cid = CI.cid |
| 1092 | AND C.type = 0 |
| 1093 | UNION |
| 1094 | SELECT C.cid |
| 1095 | FROM revision R, revision RA, csitem CI, changeset C |
| @@ -1096,14 +1096,11 @@ | |
| 1096 | WHERE R.rid IN $theset -- Restrict to revisions of interest |
| 1097 | AND R.isdefault -- Restrict to NTDB |
| 1098 | AND R.dbchild IS NOT NULL -- and last NTDB belonging to trunk |
| 1099 | AND RA.rid = R.dbchild -- Go directly to trunk root |
| 1100 | AND RA.child IS NOT NULL -- Has primary child. |
| 1101 | AND CI.iid = R.rid |
| 1102 | AND C.cid = CI.cid |
| 1103 | AND C.type = 0 |
| 1104 | AND CI.iid = R.rid |
| 1105 | AND C.cid = CI.cid |
| 1106 | AND C.type = 0 |
| 1107 | UNION |
| 1108 | SELECT C.cid |
| 1109 | FROM revision R, tag T, csitem CI, changeset C |
| 1110 |
| --- tools/cvs2fossil/lib/c2f_prev.tcl | |
| +++ tools/cvs2fossil/lib/c2f_prev.tcl | |
| @@ -1077,19 +1077,19 @@ | |
| 1077 | return [state run " |
| 1078 | SELECT C.cid |
| 1079 | FROM revision R, csitem CI, changeset C |
| 1080 | WHERE R.rid IN $theset -- Restrict to revisions of interest |
| 1081 | AND R.child IS NOT NULL -- Has primary child |
| 1082 | AND CI.iid = R.child |
| 1083 | AND C.cid = CI.cid |
| 1084 | AND C.type = 0 |
| 1085 | UNION |
| 1086 | SELECT C.cid |
| 1087 | FROM revision R, revisionbranchchildren B, csitem CI, changeset C |
| 1088 | WHERE R.rid IN $theset -- Restrict to revisions of interest |
| 1089 | AND R.rid = B.rid -- Select subset of branch children |
| 1090 | AND CI.iid = B.brid |
| 1091 | AND C.cid = CI.cid |
| 1092 | AND C.type = 0 |
| 1093 | UNION |
| 1094 | SELECT C.cid |
| 1095 | FROM revision R, revision RA, csitem CI, changeset C |
| @@ -1096,14 +1096,11 @@ | |
| 1096 | WHERE R.rid IN $theset -- Restrict to revisions of interest |
| 1097 | AND R.isdefault -- Restrict to NTDB |
| 1098 | AND R.dbchild IS NOT NULL -- and last NTDB belonging to trunk |
| 1099 | AND RA.rid = R.dbchild -- Go directly to trunk root |
| 1100 | AND RA.child IS NOT NULL -- Has primary child. |
| 1101 | AND CI.iid = RA.child |
| 1102 | AND C.cid = CI.cid |
| 1103 | AND C.type = 0 |
| 1104 | UNION |
| 1105 | SELECT C.cid |
| 1106 | FROM revision R, tag T, csitem CI, changeset C |
| 1107 |