common/stx_libscm_common.st
author Claus Gittinger <cg@exept.de>
Wed, 01 Aug 2018 13:24:15 +0200
branchcvs_MAIN
changeset 854 84ab037783ba
parent 797 b7cd548d92cf
child 881 6c989bbe4b00
permissions -rw-r--r--
#DOCUMENTATION by cg class: HGRepository comment/format in: #synchronizationSemaphore:

"
stx:libscm - a new source code management library for Smalltalk/X
Copyright (C) 2012-2015 Jan Vrany

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
"
"{ Package: 'stx:libscm/common' }"

"{ NameSpace: Smalltalk }"

LibraryDefinition subclass:#stx_libscm_common
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'* Projects & Packages *'
!

!stx_libscm_common class methodsFor:'documentation'!

copyright
"
stx:libscm - a new source code management library for Smalltalk/X
Copyright (C) 2012-2015 Jan Vrany

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
"
!

documentation
"
    Package documentation:

    common (abstract) parts for interfaces to various source code management systems.
    For now, only mercurial is almost completely supported.

    [author:]
        jv

    [primary maintainer:]
        jv
"
! !

!stx_libscm_common class methodsFor:'description'!

excludedFromPreRequisites
    "list all packages which should be ignored in the automatic
     preRequisites scan. See #preRequisites for more."

    ^ #(
    )
!

mandatoryPreRequisites
    "list packages which are mandatory as a prerequisite.
     This are packages containing superclasses of my classes and classes which
     are extended by myself.
     They are mandatory, beacuse we need these packages as a prerequisite for loading and compiling.
     This method is generated automatically,
     by searching along the inheritance chain of all of my classes."

    ^ #(
	#'stx:libbasic'    "Collection - extended "
	#'stx:libbasic3'    "AbstractSourceCodeManager - superclass of SCMAbstractSourceCodeManager "
	#'stx:libview2'    "ApplicationModel - superclass of SCMAbstractCommitDialog "
    )
!

preRequisites
    "list all required packages.
     This list can be maintained manually or (better) generated and
     updated by scanning the superclass hierarchies and looking for
     global variable accesses. (the browser has a menu function for that)
     Howevery, often too much is found, and you may want to explicitely
     exclude individual packages in the #excludedFromPrerequisites method."

    ^ #(
	#'stx:libbasic'    "Object - superclass of SCMAbstractPackageModel "
	#'stx:libbasic3'    "SourceCodeManagerUtilitiesForWorkspaceBasedManagers - superclass of SCMCommonSourceCodeManagerUtilities "
	#'stx:libtool'    "Tools::TextDiffTool - referenced by SCMAbstractCommitDialog>>doShowDiffsForEntry:against: "
	#'stx:libview'    "Color - referenced by SCMAbstractCommitDialog>>browseWorkingCopyLabel "
	#'stx:libview2'    "SimpleDialog - superclass of SCMAbstractDialog "
	#'stx:libwidg'    "Button - referenced by SCMAbstractCommitDialog>>doRunSanityChecks "
	#'stx:libwidg2'    "ProgressNotification - referenced by SCMAbstractTask>>notify:progress: "
    )
!

referencedPreRequisites
    "list packages which are a prerequisite, because they contain
     classes which are referenced by my classes.
     We do not need these packages as a prerequisite for loading or compiling.
     This method is generated automatically,
     by searching all classes (and their packages) which are referenced by my classes."

    ^ #(
	#'stx:libjava'    "JavaVM - referenced by SCMAbstractFileoutLikeTask>>doRemoveOldContainersFor: "
	#'stx:libscm/mercurial'    "HGError - referenced by SCMAbstractPackageRevision>>childNamed: "
	#'stx:libtool'    "Tools::ChangeSetDiffTool - referenced by SCMCommonSourceCodeManagerUtilities>>compareProject:withRepositoryVersionFrom: "
	#'stx:libview'    "Color - referenced by SCMAbstractCommitDialog>>browseWorkingCopyLabel "
	#'stx:libwidg'    "Button - referenced by SCMAbstractCommitDialog>>doRunSanityChecks "
	#'stx:libwidg2'    "ProgressNotification - referenced by SCMAbstractFileoutLikeTask>>doCompileCopyrightMethodsFor: "
    )
