Fossil SCM

Renamed state table 'csrevision' to 'csitem' to reflect the new internals of changesets. Updated all places where it is used.

aku 2007-11-29 09:16 trunk
Commit 80b1e8936fad7ce85fc2af156031b93d7a2e2f43
--- tools/cvs2fossil/lib/c2f_integrity.tcl
+++ tools/cvs2fossil/lib/c2f_integrity.tcl
@@ -325,13 +325,13 @@
325325
SELECT F.name, R.rev
326326
FROM revision R, file F
327327
WHERE R.rid IN (SELECT rid
328328
FROM revision -- All revisions
329329
EXCEPT -- subtract
330
- SELECT CR.rid
331
- FROM csrevision CR, changeset C -- revisions used
332
- WHERE C.cid = CR.cid -- by any revision
330
+ SELECT CI.iid
331
+ FROM csitem CI, changeset C -- revisions used
332
+ WHERE C.cid = CI.cid -- by any revision
333333
AND C.type = 0) -- changeset
334334
AND R.fid = F.fid -- get file of unused revision
335335
}
336336
# Find all revisions which are used by more than one
337337
# changeset.
@@ -345,15 +345,15 @@
345345
-- select those with more than one user, and get their
346346
-- associated file (name) for display.
347347
348348
SELECT F.name, R.rev
349349
FROM revision R, file F,
350
- (SELECT CR.rid AS rid, count(CR.cid) AS count
351
- FROM csrevision CR, changeset C
350
+ (SELECT CI.iid AS rid, count(CI.cid) AS count
351
+ FROM csitem CI, changeset C
352352
WHERE C.type = 0
353
- AND C.cid = CR.cid
354
- GROUP BY CR.rid) AS U
353
+ AND C.cid = CI.cid
354
+ GROUP BY CI.iid) AS U
355355
WHERE U.count > 1
356356
AND R.rid = U.rid
357357
AND R.fid = F.fid
358358
}
359359
# All revisions have to refer to the same meta information as
@@ -360,14 +360,14 @@
360360
# their changeset.
361361
CheckRevCS \
362362
{All revisions have to agree with their changeset about the used meta information} \
363363
{disagrees with its changeset @ about the meta information} {
364364
SELECT CT.name, C.cid, F.name, R.rev
365
- FROM changeset C, cstype CT, revision R, file F, csrevision CR
365
+ FROM changeset C, cstype CT, revision R, file F, csitem CI
366366
WHERE C.type = 0 -- revision changesets only
367
- AND C.cid = CR.cid -- changeset --> its revisions
368
- AND R.rid = CR.rid -- look at them
367
+ AND C.cid = CI.cid -- changeset --> its revisions
368
+ AND R.rid = CI.iid -- look at them
369369
AND R.mid != C.src -- Only those which disagree with changeset about the meta
370370
AND R.fid = F.fid -- get file of the revision
371371
AND CT.tid = C.type -- get changeset type, for labeling
372372
}
373373
# All revisions have to agree on the LOD their changeset
@@ -383,14 +383,14 @@
383383
{All revisions in a changeset have to belong to the same LOD} \
384384
{: Its revisions disagree about the LOD they belong to} {
385385
SELECT T.name, C.cid
386386
FROM changeset C, cstype T
387387
WHERE C.cid IN (SELECT U.cid
388
- FROM (SELECT DISTINCT CR.cid AS cid, R.lod AS lod
389
- FROM csrevision CR, changeset C, revision R
390
- WHERE CR.rid = R.rid
391
- AND C.cid = CR.cid
388
+ FROM (SELECT DISTINCT CI.cid AS cid, R.lod AS lod
389
+ FROM csitem CI, changeset C, revision R
390
+ WHERE CI.iid = R.rid
391
+ AND C.cid = CI.cid
392392
AND C.type = 0) AS U
393393
GROUP BY U.cid HAVING COUNT(U.lod) > 1)
394394
AND T.tid = C.type
395395
}
396396
# All revisions have to agree on the project their changeset
@@ -406,14 +406,14 @@
406406
{All revisions in a changeset have to belong to the same project} \
407407
{: Its revisions disagree about the project they belong to} {
408408
SELECT T.name, C.cid
409409
FROM changeset C, cstype T
410410
WHERE C.cid IN (SELECT U.cid
411
- FROM (SELECT DISTINCT CR.cid AS cid, F.pid AS pid
412
- FROM csrevision CR, changeset C, revision R, file F
413
- WHERE CR.rid = R.rid
414
- AND C.cid = CR.cid
411
+ FROM (SELECT DISTINCT CI.cid AS cid, F.pid AS pid
412
+ FROM csitem CI, changeset C, revision R, file F
413
+ WHERE CI.iid = R.rid
414
+ AND C.cid = CI.cid
415415
AND C.type = 0
416416
AND F.fid = R.fid) AS U
417417
GROUP BY U.cid HAVING COUNT(U.pid) > 1)
418418
AND T.tid = C.type
419419
}
@@ -432,19 +432,19 @@
432432
{: Its revisions share files} {
433433
SELECT T.name, C.cid
434434
FROM changeset C, cstype T
435435
WHERE C.cid IN (SELECT VV.cid
436436
FROM (SELECT U.cid as cid, COUNT (U.fid) AS fcount
437
- FROM (SELECT DISTINCT CR.cid AS cid, R.fid AS fid
438
- FROM csrevision CR, changeset C, revision R
439
- WHERE CR.rid = R.rid
440
- AND C.cid = CR.cid
437
+ FROM (SELECT DISTINCT CI.cid AS cid, R.fid AS fid
438
+ FROM csitem CI, changeset C, revision R
439
+ WHERE CI.iid = R.rid
440
+ AND C.cid = CI.cid
441441
AND C.type = 0
442442
) AS U
443443
GROUP BY U.cid) AS UU,
444
- (SELECT V.cid AS cid, COUNT (V.rid) AS rcount
445
- FROM csrevision V, changeset X
444
+ (SELECT V.cid AS cid, COUNT (V.iid) AS rcount
445
+ FROM csitem V, changeset X
446446
WHERE X.cid = V.cid
447447
AND X.type = 0
448448
GROUP BY V.cid) AS VV
449449
WHERE VV.cid = UU.cid
450450
AND UU.fcount < VV.rcount)
@@ -475,13 +475,13 @@
475475
SELECT P.name, S.name
476476
FROM project P, tag T, symbol S
477477
WHERE T.tid IN (SELECT tid -- All tags
478478
FROM tag
479479
EXCEPT -- subtract
480
- SELECT CR.rid -- tags used
481
- FROM csrevision CR, changeset C
482
- WHERE C.cid = CR.cid -- by any tag
480
+ SELECT CI.iid -- tags used
481
+ FROM csitem CI, changeset C
482
+ WHERE C.cid = CI.cid -- by any tag
483483
AND C.type = 1) -- changeset
484484
AND S.sid = T.sid -- get symbol of tag
485485
AND P.pid = S.pid -- get project of symbol
486486
}
487487
# Find all tags which are used by more than one changeset.
@@ -495,17 +495,17 @@
495495
-- user, and get their associated file (name) for
496496
-- display.
497497
498498
SELECT P.name, S.name
499499
FROM tag T, project P, symbol S,
500
- (SELECT CR.rid AS rid, count(CR.cid) AS count
501
- FROM csrevision CR, changeset C
500
+ (SELECT CI.iid AS iid, count(CI.cid) AS count
501
+ FROM csitem CI, changeset C
502502
WHERE C.type = 1
503
- AND C.cid = CR.cid
504
- GROUP BY CR.rid) AS U
503
+ AND C.cid = CI.cid
504
+ GROUP BY CI.iid) AS U
505505
WHERE U.count > 1
506
- AND T.tid = U.rid
506
+ AND T.tid = U.iid
507507
AND S.sid = T.sid -- get symbol of tag
508508
AND P.pid = S.pid -- get project of symbol
509509
}
510510
if 0 {
511511
# This check is disabled for the moment. Apparently tags
@@ -529,14 +529,14 @@
529529
{All tags in a changeset have to belong to the same LOD} \
530530
{: Its tags disagree about the LOD they belong to} {
531531
SELECT T.name, C.cid
532532
FROM changeset C, cstype T
533533
WHERE C.cid IN (SELECT U.cid
534
- FROM (SELECT DISTINCT CR.cid AS cid, T.lod AS lod
535
- FROM csrevision CR, changeset C, tag T
536
- WHERE CR.rid = T.tid
537
- AND C.cid = CR.cid
534
+ FROM (SELECT DISTINCT CI.cid AS cid, T.lod AS lod
535
+ FROM csitem CI, changeset C, tag T
536
+ WHERE CI.iid = T.tid
537
+ AND C.cid = CI.cid
538538
AND C.type = 1) AS U
539539
GROUP BY U.cid HAVING COUNT(U.lod) > 1)
540540
AND T.tid = C.type
541541
}
542542
}
@@ -553,14 +553,14 @@
553553
{All tags in a changeset have to belong to the same project} \
554554
{: Its tags disagree about the project they belong to} {
555555
SELECT T.name, C.cid
556556
FROM changeset C, cstype T
557557
WHERE C.cid IN (SELECT U.cid
558
- FROM (SELECT DISTINCT CR.cid AS cid, F.pid AS pid
559
- FROM csrevision CR, changeset C, tag T, file F
560
- WHERE CR.rid = T.tid
561
- AND C.cid = CR.cid
558
+ FROM (SELECT DISTINCT CI.cid AS cid, F.pid AS pid
559
+ FROM csitem CI, changeset C, tag T, file F
560
+ WHERE CI.iid = T.tid
561
+ AND C.cid = CI.cid
562562
AND C.type = 1
563563
AND F.fid = T.fid) AS U
564564
GROUP BY U.cid HAVING COUNT(U.pid) > 1)
565565
AND T.tid = C.type
566566
}
@@ -578,19 +578,19 @@
578578
{: Its tags share files} {
579579
SELECT T.name, C.cid
580580
FROM changeset C, cstype T
581581
WHERE C.cid IN (SELECT VV.cid
582582
FROM (SELECT U.cid as cid, COUNT (U.fid) AS fcount
583
- FROM (SELECT DISTINCT CR.cid AS cid, T.fid AS fid
584
- FROM csrevision CR, changeset C, tag T
585
- WHERE CR.rid = T.tid
586
- AND C.cid = CR.cid
583
+ FROM (SELECT DISTINCT CI.cid AS cid, T.fid AS fid
584
+ FROM csitem CI, changeset C, tag T
585
+ WHERE CI.iid = T.tid
586
+ AND C.cid = CI.cid
587587
AND C.type = 1
588588
) AS U
589589
GROUP BY U.cid) AS UU,
590
- (SELECT V.cid AS cid, COUNT (V.rid) AS rcount
591
- FROM csrevision V, changeset X
590
+ (SELECT V.cid AS cid, COUNT (V.iid) AS rcount
591
+ FROM csitem V, changeset X
592592
WHERE X.cid = V.cid
593593
AND X.type = 1
594594
GROUP BY V.cid) AS VV
595595
WHERE VV.cid = UU.cid
596596
AND UU.fcount < VV.rcount)
@@ -622,13 +622,13 @@
622622
SELECT P.name, S.name
623623
FROM project P, branch B, symbol S
624624
WHERE B.bid IN (SELECT bid -- All branches
625625
FROM branch
626626
EXCEPT -- subtract
627
- SELECT CR.rid -- branches used
628
- FROM csrevision CR, changeset C
629
- WHERE C.cid = CR.cid -- by any branch
627
+ SELECT CI.iid -- branches used
628
+ FROM csitem CI, changeset C
629
+ WHERE C.cid = CI.cid -- by any branch
630630
AND C.type = 2) -- changeset
631631
AND S.sid = B.sid -- get symbol of branch
632632
AND P.pid = S.pid -- get project of symbol
633633
}
634634
# Find all branches which are used by more than one changeset.
@@ -642,17 +642,17 @@
642642
-- than one user, and get their associated file (name)
643643
-- for display.
644644
645645
SELECT P.name, S.name
646646
FROM branch B, project P, symbol S,
647
- (SELECT CR.rid AS rid, count(CR.cid) AS count
648
- FROM csrevision CR, changeset C
647
+ (SELECT CI.iid AS iid, count(CI.cid) AS count
648
+ FROM csitem CI, changeset C
649649
WHERE C.type = 2
650
- AND C.cid = CR.cid
651
- GROUP BY CR.rid ) AS U
650
+ AND C.cid = CI.cid
651
+ GROUP BY CI.iid ) AS U
652652
WHERE U.count > 1
653
- AND B.bid = U.rid
653
+ AND B.bid = U.iid
654654
AND S.sid = B.sid -- get symbol of branch
655655
AND P.pid = S.pid -- get project of symbol
656656
}
657657
# All branches have to agree on the LOD their changeset
658658
# belongs to. In other words, all branches in a changeset have
@@ -667,14 +667,14 @@
667667
{All branches in a changeset have to belong to the same LOD} \
668668
{: Its branches disagree about the LOD they belong to} {
669669
SELECT T.name, C.cid
670670
FROM changeset C, cstype T
671671
WHERE C.cid IN (SELECT U.cid
672
- FROM (SELECT DISTINCT CR.cid AS cid, B.lod AS lod
673
- FROM csrevision CR, changeset C, branch B
674
- WHERE CR.rid = B.bid
675
- AND C.cid = CR.cid
672
+ FROM (SELECT DISTINCT CI.cid AS cid, B.lod AS lod
673
+ FROM csitem CI, changeset C, branch B
674
+ WHERE CI.iid = B.bid
675
+ AND C.cid = CI.cid
676676
AND C.type = 2) AS U
677677
GROUP BY U.cid HAVING COUNT(U.lod) > 1)
678678
AND T.tid = C.type
679679
}
680680
# All branches have to agree on the project their changeset
@@ -690,14 +690,14 @@
690690
{All branches in a changeset have to belong to the same project} \
691691
{: Its branches disagree about the project they belong to} {
692692
SELECT T.name, C.cid
693693
FROM changeset C, cstype T
694694
WHERE C.cid IN (SELECT U.cid
695
- FROM (SELECT DISTINCT CR.cid AS cid, F.pid AS pid
696
- FROM csrevision CR, changeset C, branch B, file F
697
- WHERE CR.rid = B.bid
698
- AND C.cid = CR.cid
695
+ FROM (SELECT DISTINCT CI.cid AS cid, F.pid AS pid
696
+ FROM csitem CI, changeset C, branch B, file F
697
+ WHERE CI.iid = B.bid
698
+ AND C.cid = CI.cid
699699
AND C.type = 2
700700
AND F.fid = B.fid) AS U
701701
GROUP BY U.cid HAVING COUNT(U.pid) > 1)
702702
AND T.tid = C.type
703703
}
@@ -716,19 +716,19 @@
716716
{: Its branches share files} {
717717
SELECT T.name, C.cid
718718
FROM changeset C, cstype T
719719
WHERE C.cid IN (SELECT VV.cid
720720
FROM (SELECT U.cid as cid, COUNT (U.fid) AS fcount
721
- FROM (SELECT DISTINCT CR.cid AS cid, B.fid AS fid
722
- FROM csrevision CR, changeset C, branch B
723
- WHERE CR.rid = B.bid
724
- AND C.cid = CR.cid
721
+ FROM (SELECT DISTINCT CI.cid AS cid, B.fid AS fid
722
+ FROM csitem CI, changeset C, branch B
723
+ WHERE CI.iid = B.bid
724
+ AND C.cid = CI.cid
725725
AND C.type = 2
726726
) AS U
727727
GROUP BY U.cid) AS UU,
728
- (SELECT V.cid AS cid, COUNT (V.rid) AS rcount
729
- FROM csrevision V, changeset X
728
+ (SELECT V.cid AS cid, COUNT (V.iid) AS rcount
729
+ FROM csitem V, changeset X
730730
WHERE X.cid = V.cid
731731
AND X.type = 2
732732
GROUP BY V.cid) AS VV
733733
WHERE VV.cid = UU.cid
734734
AND UU.fcount < VV.rcount)
@@ -757,15 +757,15 @@
757757
# changeset's tag associated with them.
758758
CheckRevCS \
759759
{All revisions used by tag symbol changesets have to have the changeset's tag attached to them} \
760760
{does not have the tag of its symbol changeset @ attached to it} {
761761
SELECT CT.name, C.cid, F.name, R.rev
762
- FROM changeset C, cstype CT, revision R, file F, csrevision CR, tag T
762
+ FROM changeset C, cstype CT, revision R, file F, csitem CI, tag T
763763
WHERE C.type = 1 -- symbol changesets only
764764
AND C.src = T.sid -- tag only, linked by symbol id
765
- AND C.cid = CR.cid -- changeset --> its revisions
766
- AND R.rid = CR.rid -- look at the revisions
765
+ AND C.cid = CI.cid -- changeset --> its revisions
766
+ AND R.rid = CI.iid -- look at the revisions
767767
-- and look for the tag among the attached ones.
768768
AND T.sid NOT IN (SELECT TB.sid
769769
FROM tag TB
770770
WHERE TB.rev = R.rid)
771771
AND R.fid = F.fid -- get file of revision
@@ -776,15 +776,15 @@
776776
777777
CheckRevCS \
778778
{All revisions used by branch symbol changesets have to have the changeset's branch attached to them} \
779779
{does not have the branch of its symbol changeset @ attached to it} {
780780
SELECT CT.name, C.cid, F.name, R.rev, C.cid
781
- FROM changeset C, cstype CT, revision R, file F, csrevision CR, branch B
781
+ FROM changeset C, cstype CT, revision R, file F, csitem CI, branch B
782782
WHERE C.type = 1 -- symbol changesets only
783783
AND C.src = B.sid -- branches only
784
- AND C.cid = CR.cid -- changeset --> its revisions
785
- AND R.rid = CR.rid -- look at the revisions
784
+ AND C.cid = CI.cid -- changeset --> its revisions
785
+ AND R.rid = CI.iid -- look at the revisions
786786
-- and look for the branch among the attached ones.
787787
AND B.sid NOT IN (SELECT BB.sid
788788
FROM branch BB
789789
WHERE BB.root = R.rid)
790790
AND R.fid = F.fid -- get file of revision
791791
--- tools/cvs2fossil/lib/c2f_integrity.tcl
+++ tools/cvs2fossil/lib/c2f_integrity.tcl
@@ -325,13 +325,13 @@
325 SELECT F.name, R.rev
326 FROM revision R, file F
327 WHERE R.rid IN (SELECT rid
328 FROM revision -- All revisions
329 EXCEPT -- subtract
330 SELECT CR.rid
331 FROM csrevision CR, changeset C -- revisions used
332 WHERE C.cid = CR.cid -- by any revision
333 AND C.type = 0) -- changeset
334 AND R.fid = F.fid -- get file of unused revision
335 }
336 # Find all revisions which are used by more than one
337 # changeset.
@@ -345,15 +345,15 @@
345 -- select those with more than one user, and get their
346 -- associated file (name) for display.
347
348 SELECT F.name, R.rev
349 FROM revision R, file F,
350 (SELECT CR.rid AS rid, count(CR.cid) AS count
351 FROM csrevision CR, changeset C
352 WHERE C.type = 0
353 AND C.cid = CR.cid
354 GROUP BY CR.rid) AS U
355 WHERE U.count > 1
356 AND R.rid = U.rid
357 AND R.fid = F.fid
358 }
359 # All revisions have to refer to the same meta information as
@@ -360,14 +360,14 @@
360 # their changeset.
361 CheckRevCS \
362 {All revisions have to agree with their changeset about the used meta information} \
363 {disagrees with its changeset @ about the meta information} {
364 SELECT CT.name, C.cid, F.name, R.rev
365 FROM changeset C, cstype CT, revision R, file F, csrevision CR
366 WHERE C.type = 0 -- revision changesets only
367 AND C.cid = CR.cid -- changeset --> its revisions
368 AND R.rid = CR.rid -- look at them
369 AND R.mid != C.src -- Only those which disagree with changeset about the meta
370 AND R.fid = F.fid -- get file of the revision
371 AND CT.tid = C.type -- get changeset type, for labeling
372 }
373 # All revisions have to agree on the LOD their changeset
@@ -383,14 +383,14 @@
383 {All revisions in a changeset have to belong to the same LOD} \
384 {: Its revisions disagree about the LOD they belong to} {
385 SELECT T.name, C.cid
386 FROM changeset C, cstype T
387 WHERE C.cid IN (SELECT U.cid
388 FROM (SELECT DISTINCT CR.cid AS cid, R.lod AS lod
389 FROM csrevision CR, changeset C, revision R
390 WHERE CR.rid = R.rid
391 AND C.cid = CR.cid
392 AND C.type = 0) AS U
393 GROUP BY U.cid HAVING COUNT(U.lod) > 1)
394 AND T.tid = C.type
395 }
396 # All revisions have to agree on the project their changeset
@@ -406,14 +406,14 @@
406 {All revisions in a changeset have to belong to the same project} \
407 {: Its revisions disagree about the project they belong to} {
408 SELECT T.name, C.cid
409 FROM changeset C, cstype T
410 WHERE C.cid IN (SELECT U.cid
411 FROM (SELECT DISTINCT CR.cid AS cid, F.pid AS pid
412 FROM csrevision CR, changeset C, revision R, file F
413 WHERE CR.rid = R.rid
414 AND C.cid = CR.cid
415 AND C.type = 0
416 AND F.fid = R.fid) AS U
417 GROUP BY U.cid HAVING COUNT(U.pid) > 1)
418 AND T.tid = C.type
419 }
@@ -432,19 +432,19 @@
432 {: Its revisions share files} {
433 SELECT T.name, C.cid
434 FROM changeset C, cstype T
435 WHERE C.cid IN (SELECT VV.cid
436 FROM (SELECT U.cid as cid, COUNT (U.fid) AS fcount
437 FROM (SELECT DISTINCT CR.cid AS cid, R.fid AS fid
438 FROM csrevision CR, changeset C, revision R
439 WHERE CR.rid = R.rid
440 AND C.cid = CR.cid
441 AND C.type = 0
442 ) AS U
443 GROUP BY U.cid) AS UU,
444 (SELECT V.cid AS cid, COUNT (V.rid) AS rcount
445 FROM csrevision V, changeset X
446 WHERE X.cid = V.cid
447 AND X.type = 0
448 GROUP BY V.cid) AS VV
449 WHERE VV.cid = UU.cid
450 AND UU.fcount < VV.rcount)
@@ -475,13 +475,13 @@
475 SELECT P.name, S.name
476 FROM project P, tag T, symbol S
477 WHERE T.tid IN (SELECT tid -- All tags
478 FROM tag
479 EXCEPT -- subtract
480 SELECT CR.rid -- tags used
481 FROM csrevision CR, changeset C
482 WHERE C.cid = CR.cid -- by any tag
483 AND C.type = 1) -- changeset
484 AND S.sid = T.sid -- get symbol of tag
485 AND P.pid = S.pid -- get project of symbol
486 }
487 # Find all tags which are used by more than one changeset.
@@ -495,17 +495,17 @@
495 -- user, and get their associated file (name) for
496 -- display.
497
498 SELECT P.name, S.name
499 FROM tag T, project P, symbol S,
500 (SELECT CR.rid AS rid, count(CR.cid) AS count
501 FROM csrevision CR, changeset C
502 WHERE C.type = 1
503 AND C.cid = CR.cid
504 GROUP BY CR.rid) AS U
505 WHERE U.count > 1
506 AND T.tid = U.rid
507 AND S.sid = T.sid -- get symbol of tag
508 AND P.pid = S.pid -- get project of symbol
509 }
510 if 0 {
511 # This check is disabled for the moment. Apparently tags
@@ -529,14 +529,14 @@
529 {All tags in a changeset have to belong to the same LOD} \
530 {: Its tags disagree about the LOD they belong to} {
531 SELECT T.name, C.cid
532 FROM changeset C, cstype T
533 WHERE C.cid IN (SELECT U.cid
534 FROM (SELECT DISTINCT CR.cid AS cid, T.lod AS lod
535 FROM csrevision CR, changeset C, tag T
536 WHERE CR.rid = T.tid
537 AND C.cid = CR.cid
538 AND C.type = 1) AS U
539 GROUP BY U.cid HAVING COUNT(U.lod) > 1)
540 AND T.tid = C.type
541 }
542 }
@@ -553,14 +553,14 @@
553 {All tags in a changeset have to belong to the same project} \
554 {: Its tags disagree about the project they belong to} {
555 SELECT T.name, C.cid
556 FROM changeset C, cstype T
557 WHERE C.cid IN (SELECT U.cid
558 FROM (SELECT DISTINCT CR.cid AS cid, F.pid AS pid
559 FROM csrevision CR, changeset C, tag T, file F
560 WHERE CR.rid = T.tid
561 AND C.cid = CR.cid
562 AND C.type = 1
563 AND F.fid = T.fid) AS U
564 GROUP BY U.cid HAVING COUNT(U.pid) > 1)
565 AND T.tid = C.type
566 }
@@ -578,19 +578,19 @@
578 {: Its tags share files} {
579 SELECT T.name, C.cid
580 FROM changeset C, cstype T
581 WHERE C.cid IN (SELECT VV.cid
582 FROM (SELECT U.cid as cid, COUNT (U.fid) AS fcount
583 FROM (SELECT DISTINCT CR.cid AS cid, T.fid AS fid
584 FROM csrevision CR, changeset C, tag T
585 WHERE CR.rid = T.tid
586 AND C.cid = CR.cid
587 AND C.type = 1
588 ) AS U
589 GROUP BY U.cid) AS UU,
590 (SELECT V.cid AS cid, COUNT (V.rid) AS rcount
591 FROM csrevision V, changeset X
592 WHERE X.cid = V.cid
593 AND X.type = 1
594 GROUP BY V.cid) AS VV
595 WHERE VV.cid = UU.cid
596 AND UU.fcount < VV.rcount)
@@ -622,13 +622,13 @@
622 SELECT P.name, S.name
623 FROM project P, branch B, symbol S
624 WHERE B.bid IN (SELECT bid -- All branches
625 FROM branch
626 EXCEPT -- subtract
627 SELECT CR.rid -- branches used
628 FROM csrevision CR, changeset C
629 WHERE C.cid = CR.cid -- by any branch
630 AND C.type = 2) -- changeset
631 AND S.sid = B.sid -- get symbol of branch
632 AND P.pid = S.pid -- get project of symbol
633 }
634 # Find all branches which are used by more than one changeset.
@@ -642,17 +642,17 @@
642 -- than one user, and get their associated file (name)
643 -- for display.
644
645 SELECT P.name, S.name
646 FROM branch B, project P, symbol S,
647 (SELECT CR.rid AS rid, count(CR.cid) AS count
648 FROM csrevision CR, changeset C
649 WHERE C.type = 2
650 AND C.cid = CR.cid
651 GROUP BY CR.rid ) AS U
652 WHERE U.count > 1
653 AND B.bid = U.rid
654 AND S.sid = B.sid -- get symbol of branch
655 AND P.pid = S.pid -- get project of symbol
656 }
657 # All branches have to agree on the LOD their changeset
658 # belongs to. In other words, all branches in a changeset have
@@ -667,14 +667,14 @@
667 {All branches in a changeset have to belong to the same LOD} \
668 {: Its branches disagree about the LOD they belong to} {
669 SELECT T.name, C.cid
670 FROM changeset C, cstype T
671 WHERE C.cid IN (SELECT U.cid
672 FROM (SELECT DISTINCT CR.cid AS cid, B.lod AS lod
673 FROM csrevision CR, changeset C, branch B
674 WHERE CR.rid = B.bid
675 AND C.cid = CR.cid
676 AND C.type = 2) AS U
677 GROUP BY U.cid HAVING COUNT(U.lod) > 1)
678 AND T.tid = C.type
679 }
680 # All branches have to agree on the project their changeset
@@ -690,14 +690,14 @@
690 {All branches in a changeset have to belong to the same project} \
691 {: Its branches disagree about the project they belong to} {
692 SELECT T.name, C.cid
693 FROM changeset C, cstype T
694 WHERE C.cid IN (SELECT U.cid
695 FROM (SELECT DISTINCT CR.cid AS cid, F.pid AS pid
696 FROM csrevision CR, changeset C, branch B, file F
697 WHERE CR.rid = B.bid
698 AND C.cid = CR.cid
699 AND C.type = 2
700 AND F.fid = B.fid) AS U
701 GROUP BY U.cid HAVING COUNT(U.pid) > 1)
702 AND T.tid = C.type
703 }
@@ -716,19 +716,19 @@
716 {: Its branches share files} {
717 SELECT T.name, C.cid
718 FROM changeset C, cstype T
719 WHERE C.cid IN (SELECT VV.cid
720 FROM (SELECT U.cid as cid, COUNT (U.fid) AS fcount
721 FROM (SELECT DISTINCT CR.cid AS cid, B.fid AS fid
722 FROM csrevision CR, changeset C, branch B
723 WHERE CR.rid = B.bid
724 AND C.cid = CR.cid
725 AND C.type = 2
726 ) AS U
727 GROUP BY U.cid) AS UU,
728 (SELECT V.cid AS cid, COUNT (V.rid) AS rcount
729 FROM csrevision V, changeset X
730 WHERE X.cid = V.cid
731 AND X.type = 2
732 GROUP BY V.cid) AS VV
733 WHERE VV.cid = UU.cid
734 AND UU.fcount < VV.rcount)
@@ -757,15 +757,15 @@
757 # changeset's tag associated with them.
758 CheckRevCS \
759 {All revisions used by tag symbol changesets have to have the changeset's tag attached to them} \
760 {does not have the tag of its symbol changeset @ attached to it} {
761 SELECT CT.name, C.cid, F.name, R.rev
762 FROM changeset C, cstype CT, revision R, file F, csrevision CR, tag T
763 WHERE C.type = 1 -- symbol changesets only
764 AND C.src = T.sid -- tag only, linked by symbol id
765 AND C.cid = CR.cid -- changeset --> its revisions
766 AND R.rid = CR.rid -- look at the revisions
767 -- and look for the tag among the attached ones.
768 AND T.sid NOT IN (SELECT TB.sid
769 FROM tag TB
770 WHERE TB.rev = R.rid)
771 AND R.fid = F.fid -- get file of revision
@@ -776,15 +776,15 @@
776
777 CheckRevCS \
778 {All revisions used by branch symbol changesets have to have the changeset's branch attached to them} \
779 {does not have the branch of its symbol changeset @ attached to it} {
780 SELECT CT.name, C.cid, F.name, R.rev, C.cid
781 FROM changeset C, cstype CT, revision R, file F, csrevision CR, branch B
782 WHERE C.type = 1 -- symbol changesets only
783 AND C.src = B.sid -- branches only
784 AND C.cid = CR.cid -- changeset --> its revisions
785 AND R.rid = CR.rid -- look at the revisions
786 -- and look for the branch among the attached ones.
787 AND B.sid NOT IN (SELECT BB.sid
788 FROM branch BB
789 WHERE BB.root = R.rid)
790 AND R.fid = F.fid -- get file of revision
791
--- tools/cvs2fossil/lib/c2f_integrity.tcl
+++ tools/cvs2fossil/lib/c2f_integrity.tcl
@@ -325,13 +325,13 @@
325 SELECT F.name, R.rev
326 FROM revision R, file F
327 WHERE R.rid IN (SELECT rid
328 FROM revision -- All revisions
329 EXCEPT -- subtract
330 SELECT CI.iid
331 FROM csitem CI, changeset C -- revisions used
332 WHERE C.cid = CI.cid -- by any revision
333 AND C.type = 0) -- changeset
334 AND R.fid = F.fid -- get file of unused revision
335 }
336 # Find all revisions which are used by more than one
337 # changeset.
@@ -345,15 +345,15 @@
345 -- select those with more than one user, and get their
346 -- associated file (name) for display.
347
348 SELECT F.name, R.rev
349 FROM revision R, file F,
350 (SELECT CI.iid AS rid, count(CI.cid) AS count
351 FROM csitem CI, changeset C
352 WHERE C.type = 0
353 AND C.cid = CI.cid
354 GROUP BY CI.iid) AS U
355 WHERE U.count > 1
356 AND R.rid = U.rid
357 AND R.fid = F.fid
358 }
359 # All revisions have to refer to the same meta information as
@@ -360,14 +360,14 @@
360 # their changeset.
361 CheckRevCS \
362 {All revisions have to agree with their changeset about the used meta information} \
363 {disagrees with its changeset @ about the meta information} {
364 SELECT CT.name, C.cid, F.name, R.rev
365 FROM changeset C, cstype CT, revision R, file F, csitem CI
366 WHERE C.type = 0 -- revision changesets only
367 AND C.cid = CI.cid -- changeset --> its revisions
368 AND R.rid = CI.iid -- look at them
369 AND R.mid != C.src -- Only those which disagree with changeset about the meta
370 AND R.fid = F.fid -- get file of the revision
371 AND CT.tid = C.type -- get changeset type, for labeling
372 }
373 # All revisions have to agree on the LOD their changeset
@@ -383,14 +383,14 @@
383 {All revisions in a changeset have to belong to the same LOD} \
384 {: Its revisions disagree about the LOD they belong to} {
385 SELECT T.name, C.cid
386 FROM changeset C, cstype T
387 WHERE C.cid IN (SELECT U.cid
388 FROM (SELECT DISTINCT CI.cid AS cid, R.lod AS lod
389 FROM csitem CI, changeset C, revision R
390 WHERE CI.iid = R.rid
391 AND C.cid = CI.cid
392 AND C.type = 0) AS U
393 GROUP BY U.cid HAVING COUNT(U.lod) > 1)
394 AND T.tid = C.type
395 }
396 # All revisions have to agree on the project their changeset
@@ -406,14 +406,14 @@
406 {All revisions in a changeset have to belong to the same project} \
407 {: Its revisions disagree about the project they belong to} {
408 SELECT T.name, C.cid
409 FROM changeset C, cstype T
410 WHERE C.cid IN (SELECT U.cid
411 FROM (SELECT DISTINCT CI.cid AS cid, F.pid AS pid
412 FROM csitem CI, changeset C, revision R, file F
413 WHERE CI.iid = R.rid
414 AND C.cid = CI.cid
415 AND C.type = 0
416 AND F.fid = R.fid) AS U
417 GROUP BY U.cid HAVING COUNT(U.pid) > 1)
418 AND T.tid = C.type
419 }
@@ -432,19 +432,19 @@
432 {: Its revisions share files} {
433 SELECT T.name, C.cid
434 FROM changeset C, cstype T
435 WHERE C.cid IN (SELECT VV.cid
436 FROM (SELECT U.cid as cid, COUNT (U.fid) AS fcount
437 FROM (SELECT DISTINCT CI.cid AS cid, R.fid AS fid
438 FROM csitem CI, changeset C, revision R
439 WHERE CI.iid = R.rid
440 AND C.cid = CI.cid
441 AND C.type = 0
442 ) AS U
443 GROUP BY U.cid) AS UU,
444 (SELECT V.cid AS cid, COUNT (V.iid) AS rcount
445 FROM csitem V, changeset X
446 WHERE X.cid = V.cid
447 AND X.type = 0
448 GROUP BY V.cid) AS VV
449 WHERE VV.cid = UU.cid
450 AND UU.fcount < VV.rcount)
@@ -475,13 +475,13 @@
475 SELECT P.name, S.name
476 FROM project P, tag T, symbol S
477 WHERE T.tid IN (SELECT tid -- All tags
478 FROM tag
479 EXCEPT -- subtract
480 SELECT CI.iid -- tags used
481 FROM csitem CI, changeset C
482 WHERE C.cid = CI.cid -- by any tag
483 AND C.type = 1) -- changeset
484 AND S.sid = T.sid -- get symbol of tag
485 AND P.pid = S.pid -- get project of symbol
486 }
487 # Find all tags which are used by more than one changeset.
@@ -495,17 +495,17 @@
495 -- user, and get their associated file (name) for
496 -- display.
497
498 SELECT P.name, S.name
499 FROM tag T, project P, symbol S,
500 (SELECT CI.iid AS iid, count(CI.cid) AS count
501 FROM csitem CI, changeset C
502 WHERE C.type = 1
503 AND C.cid = CI.cid
504 GROUP BY CI.iid) AS U
505 WHERE U.count > 1
506 AND T.tid = U.iid
507 AND S.sid = T.sid -- get symbol of tag
508 AND P.pid = S.pid -- get project of symbol
509 }
510 if 0 {
511 # This check is disabled for the moment. Apparently tags
@@ -529,14 +529,14 @@
529 {All tags in a changeset have to belong to the same LOD} \
530 {: Its tags disagree about the LOD they belong to} {
531 SELECT T.name, C.cid
532 FROM changeset C, cstype T
533 WHERE C.cid IN (SELECT U.cid
534 FROM (SELECT DISTINCT CI.cid AS cid, T.lod AS lod
535 FROM csitem CI, changeset C, tag T
536 WHERE CI.iid = T.tid
537 AND C.cid = CI.cid
538 AND C.type = 1) AS U
539 GROUP BY U.cid HAVING COUNT(U.lod) > 1)
540 AND T.tid = C.type
541 }
542 }
@@ -553,14 +553,14 @@
553 {All tags in a changeset have to belong to the same project} \
554 {: Its tags disagree about the project they belong to} {
555 SELECT T.name, C.cid
556 FROM changeset C, cstype T
557 WHERE C.cid IN (SELECT U.cid
558 FROM (SELECT DISTINCT CI.cid AS cid, F.pid AS pid
559 FROM csitem CI, changeset C, tag T, file F
560 WHERE CI.iid = T.tid
561 AND C.cid = CI.cid
562 AND C.type = 1
563 AND F.fid = T.fid) AS U
564 GROUP BY U.cid HAVING COUNT(U.pid) > 1)
565 AND T.tid = C.type
566 }
@@ -578,19 +578,19 @@
578 {: Its tags share files} {
579 SELECT T.name, C.cid
580 FROM changeset C, cstype T
581 WHERE C.cid IN (SELECT VV.cid
582 FROM (SELECT U.cid as cid, COUNT (U.fid) AS fcount
583 FROM (SELECT DISTINCT CI.cid AS cid, T.fid AS fid
584 FROM csitem CI, changeset C, tag T
585 WHERE CI.iid = T.tid
586 AND C.cid = CI.cid
587 AND C.type = 1
588 ) AS U
589 GROUP BY U.cid) AS UU,
590 (SELECT V.cid AS cid, COUNT (V.iid) AS rcount
591 FROM csitem V, changeset X
592 WHERE X.cid = V.cid
593 AND X.type = 1
594 GROUP BY V.cid) AS VV
595 WHERE VV.cid = UU.cid
596 AND UU.fcount < VV.rcount)
@@ -622,13 +622,13 @@
622 SELECT P.name, S.name
623 FROM project P, branch B, symbol S
624 WHERE B.bid IN (SELECT bid -- All branches
625 FROM branch
626 EXCEPT -- subtract
627 SELECT CI.iid -- branches used
628 FROM csitem CI, changeset C
629 WHERE C.cid = CI.cid -- by any branch
630 AND C.type = 2) -- changeset
631 AND S.sid = B.sid -- get symbol of branch
632 AND P.pid = S.pid -- get project of symbol
633 }
634 # Find all branches which are used by more than one changeset.
@@ -642,17 +642,17 @@
642 -- than one user, and get their associated file (name)
643 -- for display.
644
645 SELECT P.name, S.name
646 FROM branch B, project P, symbol S,
647 (SELECT CI.iid AS iid, count(CI.cid) AS count
648 FROM csitem CI, changeset C
649 WHERE C.type = 2
650 AND C.cid = CI.cid
651 GROUP BY CI.iid ) AS U
652 WHERE U.count > 1
653 AND B.bid = U.iid
654 AND S.sid = B.sid -- get symbol of branch
655 AND P.pid = S.pid -- get project of symbol
656 }
657 # All branches have to agree on the LOD their changeset
658 # belongs to. In other words, all branches in a changeset have
@@ -667,14 +667,14 @@
667 {All branches in a changeset have to belong to the same LOD} \
668 {: Its branches disagree about the LOD they belong to} {
669 SELECT T.name, C.cid
670 FROM changeset C, cstype T
671 WHERE C.cid IN (SELECT U.cid
672 FROM (SELECT DISTINCT CI.cid AS cid, B.lod AS lod
673 FROM csitem CI, changeset C, branch B
674 WHERE CI.iid = B.bid
675 AND C.cid = CI.cid
676 AND C.type = 2) AS U
677 GROUP BY U.cid HAVING COUNT(U.lod) > 1)
678 AND T.tid = C.type
679 }
680 # All branches have to agree on the project their changeset
@@ -690,14 +690,14 @@
690 {All branches in a changeset have to belong to the same project} \
691 {: Its branches disagree about the project they belong to} {
692 SELECT T.name, C.cid
693 FROM changeset C, cstype T
694 WHERE C.cid IN (SELECT U.cid
695 FROM (SELECT DISTINCT CI.cid AS cid, F.pid AS pid
696 FROM csitem CI, changeset C, branch B, file F
697 WHERE CI.iid = B.bid
698 AND C.cid = CI.cid
699 AND C.type = 2
700 AND F.fid = B.fid) AS U
701 GROUP BY U.cid HAVING COUNT(U.pid) > 1)
702 AND T.tid = C.type
703 }
@@ -716,19 +716,19 @@
716 {: Its branches share files} {
717 SELECT T.name, C.cid
718 FROM changeset C, cstype T
719 WHERE C.cid IN (SELECT VV.cid
720 FROM (SELECT U.cid as cid, COUNT (U.fid) AS fcount
721 FROM (SELECT DISTINCT CI.cid AS cid, B.fid AS fid
722 FROM csitem CI, changeset C, branch B
723 WHERE CI.iid = B.bid
724 AND C.cid = CI.cid
725 AND C.type = 2
726 ) AS U
727 GROUP BY U.cid) AS UU,
728 (SELECT V.cid AS cid, COUNT (V.iid) AS rcount
729 FROM csitem V, changeset X
730 WHERE X.cid = V.cid
731 AND X.type = 2
732 GROUP BY V.cid) AS VV
733 WHERE VV.cid = UU.cid
734 AND UU.fcount < VV.rcount)
@@ -757,15 +757,15 @@
757 # changeset's tag associated with them.
758 CheckRevCS \
759 {All revisions used by tag symbol changesets have to have the changeset's tag attached to them} \
760 {does not have the tag of its symbol changeset @ attached to it} {
761 SELECT CT.name, C.cid, F.name, R.rev
762 FROM changeset C, cstype CT, revision R, file F, csitem CI, tag T
763 WHERE C.type = 1 -- symbol changesets only
764 AND C.src = T.sid -- tag only, linked by symbol id
765 AND C.cid = CI.cid -- changeset --> its revisions
766 AND R.rid = CI.iid -- look at the revisions
767 -- and look for the tag among the attached ones.
768 AND T.sid NOT IN (SELECT TB.sid
769 FROM tag TB
770 WHERE TB.rev = R.rid)
771 AND R.fid = F.fid -- get file of revision
@@ -776,15 +776,15 @@
776
777 CheckRevCS \
778 {All revisions used by branch symbol changesets have to have the changeset's branch attached to them} \
779 {does not have the branch of its symbol changeset @ attached to it} {
780 SELECT CT.name, C.cid, F.name, R.rev, C.cid
781 FROM changeset C, cstype CT, revision R, file F, csitem CI, branch B
782 WHERE C.type = 1 -- symbol changesets only
783 AND C.src = B.sid -- branches only
784 AND C.cid = CI.cid -- changeset --> its revisions
785 AND R.rid = CI.iid -- look at the revisions
786 -- and look for the branch among the attached ones.
787 AND B.sid NOT IN (SELECT BB.sid
788 FROM branch BB
789 WHERE BB.root = R.rid)
790 AND R.fid = F.fid -- get file of revision
791
--- tools/cvs2fossil/lib/c2f_pbreakacycle.tcl
+++ tools/cvs2fossil/lib/c2f_pbreakacycle.tcl
@@ -50,11 +50,11 @@
5050
typemethod setup {} {
5151
# Define the names and structure of the persistent state of
5252
# this pass.
5353
5454
state reading changeset
55
- state reading csrevision
55
+ state reading csitem
5656
state reading csorder
5757
return
5858
}
5959
6060
typemethod load {} {
6161
--- tools/cvs2fossil/lib/c2f_pbreakacycle.tcl
+++ tools/cvs2fossil/lib/c2f_pbreakacycle.tcl
@@ -50,11 +50,11 @@
50 typemethod setup {} {
51 # Define the names and structure of the persistent state of
52 # this pass.
53
54 state reading changeset
55 state reading csrevision
56 state reading csorder
57 return
58 }
59
60 typemethod load {} {
61
--- tools/cvs2fossil/lib/c2f_pbreakacycle.tcl
+++ tools/cvs2fossil/lib/c2f_pbreakacycle.tcl
@@ -50,11 +50,11 @@
50 typemethod setup {} {
51 # Define the names and structure of the persistent state of
52 # this pass.
53
54 state reading changeset
55 state reading csitem
56 state reading csorder
57 return
58 }
59
60 typemethod load {} {
61
--- tools/cvs2fossil/lib/c2f_pbreakrcycle.tcl
+++ tools/cvs2fossil/lib/c2f_pbreakrcycle.tcl
@@ -47,11 +47,11 @@
4747
# Define the names and structure of the persistent state of
4848
# this pass.
4949
5050
state reading revision
5151
state reading changeset
52
- state reading csrevision
52
+ state reading csitem
5353
return
5454
}
5555
5656
typemethod load {} {
5757
# Pass manager interface. Executed to load data computed by
5858
--- tools/cvs2fossil/lib/c2f_pbreakrcycle.tcl
+++ tools/cvs2fossil/lib/c2f_pbreakrcycle.tcl
@@ -47,11 +47,11 @@
47 # Define the names and structure of the persistent state of
48 # this pass.
49
50 state reading revision
51 state reading changeset
52 state reading csrevision
53 return
54 }
55
56 typemethod load {} {
57 # Pass manager interface. Executed to load data computed by
58
--- tools/cvs2fossil/lib/c2f_pbreakrcycle.tcl
+++ tools/cvs2fossil/lib/c2f_pbreakrcycle.tcl
@@ -47,11 +47,11 @@
47 # Define the names and structure of the persistent state of
48 # this pass.
49
50 state reading revision
51 state reading changeset
52 state reading csitem
53 return
54 }
55
56 typemethod load {} {
57 # Pass manager interface. Executed to load data computed by
58
--- tools/cvs2fossil/lib/c2f_pbreakscycle.tcl
+++ tools/cvs2fossil/lib/c2f_pbreakscycle.tcl
@@ -46,11 +46,11 @@
4646
# Define the names and structure of the persistent state of
4747
# this pass.
4848
4949
state reading revision
5050
state reading changeset
51
- state reading csrevision
51
+ state reading csitem
5252
return
5353
}
5454
5555
typemethod load {} {
5656
# Pass manager interface. Executed to load data computed by
5757
--- tools/cvs2fossil/lib/c2f_pbreakscycle.tcl
+++ tools/cvs2fossil/lib/c2f_pbreakscycle.tcl
@@ -46,11 +46,11 @@
46 # Define the names and structure of the persistent state of
47 # this pass.
48
49 state reading revision
50 state reading changeset
51 state reading csrevision
52 return
53 }
54
55 typemethod load {} {
56 # Pass manager interface. Executed to load data computed by
57
--- tools/cvs2fossil/lib/c2f_pbreakscycle.tcl
+++ tools/cvs2fossil/lib/c2f_pbreakscycle.tcl
@@ -46,11 +46,11 @@
46 # Define the names and structure of the persistent state of
47 # this pass.
48
49 state reading revision
50 state reading changeset
51 state reading csitem
52 return
53 }
54
55 typemethod load {} {
56 # Pass manager interface. Executed to load data computed by
57
--- tools/cvs2fossil/lib/c2f_pinitcsets.tcl
+++ tools/cvs2fossil/lib/c2f_pinitcsets.tcl
@@ -87,16 +87,16 @@
8787
# from disparate sources the same id may have different
8888
# meaning, be in different changesets and so is formally not
8989
# unique. So we can only say that it is unique within the
9090
# changeset. The integrity module has stronger checks.
9191
92
- state writing csrevision {
92
+ state writing csitem {
9393
cid INTEGER NOT NULL REFERENCES changeset,
9494
pos INTEGER NOT NULL,
95
- rid INTEGER NOT NULL, -- REFERENCES revision|tag|branch
95
+ iid INTEGER NOT NULL, -- REFERENCES revision|tag|branch
9696
UNIQUE (cid, pos),
97
- UNIQUE (cid, rid)
97
+ UNIQUE (cid, iid)
9898
}
9999
100100
project::rev getcstypes
101101
return
102102
}
@@ -105,11 +105,11 @@
105105
# Pass manager interface. Executed to load data computed by
106106
# this pass into memory when this pass is skipped instead of
107107
# executed.
108108
109109
state reading changeset
110
- state reading csrevision
110
+ state reading csitem
111111
state reading cstype
112112
113113
# Need the types first, the constructor in the loop below uses
114114
# them to assert the correctness of type names.
115115
project::rev getcstypes
@@ -119,14 +119,14 @@
119119
FROM changeset C, cstype CS
120120
WHERE C.type = CS.tid
121121
ORDER BY C.cid
122122
}] {
123123
set r [project::rev %AUTO% [repository projectof $pid] $cstype $srcid [state run {
124
- SELECT C.rid
125
- FROM csrevision C
124
+ SELECT C.iid
125
+ FROM csitem C
126126
WHERE C.cid = $id
127
- ORDER BY C.pos
127
+ ORDER BY C.pos
128128
}] $id]
129129
}
130130
131131
project::rev loadcounter
132132
return
@@ -153,11 +153,11 @@
153153
# run passes, to remove all data of this pass from the state,
154154
# as being out of date.
155155
156156
state discard changeset
157157
state discard cstype
158
- state discard csrevision
158
+ state discard csitem
159159
return
160160
}
161161
162162
# # ## ### ##### ######## #############
163163
## Internal methods
164164
--- tools/cvs2fossil/lib/c2f_pinitcsets.tcl
+++ tools/cvs2fossil/lib/c2f_pinitcsets.tcl
@@ -87,16 +87,16 @@
87 # from disparate sources the same id may have different
88 # meaning, be in different changesets and so is formally not
89 # unique. So we can only say that it is unique within the
90 # changeset. The integrity module has stronger checks.
91
92 state writing csrevision {
93 cid INTEGER NOT NULL REFERENCES changeset,
94 pos INTEGER NOT NULL,
95 rid INTEGER NOT NULL, -- REFERENCES revision|tag|branch
96 UNIQUE (cid, pos),
97 UNIQUE (cid, rid)
98 }
99
100 project::rev getcstypes
101 return
102 }
@@ -105,11 +105,11 @@
105 # Pass manager interface. Executed to load data computed by
106 # this pass into memory when this pass is skipped instead of
107 # executed.
108
109 state reading changeset
110 state reading csrevision
111 state reading cstype
112
113 # Need the types first, the constructor in the loop below uses
114 # them to assert the correctness of type names.
115 project::rev getcstypes
@@ -119,14 +119,14 @@
119 FROM changeset C, cstype CS
120 WHERE C.type = CS.tid
121 ORDER BY C.cid
122 }] {
123 set r [project::rev %AUTO% [repository projectof $pid] $cstype $srcid [state run {
124 SELECT C.rid
125 FROM csrevision C
126 WHERE C.cid = $id
127 ORDER BY C.pos
128 }] $id]
129 }
130
131 project::rev loadcounter
132 return
@@ -153,11 +153,11 @@
153 # run passes, to remove all data of this pass from the state,
154 # as being out of date.
155
156 state discard changeset
157 state discard cstype
158 state discard csrevision
159 return
160 }
161
162 # # ## ### ##### ######## #############
163 ## Internal methods
164
--- tools/cvs2fossil/lib/c2f_pinitcsets.tcl
+++ tools/cvs2fossil/lib/c2f_pinitcsets.tcl
@@ -87,16 +87,16 @@
87 # from disparate sources the same id may have different
88 # meaning, be in different changesets and so is formally not
89 # unique. So we can only say that it is unique within the
90 # changeset. The integrity module has stronger checks.
91
92 state writing csitem {
93 cid INTEGER NOT NULL REFERENCES changeset,
94 pos INTEGER NOT NULL,
95 iid INTEGER NOT NULL, -- REFERENCES revision|tag|branch
96 UNIQUE (cid, pos),
97 UNIQUE (cid, iid)
98 }
99
100 project::rev getcstypes
101 return
102 }
@@ -105,11 +105,11 @@
105 # Pass manager interface. Executed to load data computed by
106 # this pass into memory when this pass is skipped instead of
107 # executed.
108
109 state reading changeset
110 state reading csitem
111 state reading cstype
112
113 # Need the types first, the constructor in the loop below uses
114 # them to assert the correctness of type names.
115 project::rev getcstypes
@@ -119,14 +119,14 @@
119 FROM changeset C, cstype CS
120 WHERE C.type = CS.tid
121 ORDER BY C.cid
122 }] {
123 set r [project::rev %AUTO% [repository projectof $pid] $cstype $srcid [state run {
124 SELECT C.iid
125 FROM csitem C
126 WHERE C.cid = $id
127 ORDER BY C.pos
128 }] $id]
129 }
130
131 project::rev loadcounter
132 return
@@ -153,11 +153,11 @@
153 # run passes, to remove all data of this pass from the state,
154 # as being out of date.
155
156 state discard changeset
157 state discard cstype
158 state discard csitem
159 return
160 }
161
162 # # ## ### ##### ######## #############
163 ## Internal methods
164
--- tools/cvs2fossil/lib/c2f_prev.tcl
+++ tools/cvs2fossil/lib/c2f_prev.tcl
@@ -301,12 +301,12 @@
301301
VALUES ($myid, $pid, $tid, $mysrcid);
302302
}
303303
304304
foreach iid $myitems {
305305
state run {
306
- INSERT INTO csrevision (cid, pos, rid)
307
- VALUES ($myid, $pos, $iid);
306
+ INSERT INTO csitem (cid, pos, iid)
307
+ VALUES ($myid, $pos, $iid);
308308
}
309309
incr pos
310310
}
311311
}
312312
return
@@ -315,12 +315,12 @@
315315
method timerange {} { return [$mytypeobj timerange $myitems] }
316316
317317
method drop {} {
318318
state transaction {
319319
state run {
320
- DELETE FROM changeset WHERE cid = $myid;
321
- DELETE FROM csrevision WHERE cid = $myid;
320
+ DELETE FROM changeset WHERE cid = $myid;
321
+ DELETE FROM csitem WHERE cid = $myid;
322322
}
323323
}
324324
foreach iid $myitems {
325325
set key [list $mytype $iid]
326326
unset myitemmap($key)
327327
--- tools/cvs2fossil/lib/c2f_prev.tcl
+++ tools/cvs2fossil/lib/c2f_prev.tcl
@@ -301,12 +301,12 @@
301 VALUES ($myid, $pid, $tid, $mysrcid);
302 }
303
304 foreach iid $myitems {
305 state run {
306 INSERT INTO csrevision (cid, pos, rid)
307 VALUES ($myid, $pos, $iid);
308 }
309 incr pos
310 }
311 }
312 return
@@ -315,12 +315,12 @@
315 method timerange {} { return [$mytypeobj timerange $myitems] }
316
317 method drop {} {
318 state transaction {
319 state run {
320 DELETE FROM changeset WHERE cid = $myid;
321 DELETE FROM csrevision WHERE cid = $myid;
322 }
323 }
324 foreach iid $myitems {
325 set key [list $mytype $iid]
326 unset myitemmap($key)
327
--- tools/cvs2fossil/lib/c2f_prev.tcl
+++ tools/cvs2fossil/lib/c2f_prev.tcl
@@ -301,12 +301,12 @@
301 VALUES ($myid, $pid, $tid, $mysrcid);
302 }
303
304 foreach iid $myitems {
305 state run {
306 INSERT INTO csitem (cid, pos, iid)
307 VALUES ($myid, $pos, $iid);
308 }
309 incr pos
310 }
311 }
312 return
@@ -315,12 +315,12 @@
315 method timerange {} { return [$mytypeobj timerange $myitems] }
316
317 method drop {} {
318 state transaction {
319 state run {
320 DELETE FROM changeset WHERE cid = $myid;
321 DELETE FROM csitem WHERE cid = $myid;
322 }
323 }
324 foreach iid $myitems {
325 set key [list $mytype $iid]
326 unset myitemmap($key)
327
--- tools/cvs2fossil/lib/c2f_prtopsort.tcl
+++ tools/cvs2fossil/lib/c2f_prtopsort.tcl
@@ -45,11 +45,11 @@
4545
# Define the names and structure of the persistent state of
4646
# this pass.
4747
4848
state reading revision
4949
state reading changeset
50
- state reading csrevision
50
+ state reading csitem
5151
5252
state writing csorder {
5353
-- Commit order of the revision changesets based on their
5454
-- dependencies
5555
5656
--- tools/cvs2fossil/lib/c2f_prtopsort.tcl
+++ tools/cvs2fossil/lib/c2f_prtopsort.tcl
@@ -45,11 +45,11 @@
45 # Define the names and structure of the persistent state of
46 # this pass.
47
48 state reading revision
49 state reading changeset
50 state reading csrevision
51
52 state writing csorder {
53 -- Commit order of the revision changesets based on their
54 -- dependencies
55
56
--- tools/cvs2fossil/lib/c2f_prtopsort.tcl
+++ tools/cvs2fossil/lib/c2f_prtopsort.tcl
@@ -45,11 +45,11 @@
45 # Define the names and structure of the persistent state of
46 # this pass.
47
48 state reading revision
49 state reading changeset
50 state reading csitem
51
52 state writing csorder {
53 -- Commit order of the revision changesets based on their
54 -- dependencies
55
56

Keyboard Shortcuts

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