615 mgr := currentClass sourceCodeManager. |
615 mgr := currentClass sourceCodeManager. |
616 mgr isNil ifTrue:[ |
616 mgr isNil ifTrue:[ |
617 self warn:'No sourceCode manager - check settings'. |
617 self warn:'No sourceCode manager - check settings'. |
618 ^ self |
618 ^ self |
619 ]. |
619 ]. |
620 rev := currentClass binaryRevision. |
620 currentClass isLoaded ifTrue:[ |
621 rev2 := currentClass revision. |
621 rev := currentClass binaryRevision. |
622 rev isNil ifTrue:[ |
622 rev2 := currentClass revision. |
623 rev := rev2 |
623 rev isNil ifTrue:[ |
624 ]. |
624 rev := rev2 |
625 rev isNil ifTrue:[ |
625 ]. |
626 self warn:'Class seems to be not yet in the repository'. |
626 rev isNil ifTrue:[ |
627 ^ self |
627 self warn:'Class seems to be not yet in the repository'. |
|
628 ^ self |
|
629 ]. |
628 ]. |
630 ]. |
629 |
631 |
630 "/ |
632 "/ |
631 "/ class in repository - ask for revision |
633 "/ class in repository - ask for revision |
632 "/ |
634 "/ |
648 |
650 |
649 rev := SourceCodeManagerUtilities |
651 rev := SourceCodeManagerUtilities |
650 askForExistingRevision:msg |
652 askForExistingRevision:msg |
651 title:'CheckOut from repository' |
653 title:'CheckOut from repository' |
652 class:currentClass. |
654 class:currentClass. |
|
655 rev isNil ifTrue:[ |
|
656 "/ cancelled |
|
657 ^ self |
|
658 ]. |
653 |
659 |
654 (rev notNil or:[containerFile notNil]) ifTrue:[ |
660 (rev notNil or:[containerFile notNil]) ifTrue:[ |
655 rev notNil ifTrue:[ |
661 rev notNil ifTrue:[ |
656 rev withoutSpaces isEmpty ifTrue:[ |
662 rev withoutSpaces isEmpty ifTrue:[ |
657 msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'. |
663 msg := 'extracting newest %1 (' , (newestRev ? '???') , ')'. |
714 changed isEmpty ifTrue:[ |
728 changed isEmpty ifTrue:[ |
715 self information:'Versions are identical.'. |
729 self information:'Versions are identical.'. |
716 ^ self |
730 ^ self |
717 ]. |
731 ]. |
718 msg := 'Load repository version ?'. |
732 msg := 'Load repository version ?'. |
719 msg := msg , '\\This will undo all your changes made to the class.'. |
733 msg := msg , '\\This will undo your changes made to the class (if any were made).'. |
720 labels := #('cancel' 'load'). |
734 labels := #('cancel' 'load'). |
721 values := #(nil #load). |
735 values := #(nil #load). |
722 ] ifFalse:[ |
736 ] ifFalse:[ |
723 changed isEmpty ifTrue:[ |
737 changed isEmpty ifTrue:[ |
724 msg := 'Load repository version ?'. |
738 msg := 'Load repository version ?'. |
725 msg := msg , '\\This will load methods which are not present in the class.'. |
739 msg := msg , '\\This will load methods which are not present in the class.'. |
726 labels := #('cancel' 'load'). |
740 labels := #('cancel' 'load'). |
727 values := #(nil #load). |
741 values := #(nil #load). |
728 ] ifFalse:[ |
742 ] ifFalse:[ |
729 msg := 'Load repository version, or merge it into your current version ?'. |
743 msg := 'Load repository version, or merge it into your current version ?'. |
730 msg := msg , '\\Load will undo all your changes made to the class;'. |
744 msg := msg , '\\Load will undo your changes made to the class (if any were made);'. |
731 msg := msg , '\Merge will only load methods which are not present in the class.'. |
745 msg := msg , '\Merge will only load methods which are not present in the class.'. |
732 ]. |
746 ]. |
733 ] |
747 ] |
734 ] ifFalse:[ |
748 ] ifFalse:[ |
735 onlyInRep isEmpty ifTrue:[ |
749 onlyInRep isEmpty ifTrue:[ |
736 msg := 'Load repository version ?'. |
750 msg := 'Load repository version ?'. |
737 msg := msg , '\\This will undo all your changes made to the class,'. |
751 msg := msg , '\\This will undo your changes made to the class (if any were made),'. |
738 msg := msg , '\and remove methods which are not present in the repository version.'. |
752 msg := msg , '\and remove methods which are not present in the repository version.'. |
739 labels := #('cancel' 'load'). |
753 labels := #('cancel' 'load'). |
740 values := #(nil #load). |
754 values := #(nil #load). |
741 ] ifFalse:[ |
755 ] ifFalse:[ |
742 msg := 'Load repository version, or merge it into your current version ?'. |
756 msg := 'Load repository version, or merge it into your current version ?'. |
743 msg := msg , '\\Load will undo all your changes made to the class;'. |
757 msg := msg , '\\Load will undo your changes made to the class (if any were made);'. |
744 msg := msg , '\Merge will only load methods which are not present in the class.'. |
758 msg := msg , '\Merge will only load methods which are not present in the class.'. |
745 ] |
759 ] |
746 ]. |
760 ]. |
747 answer := (Dialog confirmWithCancel:msg withCRs |
761 answer := (Dialog confirmWithCancel:msg withCRs |
748 labels:(resources array:labels) |
762 labels:(resources array:labels) |