!

subProjects
    "list packages which are known as subprojects.
     The generated makefile will enter those and make there as well.
     However: they are not forced to be loaded when a package is loaded;
     for those, redefine requiredPrerequisites"

    ^ #(
    )
! !

!stx_libscm_common class methodsFor:'description - contents'!

classNamesAndAttributes
    "lists the classes which are to be included in the project.
     Each entry in the list may be: a single class-name (symbol),
     or an array-literal consisting of class name and attributes.
     Attributes are: #autoload or #<os> where os is one of win32, unix,..."

    ^ #(
	"<className> or (<className> attributes...) in load order"
	SCMAbstractDialog
	SCMAbstractPackageModel
	SCMAbstractPackageWorkingCopyRegistry
	SCMAbstractRevisionInfo
	SCMAbstractSourceCodeManager
	SCMAbstractTask
	SCMCodeMonitor
	SCMCommonPackageModelGroup
	SCMCommonSourceCodeManagerUtilities
	SCMCompatModeQuery
	SCMError
	SCMWarning
	#'stx_libscm_common'
	SCMAbstractCommitDialog
	SCMAbstractFileoutLikeTask
	SCMAbstractPackageRevision
	SCMAbstractPackageWorkingCopy
	SCMPackageModelError
	SCMPackageModelWarning
	SCMAbstractCommitTask
    )
!

extensionMethodNames
    "list class/selector pairs of extensions.
     A correponding method with real names must be present in my concrete subclasses"

    ^ #(
	ChangeSet condenseChangesForPackageAfterCommit:
    )
! !

!stx_libscm_common class methodsFor:'description - project information'!

companyName
    "Return a companyname which will appear in <lib>.rc"

    ^ 'Jan Vrany / eXept Software AG'

    "Modified: / 23-11-2012 / 20:30:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 18-11-2016 / 11:50:02 / cg"
!

description
    "Return a description string which will appear in vc.def / bc.def"

    ^ 'Smalltalk/X Common Source Code Management Support Library'

    "Modified: / 23-11-2012 / 20:30:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

legalCopyright
    "Return a copyright string which will appear in <lib>.rc"

    ^ 'Copyright Jan Vrany 2012\nCopyright eXept Software AG 2012'

    "Modified: / 23-11-2012 / 20:30:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!

productInstallDirBaseName
    "Returns a default installDir which will appear in <app>.nsi"

    ^ (self package asCollectionOfSubstringsSeparatedByAny:':/') last

    "Modified (comment): / 21-09-2017 / 11:05:28 / stefan"
!

productName
    "Return a product name which will appear in <lib>.rc"

    ^ 'Smalltalk/X'

    "Modified: / 23-11-2012 / 20:31:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    "Modified: / 18-11-2016 / 11:46:29 / cg"
! !

!stx_libscm_common class methodsFor:'description - svn'!

svnRepositoryUrlString
    "Return a SVN repository URL of myself.
     (Generated since 2011-04-08)
     Do not make the string shorter!!!!!! We have to use fixed-length keyword!!!!!!
    "

    ^ '$URL::                                                                                                                        $'
!

svnRevisionNr
    "Return a SVN revision number of myself.
     This number is updated after a commit"

    ^ "$SVN-Revision:"'45              '"$"
! !

!stx_libscm_common class methodsFor:'file templates'!

bc_dot_mak
    "answer a template for the bc.mak makefile.
     Any variable definition %(Variable) will be later replaced by the mapping.
     $% characters have to be duplicated"

^
'# Hack to make it compilable under Smalltalk/X 6.2.2 (which does not have RES variable defined)
!!ifndef RES
RES=res
!!endif

' , super bc_dot_mak

    "Created: / 03-07-2013 / 19:38:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !

!stx_libscm_common class methodsFor:'documentation'!

version
    ^ '$Header$'
!

version_CVS
    ^ '$Header$'
!

version_HG

    ^ '$Changeset: <not expanded> $'
!

version_SVN
    ^ '$Id$'
! !