eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'PerforceSourceCodeManager':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: PerforceSourceCodeManager


Inheritance:

   Object
   |
   +--AbstractSourceCodeManager
      |
      +--PerforceSourceCodeManager

Package:
stx:libbasic3
Category:
System-SourceCodeManagement
Version:
rev: 1.46 date: 2019/04/11 16:37:15
user: stefan
file: PerforceSourceCodeManager.st directory: libbasic3
module: stx stc-classLibrary: libbasic3

Class protocol:

accessing
o  flushPerforceWorkspaces

o  perforceClient

o  perforceClient: something

o  perforceEnabled

o  perforceEnabled: enable

o  perforceExecutable

o  perforceExecutable: aString
set the name of the cvs executable.

o  perforcePassword

o  perforcePassword: something

o  perforcePort

o  perforcePort: something

o  perforceUser

o  perforceUser: something

o  perforceWorkspaces
Superclass AbstractSourceCodeManager class says that I am responsible to implement this method

o  repositoryInfoPerModule
Superclass AbstractSourceCodeManager class says that I am responsible to implement this method

o  repositoryInfoPerModule: aDictionary
set the dictionary, which associates CVSRoots to module names.
If no entry is contained in this dictionary for some module,
the default cvsRoot (CVSRoot) will be used.

o  repositoryName
return the name of the repository.
Since this is an abstract class, return nil (i.e. none)

o  repositoryName: settingsString
return the name of the repository.
Since this is an abstract class, return nil (i.e. none)

o  repositoryNameForModule: aModuleName

o  repositoryNameForPackage: packageId
(comment from inherited method)
Return the repository URL for the given package.
Used for testing/debugging source code management configuration

o  setDefaultPerforceSettingsFromString: aString

o  utilities
Returns 'utilities' object that can be used by tools.

By default, it returns an instance of
SourceCodeManagerUtilities with receiver as its
manager, but individual managers may override this
method and supply its own, customized utilities.

o  verboseSourceCodeAccess

o  verboseSourceCodeAccess: aBoolean

o  workSpaceClass

actions
o  checkinClass: aClass fileName: classFileName directory: packageDir module: moduleDir logMessage: logMessage force: force
checkin of a class into the source repository.
Return true if ok, false if not.

o  checkinClass: aClass fileName: classFileName directory: packageDir module: moduleDir logMessage: logMessage force: force submit: doSubmit
checkin of a class into the source repository.
Return true if ok, false if not.

usage example(s):

     SourceCodeManager checkinClass:Array

o  checkinClass: aClass logMessage: logMessage submit: doSubmit
checkin of a class into the source repository.
Return true if ok, false if not.

usage example(s):

     SourceCodeManager checkinClass:Array logMessage:'foo'

o  createTempDirectory: packageDir forModule: moduleDir
create a temp directory for checking out

o  ensureDollarsInVersionMethod: aString
given the source code of my version method, ensure that it contains dollars for
proper keyword expansion
do nothing here because we don't need this - make our own version

o  removeContainer: fileName inModule: moduleName directory: packageDir
remove a container

o  removeContainer: fileName inModule: moduleName directory: packageDir submit: doSubmit
remove a container

usage example(s):

    self removeContainer:'ActionNQualifier.st' inModule:'applistx' directory:'util/libDataType'

o  savePreferencesOn: aStream

o  submit

basic administration
o  basicCheckinClass: cls fileName: classFileName directory: packageDir module: moduleName logMessage: logMessage force: forceArg submit: doSubmit
enter a classes source code
into the source repository. If the force argument is true, no merge is done;
instead, the code is checked in as given (Dangerous).
Return true if ok, false if not.

o  basicCheckinClass: cls fileName: classFileName directory: packageDir module: moduleName logMessage: logMessage force: forceArg submit: doSubmit fileContents: fileContents
enter a classes source code
into the source repository. If the force argument is true, no merge is done;
instead, the code is checked in as given (Dangerous).
Return true if ok, false if not.

o  checkForExistingContainer: fileName inModule: moduleName directory: packageDirName
check for a container to exist. Return a boolean result.

usage example(s):

    self checkForExistingContainer:'baseline.rbspec' inModule:'applistx' directory:'application/rtdbInspector/builder'
    self checkForExistingContainer:'baseline.rbspec' inModule:'applistx' directory:'application/rtdbInspector'
    self checkForExistingContainer:'baseline.rbspec' inModule:'applistx' directory:'util/*'

o  checkForExistingModule: moduleName
check for a module directory to be present

usage example(s):

self checkForExistingModule:'applistx'
self checkForExistingModule:'balla'

o  checkForExistingModule: moduleName directory: packageDir
check for a package directory to be present
in perforce directory will be created with checkin
so we need only to check if we have a matching workspace

usage example(s):

    self checkForExistingModule:'testModule' directory:'libTestPerforce'

o  checkin: containerFilename text: someText directory: packageDir module: moduleName logMessage: logMessage force: force onBranch: branchNameOrNil
enter some (source) code (which is someText)
into the source repository. If the force argument is true, no merge is done;
instead, the code is checked in as given (Dangerous).
Return true if ok, false if not.

