AbstractSourceCodeManager.st
changeset 4554 9d76940fef4c
parent 4552 51e05f330692
child 4558 3d5a033d3b5d
equal deleted inserted replaced
4553:2cbcb4f949e6 4554:9d76940fef4c
   136 validateCacheDirPath
   136 validateCacheDirPath
   137     (CacheDirectoryName isNil 
   137     (CacheDirectoryName isNil 
   138     or:[CacheDirectoryName asFilename exists not]) ifTrue:[
   138     or:[CacheDirectoryName asFilename exists not]) ifTrue:[
   139         self initCacheDirPath   
   139         self initCacheDirPath   
   140     ].
   140     ].
   141 ! !
       
   142 
       
   143 !AbstractSourceCodeManager class methodsFor:'* uncategorized *'!
       
   144 
       
   145 repositoryTopDirectoryFromSCMRoot
       
   146     "return the top of the repository."
       
   147 
       
   148     ^ self subclassResponsibility
       
   149 
       
   150     "Created: / 18-05-2018 / 12:30:23 / Stefan Vogel"
       
   151 ! !
   141 ! !
   152 
   142 
   153 !AbstractSourceCodeManager class methodsFor:'accessing'!
   143 !AbstractSourceCodeManager class methodsFor:'accessing'!
   154 
   144 
   155 availableManagers
   145 availableManagers
  2001     "all scm-version methods start with this prefix"
  1991     "all scm-version methods start with this prefix"
  2002 
  1992 
  2003     ^ 'version_'
  1993     ^ 'version_'
  2004 
  1994 
  2005     "Created: / 29-09-2011 / 13:26:29 / cg"
  1995     "Created: / 29-09-2011 / 13:26:29 / cg"
       
  1996 !
       
  1997 
       
  1998 repositoryTopDirectoryFromSCMRoot
       
  1999     "return the top of the repository."
       
  2000 
       
  2001     ^ self subclassResponsibility
       
  2002 
       
  2003     "Created: / 18-05-2018 / 12:30:23 / Stefan Vogel"
  2006 !
  2004 !
  2007 
  2005 
  2008 revisionAfter:aRevisionString
  2006 revisionAfter:aRevisionString
  2009     "generate the next revision number after the given number"
  2007     "generate the next revision number after the given number"
  2010 
  2008 
  4063 
  4061 
  4064         aStream nextPutAll:'  Total revisions: '; nextPutLine:(log at:#numberOfRevisions) printString.
  4062         aStream nextPutAll:'  Total revisions: '; nextPutLine:(log at:#numberOfRevisions) printString.
  4065         aStream nextPutAll:'  Newest revision: '; nextPutLine:(log at:#newestRevision) printString.
  4063         aStream nextPutAll:'  Newest revision: '; nextPutLine:(log at:#newestRevision) printString.
  4066         tags := log at:#symbolicNames ifAbsent:nil.
  4064         tags := log at:#symbolicNames ifAbsent:nil.
  4067         tags notNil ifTrue:[
  4065         tags notNil ifTrue:[
  4068             aStream nextPutAll:'  Stable revision: '; nextPutAll:(tags at:'stable' ifAbsent:'none'); cr.
  4066             aStream nextPutAll:'  Stable revision: '; nextPutLine:(tags at:'stable' ifAbsent:'none').
  4069             aStream nextPutAll:'  Symbolic names: '; cr.
  4067             aStream nextPutLine:'  Symbolic names: '.
  4070             "sort tags by tag name"
  4068             "sort tags by tag name"
  4071             tags := tags associations sort:[:a :b| (a value compareAsVersionNumberWith:b value) > 0].
  4069             tags := tags associations sort:[:a :b| (a value compareAsVersionNumberWith:b value) > 0].
  4072             tags do:[:eachAssociation|
  4070             tags do:[:eachAssociation|
  4073                 aStream tab; nextPutAll:eachAssociation key; 
  4071                 aStream tab; nextPutAll:eachAssociation key; 
  4074                              nextPutAll:': '; 
  4072                              nextPutAll:': '; 
  4075                              nextPutAll:eachAssociation value; cr.
  4073                              nextPutLine:eachAssociation value.
  4076             ]
  4074             ]
  4077         ].
  4075         ].
  4078     ].
  4076     ].
  4079 
  4077 
  4080     (log at:#revisions ifAbsent:#()) do:[:entry |
  4078     (log at:#revisions ifAbsent:#()) do:[:entry |
  4087             show:((entry at:#date ifAbsent:nil) ? '?'); space;
  4085             show:((entry at:#date ifAbsent:nil) ? '?'); space;
  4088             show:((entry at:#time ifAbsent:nil) ? '?'); tab.
  4086             show:((entry at:#time ifAbsent:nil) ? '?'); tab.
  4089         aStream nextPutAll:' author: '; 
  4087         aStream nextPutAll:' author: '; 
  4090             show:((entry at:#author ifAbsent:nil) ? '?') allBold; tab.
  4088             show:((entry at:#author ifAbsent:nil) ? '?') allBold; tab.
  4091         aStream nextPutAll:' lines: '; 
  4089         aStream nextPutAll:' lines: '; 
  4092             show:(entry at:#numberOfChangedLines ifAbsent:nil) ? '?'; cr.
  4090             showCR:(entry at:#numberOfChangedLines ifAbsent:nil) ? '?'.
  4093 
  4091 
  4094         logMsg := entry at:#logMessage ifAbsent:''.
  4092         logMsg := entry at:#logMessage ifAbsent:''.
  4095         color := Color orange.
  4093         color := Color orange.
  4096         (logMsg isBlank or:[logMsg withoutSeparators = '.']) ifTrue:[
  4094         (logMsg isBlank or:[logMsg withoutSeparators = '.']) ifTrue:[
  4097             logMsg := '*** empty log message ***'.
  4095             logMsg := '*** empty log message ***'.