--- a/mercurial/HGRepository.st Fri Dec 14 17:53:21 2012 +0100
+++ b/mercurial/HGRepository.st Fri Dec 14 20:19:43 2012 +0100
@@ -2,7 +2,7 @@
Object subclass:#HGRepository
instanceVariableNames:'uuid path wc changesets branches config'
- classVariableNames:''
+ classVariableNames:'Cache'
poolDictionaries:''
category:'SCM-Mercurial-Core'
!
@@ -15,12 +15,28 @@
!
+!HGRepository class methodsFor:'initialization'!
+
+initialize
+ "Invoked at system start or when the class is dynamically loaded."
+
+ "/ please change as required (and remove this comment)
+
+ Cache := CacheDictionary new: 8
+
+ "Modified: / 14-12-2012 / 19:31:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
!HGRepository class methodsFor:'instance creation'!
on: aStringOrFilename
- ^self new initializeOn: aStringOrFilename
+ | path |
+
+ path := aStringOrFilename asFilename.
+ ^Cache at: path ifAbsentPut:[self new initializeOn: path]
"Created: / 17-10-2012 / 13:30:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-12-2012 / 19:33:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!HGRepository class methodsFor:'cloning'!
@@ -266,7 +282,7 @@
config := HGConfig new setRepository: self.
"Created: / 17-10-2012 / 13:35:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 06-12-2012 / 20:21:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-12-2012 / 19:33:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!HGRepository methodsFor:'operations'!
@@ -423,3 +439,5 @@
version_SVN
^ '§Id:: §'
! !
+
+HGRepository initialize!