o  checkinClass: cls fileName: classFileName directory: packageDir module: moduleName source: sourceFileName logMessage: logMessage force: forceArg
enter a classes source code (which has been already filed out into sourceFileName)
here we have to create our own source file
into the source repository. If the force argument is true, no merge is done;
instead, the code is checked in as given (Dangerous).
Return true if ok, false if not.

usage example(s):

     SourceCodeManager checkinClass:Array logMessage:'testing only'

o  createContainerFor: cls inModule: moduleName package: packageDir container: classFileName logMessage: logMessage

o  createContainerForText: someText inModule: moduleDir package: packageDir container: fileName

o  createModule: moduleName
we don't need to create directories in perforce before checkin

o  createModule: module directory: directory
nothing to do with PerforceSourceCodeManager
subdirectory in repository will created with adding the file

o  initialRevisionStringFor: aClass inModule: moduleDir directory: packageDir container: fileName
return a string usable as initial revision string

usage example(s):

self initialRevisionStringFor:RTDBInspectorStartup inModule:'applistx' directory:'util/rtdb' container:'RTDBInterfaceInspector.st'

o  revisionInfoFromString: aString
|stream|
stream := WriteStream on:''.
SourceCodeManagerUtilities repositoryLogOf:ExtIF onto:stream.
^ stream contents.

