--- a/SourceCodeManagerUtilities.st Tue Nov 14 18:00:19 2000 +0100
+++ b/SourceCodeManagerUtilities.st Tue Nov 14 18:15:57 2000 +0100
@@ -617,14 +617,16 @@
self warn:'No sourceCode manager - check settings'.
^ self
].
- rev := currentClass binaryRevision.
- rev2 := currentClass revision.
- rev isNil ifTrue:[
- rev := rev2
- ].
- rev isNil ifTrue:[
- self warn:'Class seems to be not yet in the repository'.
- ^ self
+ currentClass isLoaded ifTrue:[
+ rev := currentClass binaryRevision.
+ rev2 := currentClass revision.
+ rev isNil ifTrue:[
+ rev := rev2
+ ].
+ rev isNil ifTrue:[
+ self warn:'Class seems to be not yet in the repository'.
+ ^ self
+ ].
].
"/
@@ -650,6 +652,10 @@
askForExistingRevision:msg
title:'CheckOut from repository'
class:currentClass.
+ rev isNil ifTrue:[
+ "/ cancelled
+ ^ self
+ ].
(rev notNil or:[containerFile notNil]) ifTrue:[
rev notNil ifTrue:[
@@ -682,6 +688,14 @@
].
aStream close.
+ currentClass isLoaded ifFalse:[
+ rev = newestRev ifTrue:[
+ currentClass autoload.
+ ] ifFalse:[
+ sourceToLoad readStream fileIn.
+ ].
+ ^ self.
+ ].
self activityNotification:'generating current source...'.
@@ -716,7 +730,7 @@
^ self
].
msg := 'Load repository version ?'.
- msg := msg , '\\This will undo all your changes made to the class.'.
+ msg := msg , '\\This will undo your changes made to the class (if any were made).'.
labels := #('cancel' 'load').
values := #(nil #load).
] ifFalse:[
@@ -727,20 +741,20 @@
values := #(nil #load).
] ifFalse:[
msg := 'Load repository version, or merge it into your current version ?'.
- msg := msg , '\\Load will undo all your changes made to the class;'.
+ msg := msg , '\\Load will undo your changes made to the class (if any were made);'.
msg := msg , '\Merge will only load methods which are not present in the class.'.
].
]
] ifFalse:[
onlyInRep isEmpty ifTrue:[
msg := 'Load repository version ?'.
- msg := msg , '\\This will undo all your changes made to the class,'.
+ msg := msg , '\\This will undo your changes made to the class (if any were made),'.
msg := msg , '\and remove methods which are not present in the repository version.'.
labels := #('cancel' 'load').
values := #(nil #load).
] ifFalse:[
msg := 'Load repository version, or merge it into your current version ?'.
- msg := msg , '\\Load will undo all your changes made to the class;'.
+ msg := msg , '\\Load will undo your changes made to the class (if any were made);'.
msg := msg , '\Merge will only load methods which are not present in the class.'.
]
].
@@ -1450,5 +1464,5 @@
!SourceCodeManagerUtilities class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.29 2000-11-14 16:14:30 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/SourceCodeManagerUtilities.st,v 1.30 2000-11-14 17:15:57 cg Exp $'
! !