Fossil SCM

Added another consistency check, and revised the comments to use the more exact terms for the various relationships.

aku 2007-10-26 06:53 trunk
Commit 70d4a811624e068afb3e854b1fc1d34e7388b5ea
--- tools/cvs2fossil/lib/c2f_pcollrev.tcl
+++ tools/cvs2fossil/lib/c2f_pcollrev.tcl
@@ -363,23 +363,37 @@
363363
WHERE R.mid = M.mid
364364
AND R.lod != M.bid
365365
AND R.fid = F.fid
366366
;
367367
}
368
- # Find all revisions with a child which disagrees about the
369
- # file they belong to.
368
+ # Find all revisions with a primary child which disagrees
369
+ # about the file they belong to.
370370
Check \
371
- {Revisions and their children have to be in the same file} \
372
- {disagrees with its child about the owning file} {
371
+ {Revisions and their primary children have to be in the same file} \
372
+ {disagrees with its primary child about the owning file} {
373373
SELECT F.name, R.rev
374374
FROM revision R, revision C, file F
375375
WHERE R.fid = F.fid
376376
AND R.child IS NOT NULL
377377
AND R.child = C.rid
378378
AND C.fid != R.fid
379379
;
380380
}
381
+
382
+ # Find all revisions with a branch parent symbol whose parent
383
+ # disagrees about the file they belong to.
384
+ Check \
385
+ {Revisions and their branch children have to be in the same file} \
386
+ {at the beginning of its branch and its parent disagree about the owning file} {
387
+ SELECT F.name, R.rev
388
+ FROM revision R, revision P, file F
389
+ WHERE R.fid = F.fid
390
+ AND R.bparent IS NOT NULL
391
+ AND R.parent = P.rid
392
+ AND R.fid != P.fid
393
+ ;
394
+ }
381395
# Find all revisions with a non-NTDB child which disagrees
382396
# about the file they belong to.
383397
Check \
384398
{Revisions and their non-NTDB children have to be in the same file} \
385399
{disagrees with its non-NTDB child about the owning file} {
@@ -389,40 +403,40 @@
389403
AND R.dbchild IS NOT NULL
390404
AND R.dbchild = C.rid
391405
AND C.fid != R.fid
392406
;
393407
}
394
- # Find all revisions which have a child, but the child does
395
- # not have them as parent.
408
+ # Find all revisions which have a primary child, but the child
409
+ # does not have them as parent.
396410
Check \
397
- {Revisions have to be parents of their children} \
398
- {is not the parent of its child} {
411
+ {Revisions have to be parents of their primary children} \
412
+ {is not the parent of its primary child} {
399413
SELECT F.name, R.rev
400414
FROM revision R, revision C, file F
401415
WHERE R.fid = F.fid
402416
AND R.child IS NOT NULL
403417
AND R.child = C.rid
404418
AND C.parent != R.rid
405419
;
406420
}
407
- # Find all revisions which have a child, but the child has a
408
- # branch parent.
421
+ # Find all revisions which have a primrary child, but the
422
+ # child has a branch parent symbol making them brach starters.
409423
Check \
410
- {Revision's children must not be branch starters} \
411
- {is parent of a child which is the beginning of a branch} {
424
+ {Primary children of revisions must not start branches} \
425
+ {is parent of a primary child which is the beginning of a branch} {
412426
SELECT F.name, R.rev
413427
FROM revision R, revision C, file F
414428
WHERE R.fid = F.fid
415429
AND R.child IS NOT NULL
416430
AND R.child = C.rid
417431
AND C.bparent IS NOT NULL
418432
;
419433
}
420
- # Find all revisions without branch parent which have a
421
- # parent, but the parent does not have them as child.
434
+ # Find all revisions without branch parent symbol which have a
435
+ # parent, but the parent does not have them as primary child.
422436
Check \
423
- {Revisions have to be children of their parents} \
437
+ {Revisions have to be primary children of their parents, if any} \
424438
{is not the child of its parent} {
425439
SELECT F.name, R.rev
426440
FROM revision R, revision P, file F
427441
WHERE R.fid = F.fid
428442
AND R.bparent IS NULL
@@ -429,12 +443,12 @@
429443
AND R.parent IS NOT NULL
430444
AND R.parent = P.rid
431445
AND P.child != R.rid
432446
;
433447
}
434
- # Find all revisions with a branch parent which do not have a
435
- # parent.
448
+ # Find all revisions with a branch parent symbol which do not
449
+ # have a parent.
436450
Check \
437451
{Branch starting revisions have to have a parent} \
438452
{at the beginning of its branch has no parent} {
439453
SELECT F.name, R.rev
440454
FROM revision R, file F
@@ -441,15 +455,15 @@
441455
WHERE R.fid = F.fid
442456
AND R.bparent IS NOT NULL
443457
AND R.parent IS NULL
444458
;
445459
}
446
- # Find all revisions with a branch parent whose parent has
447
- # them as child.
460
+ # Find all revisions with a branch parent symbol whose parent
461
+ # has them as primary child.
448462
Check \
449
- {Branch starting revisions must not be children of their parents} \
450
- {at the beginning of its branch is the child of its parent} {
463
+ {Branch starting revisions must not be primary children of their parents} \
464
+ {at the beginning of its branch is the primary child of its parent} {
451465
SELECT F.name, R.rev
452466
FROM revision R, revision P, file F
453467
WHERE R.fid = F.fid
454468
AND R.bparent IS NOT NULL
455469
AND R.parent IS NOT NULL
@@ -481,13 +495,12 @@
481495
;
482496
}
483497
# Find all revisions with a child which disagrees about the
484498
# line of development they belong to.
485499
Check \
486
- {Revisions and their children have to be in the same LOD} \
487
- {and its child disagree about their LOD} {
488
-
500
+ {Revisions and their primary children have to be in the same LOD} \
501
+ {and its primary child disagree about their LOD} {
489502
SELECT F.name, R.rev
490503
FROM revision R, revision C, file F
491504
WHERE R.fid = F.fid
492505
AND R.child IS NOT NULL
493506
AND R.child = C.rid
@@ -497,33 +510,32 @@
497510
# Find all revisions with a non-NTDB child which agrees about
498511
# the line of development they belong to.
499512
Check \
500513
{NTDB and trunk revisions have to be in different LODs} \
501514
{on NTDB and its non-NTDB child wrongly agree about their LOD} {
502
-
503515
SELECT F.name, R.rev
504516
FROM revision R, revision C, file F
505517
WHERE R.fid = F.fid
506518
AND R.dbchild IS NOT NULL
507519
AND R.dbchild = C.rid
508520
AND C.lod = R.lod
509521
;
510522
}
511
- # Find all revisions with a branch parent which is not their
512
- # line of development.
523
+ # Find all revisions with a branch parent symbol which is not
524
+ # their LOD.
513525
Check \
514
- {Branch starting revisions have to have their LOD as branch parent} \
515
- {at the beginning of its branch does not have the branch as its LOD} {
526
+ {Branch starting revisions have to have their LOD as branch parent symbol} \
527
+ {at the beginning of its branch does not have the branch symbol as its LOD} {
516528
SELECT F.name, R.rev
517529
FROM revision R, file F
518530
WHERE R.fid = F.fid
519531
AND R.bparent IS NOT NULL
520532
AND R.lod != R.bparent
521533
;
522534
}
523
- # Find all revisions with a branch parent whose parent is in
524
- # the same line of development.
535
+ # Find all revisions with a branch parent symbol whose parent
536
+ # is in the same line of development.
525537
Check \
526538
{Revisions and their branch children have to be in different LODs} \
527539
{at the beginning of its branch and its parent wrongly agree about their LOD} {
528540
SELECT F.name, R.rev
529541
FROM revision R, revision P, file F
530542
--- tools/cvs2fossil/lib/c2f_pcollrev.tcl
+++ tools/cvs2fossil/lib/c2f_pcollrev.tcl
@@ -363,23 +363,37 @@
363 WHERE R.mid = M.mid
364 AND R.lod != M.bid
365 AND R.fid = F.fid
366 ;
367 }
368 # Find all revisions with a child which disagrees about the
369 # file they belong to.
370 Check \
371 {Revisions and their children have to be in the same file} \
372 {disagrees with its child about the owning file} {
373 SELECT F.name, R.rev
374 FROM revision R, revision C, file F
375 WHERE R.fid = F.fid
376 AND R.child IS NOT NULL
377 AND R.child = C.rid
378 AND C.fid != R.fid
379 ;
380 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
381 # Find all revisions with a non-NTDB child which disagrees
382 # about the file they belong to.
383 Check \
384 {Revisions and their non-NTDB children have to be in the same file} \
385 {disagrees with its non-NTDB child about the owning file} {
@@ -389,40 +403,40 @@
389 AND R.dbchild IS NOT NULL
390 AND R.dbchild = C.rid
391 AND C.fid != R.fid
392 ;
393 }
394 # Find all revisions which have a child, but the child does
395 # not have them as parent.
396 Check \
397 {Revisions have to be parents of their children} \
398 {is not the parent of its child} {
399 SELECT F.name, R.rev
400 FROM revision R, revision C, file F
401 WHERE R.fid = F.fid
402 AND R.child IS NOT NULL
403 AND R.child = C.rid
404 AND C.parent != R.rid
405 ;
406 }
407 # Find all revisions which have a child, but the child has a
408 # branch parent.
409 Check \
410 {Revision's children must not be branch starters} \
411 {is parent of a child which is the beginning of a branch} {
412 SELECT F.name, R.rev
413 FROM revision R, revision C, file F
414 WHERE R.fid = F.fid
415 AND R.child IS NOT NULL
416 AND R.child = C.rid
417 AND C.bparent IS NOT NULL
418 ;
419 }
420 # Find all revisions without branch parent which have a
421 # parent, but the parent does not have them as child.
422 Check \
423 {Revisions have to be children of their parents} \
424 {is not the child of its parent} {
425 SELECT F.name, R.rev
426 FROM revision R, revision P, file F
427 WHERE R.fid = F.fid
428 AND R.bparent IS NULL
@@ -429,12 +443,12 @@
429 AND R.parent IS NOT NULL
430 AND R.parent = P.rid
431 AND P.child != R.rid
432 ;
433 }
434 # Find all revisions with a branch parent which do not have a
435 # parent.
436 Check \
437 {Branch starting revisions have to have a parent} \
438 {at the beginning of its branch has no parent} {
439 SELECT F.name, R.rev
440 FROM revision R, file F
@@ -441,15 +455,15 @@
441 WHERE R.fid = F.fid
442 AND R.bparent IS NOT NULL
443 AND R.parent IS NULL
444 ;
445 }
446 # Find all revisions with a branch parent whose parent has
447 # them as child.
448 Check \
449 {Branch starting revisions must not be children of their parents} \
450 {at the beginning of its branch is the child of its parent} {
451 SELECT F.name, R.rev
452 FROM revision R, revision P, file F
453 WHERE R.fid = F.fid
454 AND R.bparent IS NOT NULL
455 AND R.parent IS NOT NULL
@@ -481,13 +495,12 @@
481 ;
482 }
483 # Find all revisions with a child which disagrees about the
484 # line of development they belong to.
485 Check \
486 {Revisions and their children have to be in the same LOD} \
487 {and its child disagree about their LOD} {
488
489 SELECT F.name, R.rev
490 FROM revision R, revision C, file F
491 WHERE R.fid = F.fid
492 AND R.child IS NOT NULL
493 AND R.child = C.rid
@@ -497,33 +510,32 @@
497 # Find all revisions with a non-NTDB child which agrees about
498 # the line of development they belong to.
499 Check \
500 {NTDB and trunk revisions have to be in different LODs} \
501 {on NTDB and its non-NTDB child wrongly agree about their LOD} {
502
503 SELECT F.name, R.rev
504 FROM revision R, revision C, file F
505 WHERE R.fid = F.fid
506 AND R.dbchild IS NOT NULL
507 AND R.dbchild = C.rid
508 AND C.lod = R.lod
509 ;
510 }
511 # Find all revisions with a branch parent which is not their
512 # line of development.
513 Check \
514 {Branch starting revisions have to have their LOD as branch parent} \
515 {at the beginning of its branch does not have the branch as its LOD} {
516 SELECT F.name, R.rev
517 FROM revision R, file F
518 WHERE R.fid = F.fid
519 AND R.bparent IS NOT NULL
520 AND R.lod != R.bparent
521 ;
522 }
523 # Find all revisions with a branch parent whose parent is in
524 # the same line of development.
525 Check \
526 {Revisions and their branch children have to be in different LODs} \
527 {at the beginning of its branch and its parent wrongly agree about their LOD} {
528 SELECT F.name, R.rev
529 FROM revision R, revision P, file F
530
--- tools/cvs2fossil/lib/c2f_pcollrev.tcl
+++ tools/cvs2fossil/lib/c2f_pcollrev.tcl
@@ -363,23 +363,37 @@
363 WHERE R.mid = M.mid
364 AND R.lod != M.bid
365 AND R.fid = F.fid
366 ;
367 }
368 # Find all revisions with a primary child which disagrees
369 # about the file they belong to.
370 Check \
371 {Revisions and their primary children have to be in the same file} \
372 {disagrees with its primary child about the owning file} {
373 SELECT F.name, R.rev
374 FROM revision R, revision C, file F
375 WHERE R.fid = F.fid
376 AND R.child IS NOT NULL
377 AND R.child = C.rid
378 AND C.fid != R.fid
379 ;
380 }
381
382 # Find all revisions with a branch parent symbol whose parent
383 # disagrees about the file they belong to.
384 Check \
385 {Revisions and their branch children have to be in the same file} \
386 {at the beginning of its branch and its parent disagree about the owning file} {
387 SELECT F.name, R.rev
388 FROM revision R, revision P, file F
389 WHERE R.fid = F.fid
390 AND R.bparent IS NOT NULL
391 AND R.parent = P.rid
392 AND R.fid != P.fid
393 ;
394 }
395 # Find all revisions with a non-NTDB child which disagrees
396 # about the file they belong to.
397 Check \
398 {Revisions and their non-NTDB children have to be in the same file} \
399 {disagrees with its non-NTDB child about the owning file} {
@@ -389,40 +403,40 @@
403 AND R.dbchild IS NOT NULL
404 AND R.dbchild = C.rid
405 AND C.fid != R.fid
406 ;
407 }
408 # Find all revisions which have a primary child, but the child
409 # does not have them as parent.
410 Check \
411 {Revisions have to be parents of their primary children} \
412 {is not the parent of its primary child} {
413 SELECT F.name, R.rev
414 FROM revision R, revision C, file F
415 WHERE R.fid = F.fid
416 AND R.child IS NOT NULL
417 AND R.child = C.rid
418 AND C.parent != R.rid
419 ;
420 }
421 # Find all revisions which have a primrary child, but the
422 # child has a branch parent symbol making them brach starters.
423 Check \
424 {Primary children of revisions must not start branches} \
425 {is parent of a primary child which is the beginning of a branch} {
426 SELECT F.name, R.rev
427 FROM revision R, revision C, file F
428 WHERE R.fid = F.fid
429 AND R.child IS NOT NULL
430 AND R.child = C.rid
431 AND C.bparent IS NOT NULL
432 ;
433 }
434 # Find all revisions without branch parent symbol which have a
435 # parent, but the parent does not have them as primary child.
436 Check \
437 {Revisions have to be primary children of their parents, if any} \
438 {is not the child of its parent} {
439 SELECT F.name, R.rev
440 FROM revision R, revision P, file F
441 WHERE R.fid = F.fid
442 AND R.bparent IS NULL
@@ -429,12 +443,12 @@
443 AND R.parent IS NOT NULL
444 AND R.parent = P.rid
445 AND P.child != R.rid
446 ;
447 }
448 # Find all revisions with a branch parent symbol which do not
449 # have a parent.
450 Check \
451 {Branch starting revisions have to have a parent} \
452 {at the beginning of its branch has no parent} {
453 SELECT F.name, R.rev
454 FROM revision R, file F
@@ -441,15 +455,15 @@
455 WHERE R.fid = F.fid
456 AND R.bparent IS NOT NULL
457 AND R.parent IS NULL
458 ;
459 }
460 # Find all revisions with a branch parent symbol whose parent
461 # has them as primary child.
462 Check \
463 {Branch starting revisions must not be primary children of their parents} \
464 {at the beginning of its branch is the primary child of its parent} {
465 SELECT F.name, R.rev
466 FROM revision R, revision P, file F
467 WHERE R.fid = F.fid
468 AND R.bparent IS NOT NULL
469 AND R.parent IS NOT NULL
@@ -481,13 +495,12 @@
495 ;
496 }
497 # Find all revisions with a child which disagrees about the
498 # line of development they belong to.
499 Check \
500 {Revisions and their primary children have to be in the same LOD} \
501 {and its primary child disagree about their LOD} {
 
502 SELECT F.name, R.rev
503 FROM revision R, revision C, file F
504 WHERE R.fid = F.fid
505 AND R.child IS NOT NULL
506 AND R.child = C.rid
@@ -497,33 +510,32 @@
510 # Find all revisions with a non-NTDB child which agrees about
511 # the line of development they belong to.
512 Check \
513 {NTDB and trunk revisions have to be in different LODs} \
514 {on NTDB and its non-NTDB child wrongly agree about their LOD} {
 
515 SELECT F.name, R.rev
516 FROM revision R, revision C, file F
517 WHERE R.fid = F.fid
518 AND R.dbchild IS NOT NULL
519 AND R.dbchild = C.rid
520 AND C.lod = R.lod
521 ;
522 }
523 # Find all revisions with a branch parent symbol which is not
524 # their LOD.
525 Check \
526 {Branch starting revisions have to have their LOD as branch parent symbol} \
527 {at the beginning of its branch does not have the branch symbol as its LOD} {
528 SELECT F.name, R.rev
529 FROM revision R, file F
530 WHERE R.fid = F.fid
531 AND R.bparent IS NOT NULL
532 AND R.lod != R.bparent
533 ;
534 }
535 # Find all revisions with a branch parent symbol whose parent
536 # is in the same line of development.
537 Check \
538 {Revisions and their branch children have to be in different LODs} \
539 {at the beginning of its branch and its parent wrongly agree about their LOD} {
540 SELECT F.name, R.rev
541 FROM revision R, revision P, file F
542

Keyboard Shortcuts

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