self revisionInfoFromString:((RTDBInterfaceInspector findVersionMethodOfManager:PerforceSourceCodeManager) valueWithReceiver:(self theNonMetaclass) arguments:#())
self revisionInfoFromString:'Path: //depot/applistx/util/libDataType/ActionDQualifier.st#1 User: penk Date: 30-03-2012 Time: 15-50-39.992'

o  revisionLogOf: clsOrNil fromRevision: firstRev toRevision: lastRef numberOfRevisions: numRevisions fileName: classFileName directory: packageDir module: aPackage
return info about the repository container and
(part of) the revisionlog as a collection of revision entries.
Return nil on failure.

If numRevisions is notNil, it limits the number of revision records returned -
only numRevions of the newest revision infos will be collected.

The returned information is a structure (IdentityDictionary)
filled with:
#newestRevision -> the revisionString of the newest revision
#numberOfRevisions -> the number of revisions in the container (nil for all)
#revisions -> collection of per-revision info (see below)

firstRev / lastRef specify from which revisions a logEntry is wanted:
-If firstRev is nil, the first revision is the initial revision
otherwise, the log starts with that revision.
-If lastRef is nil, the last revision is the newest revision
otherwise, the log ends with that revision.

-If both are nil, all logEntries are extracted.
-If both are 0 (not nil), no logEntries are extracted (i.e. only the header).

per revision info consists of one record per revision:

#revision -> the revision string
#author -> who checked that revision into the repository
#date -> when was it checked in
#state -> the RCS state
#logMessage -> the checkIn log message

revisions are ordered newest first
(i.e. the last entry is for the initial revision; the first for the most recent one)
Attention: if state = 'dead' that revision is no longer valid.

usage example(s):

     AbstractSourceCodeManager revisionLogOf:ExtIF
     SourceCodeManager revisionLogOf:Array fromRevision:'1.40' toRevision:'1.43'
     SourceCodeManager revisionLogOf:Array fromRevision:'1.40' toRevision:nil
     SourceCodeManager revisionLogOf:Array fromRevision:nil toRevision:'1.3'
     SourceCodeManager revisionLogOf:Array fromRevision:nil toRevision:nil
     SourceCodeManager revisionLogOf:Array fromRevision:0 toRevision:0

o  setSymbolicName: symbolicName revision: rev overWrite: overWriteBool classes: aCollectionOfClasses
set a symbolicName for revision rev.
If rev is nil, set it for the head (most recent) revision.
If rev is 0, delete the symbolic name.
If overWriteBool is true, the symbolicName will be changed, even if it has already been set.
If overWriteBool is false, an error will be raised if symbolicName has already been set.

If filename is nil, the symbolicName for a whole package is set

usage example(s):

     self setSymbolicName:'foo' revision:nil overWrite:false classes:(Array with:True with:False)
     self setSymbolicName:'foo' revision:nil overWrite:true classes:(Array with:True with:False)
     self setSymbolicName:'foo' revision:nil overWrite:true classes:(Array with:True with:False)
     self setSymbolicName:'foo' revision:'1.1' overWrite:true classes:(Array with:True with:False)
     self setSymbolicName:'foo' revision:0 overWrite:true classes:(Array with:True with:False)

o  streamForClass: cls fileName: fileName revision: revision directory: packageDir module: moduleDir cache: doCache
extract a classes source code and return an open readStream on it.
A revision of nil selects the current (in image) revision.
The classes source code is extracted using the revision and the sourceCodeInfo,
which itself is extracted from the classes packageString.

o  writeRevisionLogMessagesFrom: log withHeader: header to: aStream
helper; send the revisionlog to aStream

private
o  getCheckInDefinitionForClass: aClass

o  moduleFromContainerPath: containerPath forPackage: packageID
given a full path as in an RCS header, extract the module.

usage example(s):

     SourceCodeManager moduleFromContainerPath:'/files/CVS/stx/libbasic/Array.st' forPackage:Array package

o  postCheckInClass: class checkInDefinition: checkInDefinition

o  reportError: msg

o  submitInfoDialogClass

o  updateVersionMethodOf: aClass for: newRevisionString
redefinition because I like to handle my version updates by myself

o  updatedRevisionStringOf: aClass forRevision: newRevision with: originalVersionString
update a revision string

usage example(s):

    self updatedRevisionStringOf:nil
            forRevision:'6'
            with:'$','Header','$'

queries
o  checkInInfoDialogClass

o  checkPerforceSettings: aSettingsString forPackage: aPackage
create an temporary workspace for handle checkin

usage example(s):

     self checkPerforceSettings:'penk_DEL00089:penk:@localhost:1666' forPackage:'stx/libbasic3' 
     self checkPerforceSettings:'penk_DEL00089:penk:@localhost:1666' forPackage:'balla'
    self perforceError handle:[:ex|
        self reportError:ex description.
        ^false
    ] do:[
         self checkPerforceSettings:'penk_DEL0ss0089:penk:@localhost:1666' forPackage:'balla'
    ].

o  getTrailungPathNameFrom: path1 with: path2
path1 have to start with path2 not the other way around

usage example(s):

self getTrailungPathNameFrom:'foo/bar' with:'foo'     
self getTrailungPathNameFrom:'foo' with:'foo/bar'     
self getTrailungPathNameFrom:'//depot/' with:'//depot/applistx/util/libDataType/ActionLQualifier.st'     
self getTrailungPathNameFrom:'//depot/applistx/util/libDataType/ActionLQualifier.st' with:'//depot/'     

o  getWorkSpaceForPackage: aPackage
get the workspace definition from perforce client command output

o  getWorkSpaceForSettings: aSettingsString
| workSpace |
self getPerforceSettingsForPackage:'applistxaa'.
self perforceError handle:[:ex|
self reportError:ex description.
] do:[
workSpace := self getWorkSpaceForPackage:'applistxaa'.
].
workSpace

o  hasPackage: aPackage

o  isPerforce
Superclass AbstractSourceCodeManager class says that I am responsible to implement this method

o  isResponsibleForPackage: aStringOrSymbol
superclass AbstractSourceCodeManager class says that I am responsible to implement this method

o  managerTypeName
Superclass AbstractSourceCodeManager class says that I am responsible to implement this method

o  managerTypeNameShort
Answers short version manager name suitable for UI,
i,e., CVS, SVN, P4. Used in cases where sorter strings
are preferred. Defaults to #managerTypeName

o  nameOfVersionMethodForExtensions

o  nameOfVersionMethodInClasses

o  path: path1 hasSamePrefixLikePath: path2
path1 have to start with path2 not the other way around

usage example(s):

self path:'foo/bar' hasSamePrefixLikePath:'foo'   
self path:'foo' hasSamePrefixLikePath:'foo/bar'  
self path:'//depot/applistx/util/libDataType/ActionLQualifier.st' hasSamePrefixLikePath:'//depot/'  
self path:'//depot/' hasSamePrefixLikePath:'//depot/applistx/util/libDataType/ActionLQualifier.st'  

o  perforceError

o  perforceTmpDirectory
return the name of the tmp repository.
That's the directory, where temporary files are created for checkin/checkout.
If nil, a directory under the system's default tempDirectory is used.

o  removeWorkSpaceForSettings: settingsString
self perforceWorkspaces remove:(self perforceWorkspaces first)

o  settingsApplicationClass
link to my settings application (needed for the settings dialog

o  versionInfoClass

queries - settings
o  getPerforceDefaultSettingsString

o  getPerforcePasswordForModule: aModuleName

o  getPerforcePortForModule: aModuleName

o  getPerforceSettingsForPackage: aPackage
self getPerforceSettingsForPackage:'applistx'

o  getPerforceSettingsFromString: aString
self getPerforceSettingsFromString:'alspa:penk:@perlin:1666'

o  getPerforceUserForModule: aModuleName

o  getStringFromPerforceSettings: perforceSettings
self getStringFromPerforceSettings:(self getPerforceSettingsFromString:'alspa:penk:@perlin:1666')

subclass responsibility
o  getExistingContainersInModule: aModule directory: aPackage
can be easy done with dirs command

o  getExistingDirectoriesInModule: aModule

o  getExistingModules

o  reportHistoryLogSince: timeGoal filterSTSources: filter filterUser: userFilter filterRepository: repositoryFilter filterModules: moduleFilter inTo: aBlock
Superclass AbstractSourceCodeManager class says that I am responsible to implement this method


Private classes:

    CheckInDefinition
    PerforceError
    PerforceVersionInfo


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Thu, 28 Mar 2024 09:02:03 GMT