Fossil SCM
Added another consistency check, and revised the comments to use the more exact terms for the various relationships.
Commit
70d4a811624e068afb3e854b1fc1d34e7388b5ea
Parent
2e7cbb2829f167c…
1 file changed
+43
-31
+43
-31
| --- tools/cvs2fossil/lib/c2f_pcollrev.tcl | ||
| +++ tools/cvs2fossil/lib/c2f_pcollrev.tcl | ||
| @@ -363,23 +363,37 @@ | ||
| 363 | 363 | WHERE R.mid = M.mid |
| 364 | 364 | AND R.lod != M.bid |
| 365 | 365 | AND R.fid = F.fid |
| 366 | 366 | ; |
| 367 | 367 | } |
| 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. | |
| 370 | 370 | 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} { | |
| 373 | 373 | SELECT F.name, R.rev |
| 374 | 374 | FROM revision R, revision C, file F |
| 375 | 375 | WHERE R.fid = F.fid |
| 376 | 376 | AND R.child IS NOT NULL |
| 377 | 377 | AND R.child = C.rid |
| 378 | 378 | AND C.fid != R.fid |
| 379 | 379 | ; |
| 380 | 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 | + } | |
| 381 | 395 | # Find all revisions with a non-NTDB child which disagrees |
| 382 | 396 | # about the file they belong to. |
| 383 | 397 | Check \ |
| 384 | 398 | {Revisions and their non-NTDB children have to be in the same file} \ |
| 385 | 399 | {disagrees with its non-NTDB child about the owning file} { |
| @@ -389,40 +403,40 @@ | ||
| 389 | 403 | AND R.dbchild IS NOT NULL |
| 390 | 404 | AND R.dbchild = C.rid |
| 391 | 405 | AND C.fid != R.fid |
| 392 | 406 | ; |
| 393 | 407 | } |
| 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. | |
| 396 | 410 | 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} { | |
| 399 | 413 | SELECT F.name, R.rev |
| 400 | 414 | FROM revision R, revision C, file F |
| 401 | 415 | WHERE R.fid = F.fid |
| 402 | 416 | AND R.child IS NOT NULL |
| 403 | 417 | AND R.child = C.rid |
| 404 | 418 | AND C.parent != R.rid |
| 405 | 419 | ; |
| 406 | 420 | } |
| 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. | |
| 409 | 423 | 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} { | |
| 412 | 426 | SELECT F.name, R.rev |
| 413 | 427 | FROM revision R, revision C, file F |
| 414 | 428 | WHERE R.fid = F.fid |
| 415 | 429 | AND R.child IS NOT NULL |
| 416 | 430 | AND R.child = C.rid |
| 417 | 431 | AND C.bparent IS NOT NULL |
| 418 | 432 | ; |
| 419 | 433 | } |
| 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. | |
| 422 | 436 | Check \ |
| 423 | - {Revisions have to be children of their parents} \ | |
| 437 | + {Revisions have to be primary children of their parents, if any} \ | |
| 424 | 438 | {is not the child of its parent} { |
| 425 | 439 | SELECT F.name, R.rev |
| 426 | 440 | FROM revision R, revision P, file F |
| 427 | 441 | WHERE R.fid = F.fid |
| 428 | 442 | AND R.bparent IS NULL |
| @@ -429,12 +443,12 @@ | ||
| 429 | 443 | AND R.parent IS NOT NULL |
| 430 | 444 | AND R.parent = P.rid |
| 431 | 445 | AND P.child != R.rid |
| 432 | 446 | ; |
| 433 | 447 | } |
| 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. | |
| 436 | 450 | Check \ |
| 437 | 451 | {Branch starting revisions have to have a parent} \ |
| 438 | 452 | {at the beginning of its branch has no parent} { |
| 439 | 453 | SELECT F.name, R.rev |
| 440 | 454 | FROM revision R, file F |
| @@ -441,15 +455,15 @@ | ||
| 441 | 455 | WHERE R.fid = F.fid |
| 442 | 456 | AND R.bparent IS NOT NULL |
| 443 | 457 | AND R.parent IS NULL |
| 444 | 458 | ; |
| 445 | 459 | } |
| 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. | |
| 448 | 462 | 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} { | |
| 451 | 465 | SELECT F.name, R.rev |
| 452 | 466 | FROM revision R, revision P, file F |
| 453 | 467 | WHERE R.fid = F.fid |
| 454 | 468 | AND R.bparent IS NOT NULL |
| 455 | 469 | AND R.parent IS NOT NULL |
| @@ -481,13 +495,12 @@ | ||
| 481 | 495 | ; |
| 482 | 496 | } |
| 483 | 497 | # Find all revisions with a child which disagrees about the |
| 484 | 498 | # line of development they belong to. |
| 485 | 499 | 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} { | |
| 489 | 502 | SELECT F.name, R.rev |
| 490 | 503 | FROM revision R, revision C, file F |
| 491 | 504 | WHERE R.fid = F.fid |
| 492 | 505 | AND R.child IS NOT NULL |
| 493 | 506 | AND R.child = C.rid |
| @@ -497,33 +510,32 @@ | ||
| 497 | 510 | # Find all revisions with a non-NTDB child which agrees about |
| 498 | 511 | # the line of development they belong to. |
| 499 | 512 | Check \ |
| 500 | 513 | {NTDB and trunk revisions have to be in different LODs} \ |
| 501 | 514 | {on NTDB and its non-NTDB child wrongly agree about their LOD} { |
| 502 | - | |
| 503 | 515 | SELECT F.name, R.rev |
| 504 | 516 | FROM revision R, revision C, file F |
| 505 | 517 | WHERE R.fid = F.fid |
| 506 | 518 | AND R.dbchild IS NOT NULL |
| 507 | 519 | AND R.dbchild = C.rid |
| 508 | 520 | AND C.lod = R.lod |
| 509 | 521 | ; |
| 510 | 522 | } |
| 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. | |
| 513 | 525 | 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} { | |
| 516 | 528 | SELECT F.name, R.rev |
| 517 | 529 | FROM revision R, file F |
| 518 | 530 | WHERE R.fid = F.fid |
| 519 | 531 | AND R.bparent IS NOT NULL |
| 520 | 532 | AND R.lod != R.bparent |
| 521 | 533 | ; |
| 522 | 534 | } |
| 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. | |
| 525 | 537 | Check \ |
| 526 | 538 | {Revisions and their branch children have to be in different LODs} \ |
| 527 | 539 | {at the beginning of its branch and its parent wrongly agree about their LOD} { |
| 528 | 540 | SELECT F.name, R.rev |
| 529 | 541 | FROM revision R, revision P, file F |
| 530 | 542 |
| --- 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 |