Fossil SCM

Fix table linkage in query, and duplicated conditions :(

aku 2007-12-02 06:17 UTC trunk
Commit f7cca3f082ea5a47499da3a26a0bc113eee2159a
--- tools/cvs2fossil/lib/c2f_prev.tcl
+++ tools/cvs2fossil/lib/c2f_prev.tcl
@@ -1077,19 +1077,19 @@
10771077
return [state run "
10781078
SELECT C.cid
10791079
FROM revision R, csitem CI, changeset C
10801080
WHERE R.rid IN $theset -- Restrict to revisions of interest
10811081
AND R.child IS NOT NULL -- Has primary child
1082
- AND CI.iid = R.rid
1082
+ AND CI.iid = R.child
10831083
AND C.cid = CI.cid
10841084
AND C.type = 0
10851085
UNION
10861086
SELECT C.cid
10871087
FROM revision R, revisionbranchchildren B, csitem CI, changeset C
10881088
WHERE R.rid IN $theset -- Restrict to revisions of interest
10891089
AND R.rid = B.rid -- Select subset of branch children
1090
- AND CI.iid = R.rid
1090
+ AND CI.iid = B.brid
10911091
AND C.cid = CI.cid
10921092
AND C.type = 0
10931093
UNION
10941094
SELECT C.cid
10951095
FROM revision R, revision RA, csitem CI, changeset C
@@ -1096,14 +1096,11 @@
10961096
WHERE R.rid IN $theset -- Restrict to revisions of interest
10971097
AND R.isdefault -- Restrict to NTDB
10981098
AND R.dbchild IS NOT NULL -- and last NTDB belonging to trunk
10991099
AND RA.rid = R.dbchild -- Go directly to trunk root
11001100
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
11051102
AND C.cid = CI.cid
11061103
AND C.type = 0
11071104
UNION
11081105
SELECT C.cid
11091106
FROM revision R, tag T, csitem CI, changeset C
11101107
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button