417 (YesToAllNotification notNil and:[YesToAllNotification isHandled]) ifTrue:[ |
417 (YesToAllNotification notNil and:[YesToAllNotification isHandled]) ifTrue:[ |
418 answer := OptionBox |
418 answer := OptionBox |
419 request:msg withCRs |
419 request:msg withCRs |
420 label:'Really checkIn ?' |
420 label:'Really checkIn ?' |
421 form:(InfoBox iconBitmap) |
421 form:(InfoBox iconBitmap) |
422 buttonLabels:#('yes' 'yes to all' 'no' 'no to all') |
422 buttonLabels:#('Yes' 'Yes to all' 'No' 'No to all') |
423 values:#(true #yesToAll false #noToAll) |
423 values:#(true #yesToAll false #noToAll) |
424 default:#yesToAll |
424 default:#yesToAll |
425 onCancel:false. |
425 onCancel:false. |
426 answer == #yesToAll ifTrue:[ |
426 answer == #yesToAll ifTrue:[ |
427 YesToAllNotification queryWith:true. |
427 YesToAllNotification queryWith:true. |
1270 answer doCheckinWithoutAsking forceCheckIn resources rslt note |
1270 answer doCheckinWithoutAsking forceCheckIn resources rslt note |
1271 requiredPackage| |
1271 requiredPackage| |
1272 |
1272 |
1273 resources := ResourcePack for:self. |
1273 resources := ResourcePack for:self. |
1274 aClass isLoaded ifFalse:[ |
1274 aClass isLoaded ifFalse:[ |
1275 self warn:'please load the class first'. |
1275 self warn:(resources string:'Please load the %1-class first' with:aClass name). |
1276 ^ false. |
1276 ^ false. |
1277 ]. |
1277 ]. |
1278 |
1278 |
1279 className := aClass name. |
1279 className := aClass name. |
1280 |
1280 |
1371 Do you want to change it or check right into that container ?' |
1371 Do you want to change it or check right into that container ?' |
1372 with:className |
1372 with:className |
1373 with:module |
1373 with:module |
1374 with:package |
1374 with:package |
1375 with:fileName) |
1375 with:fileName) |
1376 labels:(resources array:#('cancel' 'check in' 'change')). |
1376 labels:(resources array:#('Cancel' 'Check in' 'Change')). |
1377 answer isNil ifTrue:[AbortSignal raise]. |
1377 answer isNil ifTrue:[AbortSignal raise]. |
1378 answer ifTrue:[ |
1378 answer ifTrue:[ |
1379 doCheckinWithoutAsking := false. |
1379 doCheckinWithoutAsking := false. |
1380 oldModule := module. |
1380 oldModule := module. |
1381 oldPackage := package. |
1381 oldPackage := package. |
1447 creatingNew ifFalse:[ |
1447 creatingNew ifFalse:[ |
1448 doCheckinWithoutAsking ifFalse:[ |
1448 doCheckinWithoutAsking ifFalse:[ |
1449 (Dialog |
1449 (Dialog |
1450 confirm:(resources string:'The repository already contains a container named "%3" in "%1/%2" !!\\Checkin %4 anyway ? (DANGER - be careful)' |
1450 confirm:(resources string:'The repository already contains a container named "%3" in "%1/%2" !!\\Checkin %4 anyway ? (DANGER - be careful)' |
1451 withArgs:(Array with:module with:package with:fileName with:className)) withCRs |
1451 withArgs:(Array with:module with:package with:fileName with:className)) withCRs |
1452 noLabel:'cancel') |
1452 noLabel:'Cancel') |
1453 ifFalse:[ |
1453 ifFalse:[ |
1454 ^ false |
1454 ^ false |
1455 ]. |
1455 ]. |
1456 ] |
1456 ] |
1457 ]. |
1457 ]. |
1458 |
1458 |
1459 true "doCheckinWithoutAsking" ifFalse:[ |
1459 true "doCheckinWithoutAsking" ifFalse:[ |
1460 answer := Dialog |
1460 answer := Dialog |
1461 confirmWithCancel:(resources string:'%1 does not have any (usable) revision info (#version method)\\Shall I create one ?' with:className) withCRs |
1461 confirmWithCancel:(resources string:'%1 does not have any (usable) revision info (#version method)\\Shall I create one ?' with:className) withCRs |
1462 labels:(resources array:#( 'cancel' 'no' 'yes')). |
1462 labels:(resources array:#( 'Cancel' 'No' 'Yes')). |
1463 answer isNil ifTrue:[^ false]. |
1463 answer isNil ifTrue:[^ false]. |
1464 ] ifTrue:[ |
1464 ] ifTrue:[ |
1465 answer := true. |
1465 answer := true. |
1466 ]. |
1466 ]. |
1467 answer ifTrue:[ |
1467 answer ifTrue:[ |
1475 "/ |
1475 "/ |
1476 "/ check for the module |
1476 "/ check for the module |
1477 "/ |
1477 "/ |
1478 (mgr checkForExistingModule:module) ifFalse:[ |
1478 (mgr checkForExistingModule:module) ifFalse:[ |
1479 (createDirs or:[creatingNew]) ifFalse:[ |
1479 (createDirs or:[creatingNew]) ifFalse:[ |
1480 self warn:(resources string:'a module named %1 does not exist in the source code management' with:module). |
1480 self warn:(resources string:'A module named %1 does not exist in the source code management' with:module). |
1481 ^ false |
1481 ^ false |
1482 ]. |
1482 ]. |
1483 (Dialog |
1483 (Dialog |
1484 confirm:(resources string:'%1 is a new module.\\create it ?' with:module) withCRs |
1484 confirm:(resources string:'%1 is a new module.\\create it ?' with:module) withCRs |
1485 noLabel:'cancel') |
1485 noLabel:'Cancel') |
1486 ifFalse:[ |
1486 ifFalse:[ |
1487 ^ false. |
1487 ^ false. |
1488 ]. |
1488 ]. |
1489 (mgr createModule:module) ifFalse:[ |
1489 (mgr createModule:module) ifFalse:[ |
1490 self warn:(resources string:'cannot create new module: %1' with:module). |
1490 self warn:(resources string:'Cannot create new module: %1' with:module). |
1491 ^ false. |
1491 ^ false. |
1492 ] |
1492 ] |
1493 ]. |
1493 ]. |
1494 LastModule := module. |
1494 LastModule := module. |
1495 |
1495 |
1502 self warn:(resources string:'a package named %1 does not exist module %2' with:module with:package). |
1502 self warn:(resources string:'a package named %1 does not exist module %2' with:module with:package). |
1503 ^ false |
1503 ^ false |
1504 ]. |
1504 ]. |
1505 (Dialog |
1505 (Dialog |
1506 confirm:(resources string:'%1 is a new package (in module %2).\\create it ?' with:package with:module) withCRs |
1506 confirm:(resources string:'%1 is a new package (in module %2).\\create it ?' with:package with:module) withCRs |
1507 noLabel:'cancel') |
1507 noLabel:'Cancel') |
1508 ifFalse:[ |
1508 ifFalse:[ |
1509 ^ false. |
1509 ^ false. |
1510 ]. |
1510 ]. |
1511 (mgr createModule:module package:package) ifFalse:[ |
1511 (mgr createModule:module package:package) ifFalse:[ |
1512 self warn:(resources string:'cannot create new package: %1 (in module %2)' with:package with:module). |
1512 self warn:(resources string:'Cannot create new package: %1 (in module %2)' with:package with:module). |
1513 ^ false. |
1513 ^ false. |
1514 ] |
1514 ] |
1515 ]. |
1515 ]. |
1516 LastPackage := package. |
1516 LastPackage := package. |
1517 |
1517 |
1518 "/ |
1518 "/ |
1519 "/ check for the container itself |
1519 "/ check for the container itself |
1520 "/ |
1520 "/ |
1521 (mgr checkForExistingContainerInModule:module package:package container:fileName) ifTrue:[ |
1521 (mgr checkForExistingContainerInModule:module package:package container:fileName) ifTrue:[ |
1522 creatingNew ifTrue:[ |
1522 creatingNew ifTrue:[ |
1523 self warn:(resources string:'container for %1 already exists in %2/%3.' with:fileName with:module with:package) withCRs. |
1523 self warn:(resources string:'Container for %1 already exists in %2/%3.' with:fileName with:module with:package) withCRs. |
1524 ]. |
1524 ]. |
1525 |
1525 |
1526 "/ (oldModule notNil |
1526 "/ (oldModule notNil |
1527 "/ and:[(oldModule ~= module) |
1527 "/ and:[(oldModule ~= module) |
1528 "/ or:[oldPackage ~= package |
1528 "/ or:[oldPackage ~= package |
1581 directory:package |
1581 directory:package |
1582 module:module |
1582 module:module |
1583 logMessage:msg |
1583 logMessage:msg |
1584 force:true) |
1584 force:true) |
1585 ifFalse:[ |
1585 ifFalse:[ |
1586 self warn:(resources string:'failed to check into existing container.'). |
1586 self warn:(resources string:'Failed to check into existing container.'). |
1587 ^ false. |
1587 ^ false. |
1588 ]. |
1588 ]. |
1589 ]. |
1589 ]. |
1590 ^ true |
1590 ^ true |
1591 ] ifFalse:[ |
1591 ] ifFalse:[ |
1592 (createContainer or:[creatingNew]) ifFalse:[ |
1592 (createContainer or:[creatingNew]) ifFalse:[ |
1593 (Dialog |
1593 (Dialog |
1594 confirm:(resources string:'no container exists for %1 in %2/%3\\create ?' |
1594 confirm:(resources string:'No container exists for %1 in %2/%3\\create ?' |
1595 with:fileName with:module with:package) withCRs |
1595 with:fileName with:module with:package) withCRs |
1596 noLabel:'cancel') ifFalse:[ |
1596 noLabel:'Cancel') ifFalse:[ |
1597 ^ false |
1597 ^ false |
1598 ] |
1598 ] |
1599 ] |
1599 ] |
1600 ]. |
1600 ]. |
1601 |
1601 |
1602 (mgr |
1602 (mgr |
1603 createContainerFor:aClass |
1603 createContainerFor:aClass |
1604 inModule:module |
1604 inModule:module |
1605 package:package |
1605 package:package |
1606 container:fileName) ifFalse:[ |
1606 container:fileName) ifFalse:[ |
1607 self warn:(resources string:'failed to create container.'). |
1607 self warn:(resources string:'Failed to create container.'). |
1608 ^ false. |
1608 ^ false. |
1609 ]. |
1609 ]. |
1610 ^ true |
1610 ^ true |
1611 ! |
1611 ! |
1612 |
1612 |