From 13fb372722c9d48c2363e10de02ee18f9c3af4e2 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Mon, 23 Oct 2023 17:12:27 +0200 Subject: [PATCH] - Updating to Libgit 3.0.8 to have proxy for the fetch. - Adding proxy configuration from the NetworkSettings - Setting proxy in Clone, Fetch, and Pull - Adding Tests --- BaselineOfIceberg/BaselineOfIceberg.class.st | 2 +- Iceberg-Libgit/IceBranchNotFound.class.st | 12 +- Iceberg-Libgit/IceChangeImporter.extension.st | 4 +- Iceberg-Libgit/IceCloneError.class.st | 10 +- .../IceCloneLocationAlreadyExists.class.st | 16 +- .../IceCloneRemoteNotFound.class.st | 16 +- Iceberg-Libgit/IceGitChange.class.st | 22 +- Iceberg-Libgit/IceGitChangeImporter.class.st | 24 +- Iceberg-Libgit/IceGitClone.class.st | 22 +- Iceberg-Libgit/IceGitCommit.class.st | 68 +++--- Iceberg-Libgit/IceGitFileRemote.class.st | 20 +- Iceberg-Libgit/IceGitHttpRemote.class.st | 14 +- Iceberg-Libgit/IceGitHttpsRemote.class.st | 12 +- Iceberg-Libgit/IceGitIndex.class.st | 36 +-- Iceberg-Libgit/IceGitLocalBranch.class.st | 110 +++++---- Iceberg-Libgit/IceGitNetworkRemote.class.st | 40 ++-- Iceberg-Libgit/IceGitRemote.class.st | 80 ++++--- Iceberg-Libgit/IceGitRemoteBranch.class.st | 26 ++- Iceberg-Libgit/IceGitScpRemote.class.st | 24 +- Iceberg-Libgit/IceGitSshRemote.class.st | 14 +- Iceberg-Libgit/IceGitUnbornBranch.class.st | 14 +- .../IceGitWorkingCopyUpdateVisitor.class.st | 38 ++-- Iceberg-Libgit/IceIndexUpdateVisitor.class.st | 32 +-- Iceberg-Libgit/IceLibgitCommitWalk.class.st | 32 +-- Iceberg-Libgit/IceLibgitErrorVisitor.class.st | 28 +-- Iceberg-Libgit/IceLibgitRepository.class.st | 210 +++++++++--------- Iceberg-Libgit/IceLibgitTreeBuilder.class.st | 48 ++-- .../IceMCSnapshotPatchVisitor.class.st | 20 +- Iceberg-Libgit/IceRepositoryCreator.class.st | 78 +++---- .../IceRepositoryProperties.class.st | 66 +++--- Iceberg-Libgit/IceSemanticVersion.class.st | 34 +-- .../IceUnbornRepositoryProperties.class.st | 14 +- Iceberg-Libgit/LGitAbstractError.extension.st | 4 +- .../LGit_GIT_ECONFLICT.extension.st | 4 +- Iceberg-Libgit/LGit_GIT_EEOF.extension.st | 4 +- .../LGit_GIT_ENOTFOUND.extension.st | 4 +- Iceberg-Libgit/LGit_GIT_ERROR.extension.st | 4 +- Iceberg-Libgit/LGit_GIT_EUSER.extension.st | 4 +- Iceberg-Libgit/Magnitude.extension.st | 4 +- Iceberg-Libgit/ManifestIcebergLibgit.class.st | 10 +- Iceberg-Libgit/TIceRepositoryReader.trait.st | 10 +- Iceberg-Libgit/TIceRepositoryWriter.trait.st | 12 +- Iceberg-Libgit/package.st | 2 +- Iceberg-Tests/IceAbstractTestCase.class.st | 42 ++-- Iceberg-Tests/IceAbstractTestFactory.class.st | 22 +- .../IceBasicCherryPickingFixture.class.st | 10 +- .../IceBasicRepositoryFixture.class.st | 26 ++- Iceberg-Tests/IceBornRepositoryTest.class.st | 68 +++--- .../IceCherryPickBrowserTest.class.st | 10 +- ...eCherryPickingInitialDependencies.class.st | 12 +- Iceberg-Tests/IceCherryPickingTest.class.st | 12 +- .../IceClassesCherryPickingTest.class.st | 28 +-- .../IceCleanWorkingCopyFixture.class.st | 10 +- .../IceCleanWorkingCopyTest.class.st | 32 +-- .../IceClonedFromRemoteFixture.class.st | 24 +- .../IceConflictsCherryPickingTest.class.st | 12 +- Iceberg-Tests/IceCredentialStoreTest.class.st | 40 ++-- .../IceDetachedWorkingCopyFixture.class.st | 10 +- .../IceDetachedWorkingCopyTest.class.st | 18 +- Iceberg-Tests/IceDiffTests.class.st | 22 +- ...ceDirtyDetachedWorkingCopyFixture.class.st | 10 +- .../IceDirtyDetachedWorkingCopyTest.class.st | 20 +- ...eExtensionMethodCherryPickingTest.class.st | 22 +- Iceberg-Tests/IceFileDefinitionTests.class.st | 18 +- Iceberg-Tests/IceFileRemoteTest.class.st | 12 +- .../IceGitCleanWorkingCopyTest.class.st | 10 +- Iceberg-Tests/IceGitCloneTest.class.st | 26 ++- Iceberg-Tests/IceGitCommand.class.st | 29 +-- .../IceGitCommitMessageTest.class.st | 22 +- .../IceGitDetachedWorkingCopyTest.class.st | 10 +- ...ceGitDirtyDetachedWorkingCopyTest.class.st | 10 +- Iceberg-Tests/IceGitFileFormatTest.class.st | 18 +- Iceberg-Tests/IceGitMergeTest.class.st | 34 +-- .../IceGitPropertiesFileTest.class.st | 18 +- Iceberg-Tests/IceGitRemoteTest.class.st | 104 ++++----- ...gleRemoteAndBranchWithSlashesTest.class.st | 10 +- ...hSingleRemoteAndMergeConflictTest.class.st | 10 +- ...GitRepositoryWithSingleRemoteTest.class.st | 12 +- Iceberg-Tests/IceGitTestFactory.class.st | 28 +-- .../IceGitUnbornProjectTest.class.st | 28 +-- ...IceGitUnknownCommitRepositoryTest.class.st | 10 +- .../IceGitWithoutUserNameTest.class.st | 32 +-- Iceberg-Tests/IceHttpRemoteTest.class.st | 30 +-- Iceberg-Tests/IceHttpsRemoteTest.class.st | 14 +- .../IceInMemoryCleanWorkingCopyTest.class.st | 10 +- Iceberg-Tests/IceInMemoryTestFactory.class.st | 20 +- .../IceInitialPropertiesFileTestCase.class.st | 12 +- Iceberg-Tests/IceLibGitIndexTestCase.class.st | 30 +-- .../IceLocalRepositoryMissingTest.class.st | 14 +- ...hSingleRemoteAndMergeConflictTest.class.st | 10 +- ...oryRepositoryWithSingleRemoteTest.class.st | 10 +- Iceberg-Tests/IceMergeTest.class.st | 52 ++--- .../IceMetaClassCherryPickingTest.class.st | 20 +- .../IceMethodCherryPickingTest.class.st | 46 ++-- .../IceMissingLocalRepositoryFixture.class.st | 10 +- .../IceMultiplePackageFixture.class.st | 10 +- ...iplePackageLocalGitRepositoryTest.class.st | 10 +- ...ePackageLocalMemoryRepositoryTest.class.st | 10 +- .../IceMultiplePackageRepositoryTest.class.st | 72 +++--- .../IceNewGitRepositoryTest.class.st | 10 +- Iceberg-Tests/IceNewRepositoryTest.class.st | 18 +- .../IceNotYetClonedRepositoryFixture.class.st | 40 ++-- .../IceParameterizedTestCase.class.st | 36 +-- Iceberg-Tests/IceProxySettingsTest.class.st | 81 +++++++ Iceberg-Tests/IceRepository.extension.st | 6 +- ...hSingleRemoteAndMergeConflictTest.class.st | 18 +- ...IceRepositoryWithSingleRemoteTest.class.st | 38 ++-- Iceberg-Tests/IceScpRemoteTest.class.st | 32 +-- .../IceSinglePackageFixture.class.st | 10 +- ...nglePackageLocalGitRepositoryTest.class.st | 10 +- ...sitoryWithComplexSubdirectoryTest.class.st | 10 +- ...RepositoryWithDotSubdirectoryTest.class.st | 12 +- ...epositoryWithLowerCasePackageTest.class.st | 10 +- ...GitRepositoryWithSubdirectoryTest.class.st | 10 +- ...ePackageLocalMemoryRepositoryTest.class.st | 10 +- ...eSinglePackageLocalRepositoryTest.class.st | 116 +++++----- Iceberg-Tests/IceTestDefinition.class.st | 20 +- Iceberg-Tests/IceTestParameter.class.st | 18 +- Iceberg-Tests/IceTestParameterValue.class.st | 36 +-- .../IceTraitsCherryPickingTest.class.st | 14 +- .../IceTreeConstructionTests.class.st | 26 ++- Iceberg-Tests/IceTreeMergeTests.class.st | 32 +-- Iceberg-Tests/IceTreeTests.class.st | 14 +- .../IceUnbornProjectFixture.class.st | 12 +- .../IceUnknownCommitRepositoryTest.class.st | 16 +- Iceberg-Tests/IceUrlBuilderTest.class.st | 28 +-- ...eAndLocalCommitAndUpstreamFixture.class.st | 10 +- ...ceWithRemoteAndLocalCommitFixture.class.st | 18 +- ...WithRemoteAndMergeConflictFixture.class.st | 10 +- ...WithRemoteAndUnknownCommitFixture.class.st | 10 +- Iceberg-Tests/IceWithRemoteFixture.class.st | 18 +- Iceberg-Tests/MCClassDefinition.extension.st | 4 +- ...abRepositoryIcebergExtensionsTest.class.st | 18 +- .../RG2MetaclassTraitDefinition.extension.st | 4 +- .../RG2PackageDefinition.extension.st | 4 +- Iceberg-Tests/RG2TraitDefinition.extension.st | 4 +- Iceberg-Tests/RG2UnresolvedValue.extension.st | 4 +- Iceberg-Tests/package.st | 2 +- Iceberg/Iceberg.class.st | 54 +++++ 139 files changed, 1881 insertions(+), 1481 deletions(-) create mode 100644 Iceberg-Tests/IceProxySettingsTest.class.st diff --git a/BaselineOfIceberg/BaselineOfIceberg.class.st b/BaselineOfIceberg/BaselineOfIceberg.class.st index 8921116e73..96dcdeed61 100644 --- a/BaselineOfIceberg/BaselineOfIceberg.class.st +++ b/BaselineOfIceberg/BaselineOfIceberg.class.st @@ -77,7 +77,7 @@ BaselineOfIceberg >> libgit: spec [ baseline: 'LibGit' with: [ spec - repository: 'github://pharo-vcs/libgit2-pharo-bindings:v3.0.7'; + repository: 'github://pharo-vcs/libgit2-pharo-bindings:v3.0.8'; loads: 'default' ]. spec project: 'LibGit-Tests' diff --git a/Iceberg-Libgit/IceBranchNotFound.class.st b/Iceberg-Libgit/IceBranchNotFound.class.st index fa3ee75ef9..29fb6e220e 100644 --- a/Iceberg-Libgit/IceBranchNotFound.class.st +++ b/Iceberg-Libgit/IceBranchNotFound.class.st @@ -2,20 +2,22 @@ A branch was not found. " Class { - #name : #IceBranchNotFound, - #superclass : #IceError, + #name : 'IceBranchNotFound', + #superclass : 'IceError', #instVars : [ 'branchName' ], - #category : #'Iceberg-Libgit-Exceptions' + #category : 'Iceberg-Libgit-Exceptions', + #package : 'Iceberg-Libgit', + #tag : 'Exceptions' } -{ #category : #accessing } +{ #category : 'accessing' } IceBranchNotFound >> branchName [ ^ branchName ] -{ #category : #accessing } +{ #category : 'accessing' } IceBranchNotFound >> branchName: aString [ branchName := aString ] diff --git a/Iceberg-Libgit/IceChangeImporter.extension.st b/Iceberg-Libgit/IceChangeImporter.extension.st index 95c9b4b407..dea75d7242 100644 --- a/Iceberg-Libgit/IceChangeImporter.extension.st +++ b/Iceberg-Libgit/IceChangeImporter.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #IceChangeImporter } +Extension { #name : 'IceChangeImporter' } -{ #category : #'*Iceberg-Libgit' } +{ #category : '*Iceberg-Libgit' } IceChangeImporter >> visitGitChange: anIceGitChange [ | importer | diff --git a/Iceberg-Libgit/IceCloneError.class.st b/Iceberg-Libgit/IceCloneError.class.st index 47f92913c2..44393f940a 100644 --- a/Iceberg-Libgit/IceCloneError.class.st +++ b/Iceberg-Libgit/IceCloneError.class.st @@ -2,12 +2,14 @@ Error while cloning a project " Class { - #name : #IceCloneError, - #superclass : #IceError, - #category : #'Iceberg-Libgit-Exceptions' + #name : 'IceCloneError', + #superclass : 'IceError', + #category : 'Iceberg-Libgit-Exceptions', + #package : 'Iceberg-Libgit', + #tag : 'Exceptions' } -{ #category : #signalling } +{ #category : 'signalling' } IceCloneError class >> signalFor: anObject [ ^ self subclassResponsibility diff --git a/Iceberg-Libgit/IceCloneLocationAlreadyExists.class.st b/Iceberg-Libgit/IceCloneLocationAlreadyExists.class.st index 39cd0b8f15..debc41bae4 100644 --- a/Iceberg-Libgit/IceCloneLocationAlreadyExists.class.st +++ b/Iceberg-Libgit/IceCloneLocationAlreadyExists.class.st @@ -3,32 +3,34 @@ Error while cloning a project - the location on disk already exists " Class { - #name : #IceCloneLocationAlreadyExists, - #superclass : #IceCloneError, + #name : 'IceCloneLocationAlreadyExists', + #superclass : 'IceCloneError', #instVars : [ 'location' ], - #category : #'Iceberg-Libgit-Exceptions' + #category : 'Iceberg-Libgit-Exceptions', + #package : 'Iceberg-Libgit', + #tag : 'Exceptions' } -{ #category : #signalling } +{ #category : 'signalling' } IceCloneLocationAlreadyExists class >> signalFor: aLocation [ ^ self new location: aLocation; signal. ] -{ #category : #visiting } +{ #category : 'visiting' } IceCloneLocationAlreadyExists >> acceptError: aVisitor [ aVisitor visitCloneLocationAlreadyExists: self. ] -{ #category : #accessing } +{ #category : 'accessing' } IceCloneLocationAlreadyExists >> location [ ^ location ] -{ #category : #accessing } +{ #category : 'accessing' } IceCloneLocationAlreadyExists >> location: anObject [ location := anObject ] diff --git a/Iceberg-Libgit/IceCloneRemoteNotFound.class.st b/Iceberg-Libgit/IceCloneRemoteNotFound.class.st index 773fbe7ef6..8844171fd5 100644 --- a/Iceberg-Libgit/IceCloneRemoteNotFound.class.st +++ b/Iceberg-Libgit/IceCloneRemoteNotFound.class.st @@ -2,32 +2,34 @@ The remote was not found " Class { - #name : #IceCloneRemoteNotFound, - #superclass : #IceCloneError, + #name : 'IceCloneRemoteNotFound', + #superclass : 'IceCloneError', #instVars : [ 'remoteUrl' ], - #category : #'Iceberg-Libgit-Exceptions' + #category : 'Iceberg-Libgit-Exceptions', + #package : 'Iceberg-Libgit', + #tag : 'Exceptions' } -{ #category : #signalling } +{ #category : 'signalling' } IceCloneRemoteNotFound class >> signalFor: aUrl [ ^ self new remoteUrl: aUrl; signal. ] -{ #category : #visiting } +{ #category : 'visiting' } IceCloneRemoteNotFound >> acceptError: aVisitor [ aVisitor visitCloneRemoteNotFound: self. ] -{ #category : #accessing } +{ #category : 'accessing' } IceCloneRemoteNotFound >> remoteUrl [ ^ remoteUrl ] -{ #category : #accessing } +{ #category : 'accessing' } IceCloneRemoteNotFound >> remoteUrl: anObject [ remoteUrl := anObject ] diff --git a/Iceberg-Libgit/IceGitChange.class.st b/Iceberg-Libgit/IceGitChange.class.st index a9ccc3c0f2..fb5207f3c0 100644 --- a/Iceberg-Libgit/IceGitChange.class.st +++ b/Iceberg-Libgit/IceGitChange.class.st @@ -2,15 +2,17 @@ I represent a change coming from git (in contrast to a change coming from the image). I know the changed file and I can be visited to define the create a more detailed diff. " Class { - #name : #IceGitChange, - #superclass : #IceChange, + #name : 'IceGitChange', + #superclass : 'IceChange', #instVars : [ 'filePathString' ], - #category : #'Iceberg-Libgit-Changes' + #category : 'Iceberg-Libgit-Changes', + #package : 'Iceberg-Libgit', + #tag : 'Changes' } -{ #category : #accessing } +{ #category : 'accessing' } IceGitChange class >> on: aString [ ^ self new @@ -18,35 +20,35 @@ IceGitChange class >> on: aString [ yourself ] -{ #category : #visiting } +{ #category : 'visiting' } IceGitChange >> accept: aVisitor [ ^ aVisitor visitGitChange: self ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitChange >> child [ ^ IceGitChange on: (RelativePath withAll: self path segments allButFirst) pathString ] -{ #category : #displaying } +{ #category : 'displaying' } IceGitChange >> displayingProgressString [ ^ 'Comparing changes of ' , filePathString ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitChange >> filePathString: aString [ filePathString := aString ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitChange >> path [ ^ Path from: filePathString ] -{ #category : #printing } +{ #category : 'printing' } IceGitChange >> printOn: aStream [ aStream diff --git a/Iceberg-Libgit/IceGitChangeImporter.class.st b/Iceberg-Libgit/IceGitChangeImporter.class.st index 836b801e9a..04f69f6ff7 100644 --- a/Iceberg-Libgit/IceGitChangeImporter.class.st +++ b/Iceberg-Libgit/IceGitChangeImporter.class.st @@ -1,20 +1,22 @@ Class { - #name : #IceGitChangeImporter, - #superclass : #Object, + #name : 'IceGitChangeImporter', + #superclass : 'Object', #instVars : [ 'path', 'diff', 'version' ], - #category : #'Iceberg-Libgit-Changes' + #category : 'Iceberg-Libgit-Changes', + #package : 'Iceberg-Libgit', + #tag : 'Changes' } -{ #category : #accessing } +{ #category : 'accessing' } IceGitChangeImporter >> diff: anIceDiff [ diff := anIceDiff ] -{ #category : #building } +{ #category : 'building' } IceGitChangeImporter >> ensureDirectory: aFileReference inParentNode: aNode [ aNode childAt: aFileReference basename ifPresent: [ :node | @@ -23,7 +25,7 @@ IceGitChangeImporter >> ensureDirectory: aFileReference inParentNode: aNode [ ^ aNode addChild: (IceDirectoryDefinition named: aFileReference basename path: aNode path / aFileReference basename) ] -{ #category : #building } +{ #category : 'building' } IceGitChangeImporter >> ensurePackageFromDirectory: aFileReference inParentNode: aParentNode [ | importer packageName package | @@ -45,7 +47,7 @@ IceGitChangeImporter >> ensurePackageFromDirectory: aFileReference inParentNode: ^ importer importOn: aParentNode ] -{ #category : #importing } +{ #category : 'importing' } IceGitChangeImporter >> importOn: aNode [ | currentSegment fileReference filePath | @@ -84,7 +86,7 @@ IceGitChangeImporter >> importOn: aNode [ "If path size = 0 we should stop recursion" ] -{ #category : #building } +{ #category : 'building' } IceGitChangeImporter >> nextPath [ ^ IceGitChangeImporter new @@ -94,18 +96,18 @@ IceGitChangeImporter >> nextPath [ yourself. ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitChangeImporter >> path: aRelativePath [ path := aRelativePath ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitChangeImporter >> repository [ ^ diff repository ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitChangeImporter >> version: aVersion [ version := aVersion diff --git a/Iceberg-Libgit/IceGitClone.class.st b/Iceberg-Libgit/IceGitClone.class.st index a0dfd41c31..89819f179b 100644 --- a/Iceberg-Libgit/IceGitClone.class.st +++ b/Iceberg-Libgit/IceGitClone.class.st @@ -1,14 +1,16 @@ Class { - #name : #IceGitClone, - #superclass : #Object, + #name : 'IceGitClone', + #superclass : 'Object', #instVars : [ 'location', 'url' ], - #category : #'Iceberg-Libgit-GitActions' + #category : 'Iceberg-Libgit-GitActions', + #package : 'Iceberg-Libgit', + #tag : 'GitActions' } -{ #category : #'private - operations' } +{ #category : 'private - operations' } IceGitClone >> cloneRepo: repo cloneOptions: cloneOptions remainingRetries: remainingRetries [ [repo clone: url options: cloneOptions] @@ -22,7 +24,7 @@ IceGitClone >> cloneRepo: repo cloneOptions: cloneOptions remainingRetries: rema ] -{ #category : #actions } +{ #category : 'actions' } IceGitClone >> execute [ | repo cloneOptions checkoutOptions callbacks | @@ -34,6 +36,8 @@ IceGitClone >> execute [ repo := LGitRepository on: location. cloneOptions := repo cloneOptionsStructureClass withCredentialsProvider: (IceCredentialsProvider defaultForRemoteUrl: url). + Iceberg configureLGitProxyOpt: cloneOptions fetchOptions proxyOptions. + "Keeping references, because if not the GC take them." checkoutOptions := cloneOptions checkoutOptions. callbacks := cloneOptions fetchOptions callbacks. @@ -53,22 +57,22 @@ IceGitClone >> execute [ error acceptError: (IceLibgitErrorVisitor onContext: self) ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitClone >> location [ ^ location ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitClone >> location: aFileReference [ location := aFileReference ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitClone >> url [ ^ url ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitClone >> url: aString [ url := aString ] diff --git a/Iceberg-Libgit/IceGitCommit.class.st b/Iceberg-Libgit/IceGitCommit.class.st index 58c7437335..85fc953dac 100644 --- a/Iceberg-Libgit/IceGitCommit.class.st +++ b/Iceberg-Libgit/IceGitCommit.class.st @@ -1,6 +1,6 @@ Class { - #name : #IceGitCommit, - #superclass : #IceCommit, + #name : 'IceGitCommit', + #superclass : 'IceCommit', #instVars : [ 'id', 'author', @@ -9,10 +9,12 @@ Class { 'comment', 'packageNamesCache' ], - #category : #'Iceberg-Libgit-Core' + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #comparing } +{ #category : 'comparing' } IceGitCommit >> = aGitCommit [ (aGitCommit isKindOf: self species) @@ -20,51 +22,51 @@ IceGitCommit >> = aGitCommit [ ^ self id = aGitCommit id ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> ancestorIds [ ^ ancestorIds ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> ancestorIds: aCollection [ ancestorIds := aCollection ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> ancestors [ ^ ancestorIds collect: [ :each | repository lookupCommit: each ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> author [ ^ author ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> author: aString [ author := aString ] -{ #category : #'API - changes' } +{ #category : 'API - changes' } IceGitCommit >> changesFromCommit: anIceGitCommit [ | files | files := self repository changedFilesBetween: anIceGitCommit and: self. ^ files collect: [ :each | IceGitChange on: each ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> comment [ ^ comment ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> comment: aString [ comment := aString ] -{ #category : #ancestry } +{ #category : 'ancestry' } IceGitCommit >> commonAncestorWithCommit: anIceGitCommit [ repository handleLibgitError: [ | mergeBaseId | @@ -76,7 +78,7 @@ IceGitCommit >> commonAncestorWithCommit: anIceGitCommit [ ^ mergeBaseId ifNotNil: [ self repository lookupCommit: mergeBaseId ] ] ] -{ #category : #'API - tags' } +{ #category : 'API - tags' } IceGitCommit >> createTag: aString [ self repository handleLibgitError: [ @@ -89,23 +91,23 @@ IceGitCommit >> createTag: aString [ inRepository: self repository ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> datetime [ ^ datetime ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> datetime: aDateAndTime [ datetime := aDateAndTime ] -{ #category : #'accessing - file' } +{ #category : 'accessing - file' } IceGitCommit >> entryByPath: aString [ repository handleLibgitError: [ ^ (LGitCommit of: self repositoryHandle fromHexString: self id) entryByPath: aString ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> fetchPackageNames [ | writerClass dir | @@ -119,19 +121,19 @@ IceGitCommit >> fetchPackageNames [ thenCollect: [ :each | writerClass packageNameFromDirectory: each ] ] -{ #category : #'accessing - file' } +{ #category : 'accessing - file' } IceGitCommit >> fileSystem [ ^ (FileSystem onGitCommit: self libgitCommit) root ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> gitRef [ ^ self id ] -{ #category : #testing } +{ #category : 'testing' } IceGitCommit >> hasMultipleAncestors [ | ancestors | "using ancestorsIds because ancestors will instantiate parents and is slower" @@ -140,29 +142,29 @@ IceGitCommit >> hasMultipleAncestors [ and: [ ancestors size > 1 ] ] -{ #category : #comparing } +{ #category : 'comparing' } IceGitCommit >> hash [ ^ self id hash ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> id [ ^ id ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> id: aString [ id := aString ] -{ #category : #private } +{ #category : 'private' } IceGitCommit >> libgitCommit [ repository handleLibgitError: [ ^ LGitCommit of: self repositoryHandle fromHexString: self id ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> packageNames [ ^ self repository commitsInPackageCache @@ -170,7 +172,7 @@ IceGitCommit >> packageNames [ ifAbsentPut: [ self fetchPackageNames ] ] -{ #category : #'API - project' } +{ #category : 'API - project' } IceGitCommit >> project [ self flag: #todo. "This is a quick fix for issue https://github.com/pharo-vcs/iceberg/issues/1002 and this should probably be improved to also cover issue https://github.com/pharo-vcs/iceberg/issues/949 @@ -184,38 +186,38 @@ IceGitCommit >> project [ do: [ self repository fetch. IceProjectReader readProjectFrom: self ] ] -{ #category : #'API - properties' } +{ #category : 'API - properties' } IceGitCommit >> readerClass [ ^ self properties readerClass ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> repositoryHandle [ ^ repository repositoryHandle ] -{ #category : #'API - packages' } +{ #category : 'API - packages' } IceGitCommit >> resetPackageCache [ packageNamesCache := nil. ] -{ #category : #TOMOVE } +{ #category : 'TOMOVE' } IceGitCommit >> snapshotFor: package [ ^ [ (self repository mcVersionFor: (self versionFor: package)) snapshot ] on: IceVersionDoesNotExist do: [ :e | MCSnapshot empty ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommit >> timeStamp [ ^ self datetime ] -{ #category : #'API - properties' } +{ #category : 'API - properties' } IceGitCommit >> writerClass [ ^ self properties writerClass diff --git a/Iceberg-Libgit/IceGitFileRemote.class.st b/Iceberg-Libgit/IceGitFileRemote.class.st index 7299784e67..1bbfeb1c94 100644 --- a/Iceberg-Libgit/IceGitFileRemote.class.st +++ b/Iceberg-Libgit/IceGitFileRemote.class.st @@ -2,35 +2,37 @@ I am a 'remote' repository which is stored locally in your machine and accessed through a 'file://' url. " Class { - #name : #IceGitFileRemote, - #superclass : #IceGitRemote, + #name : 'IceGitFileRemote', + #superclass : 'IceGitRemote', #instVars : [ 'path' ], - #category : #'Iceberg-Libgit-Core' + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } IceGitFileRemote class >> canHandleUrl: aRepositoryUrl [ ^ (aRepositoryUrl beginsWith: 'file:') or: [aRepositoryUrl beginsWith: '/'] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitFileRemote >> detailedInfo [ ^ { 'Origin' -> path pathString } ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitFileRemote >> host [ ^ 'local filesystem' ] -{ #category : #querying } +{ #category : 'querying' } IceGitFileRemote >> organizer [ ^ 'local' ] -{ #category : #private } +{ #category : 'private' } IceGitFileRemote >> parseUrl [ | znUrl | znUrl := ZnUrl fromString: url defaultScheme: 'file'. @@ -39,7 +41,7 @@ IceGitFileRemote >> parseUrl [ ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitFileRemote >> projectName [ ^ path basename diff --git a/Iceberg-Libgit/IceGitHttpRemote.class.st b/Iceberg-Libgit/IceGitHttpRemote.class.st index fba2683b17..d0f0214a1e 100644 --- a/Iceberg-Libgit/IceGitHttpRemote.class.st +++ b/Iceberg-Libgit/IceGitHttpRemote.class.st @@ -4,24 +4,26 @@ A remote repository created out of a HTTP url, such as 'http://localhost/owner/ " Class { - #name : #IceGitHttpRemote, - #superclass : #IceGitNetworkRemote, - #category : #'Iceberg-Libgit-Core' + #name : 'IceGitHttpRemote', + #superclass : 'IceGitNetworkRemote', + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } IceGitHttpRemote class >> canHandleUrl: aRepositoryUrl [ ^ (aRepositoryUrl beginsWith: self protocolID, '://') ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } IceGitHttpRemote class >> defaultPort [ "Returns the HTTP default port" ^80 ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } IceGitHttpRemote class >> protocolID [ "Return the protocol identifier" diff --git a/Iceberg-Libgit/IceGitHttpsRemote.class.st b/Iceberg-Libgit/IceGitHttpsRemote.class.st index 949dcb3f94..0019c57c60 100644 --- a/Iceberg-Libgit/IceGitHttpsRemote.class.st +++ b/Iceberg-Libgit/IceGitHttpsRemote.class.st @@ -4,19 +4,21 @@ A remote repository created out of a HTTPS url, such as 'https://github.com/npa " Class { - #name : #IceGitHttpsRemote, - #superclass : #IceGitHttpRemote, - #category : #'Iceberg-Libgit-Core' + #name : 'IceGitHttpsRemote', + #superclass : 'IceGitHttpRemote', + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } IceGitHttpsRemote class >> defaultPort [ "Returns the HTTPS default port" ^443 ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } IceGitHttpsRemote class >> protocolID [ "Return the protocol identifier" diff --git a/Iceberg-Libgit/IceGitIndex.class.st b/Iceberg-Libgit/IceGitIndex.class.st index b29dfd8dec..4c081a9227 100644 --- a/Iceberg-Libgit/IceGitIndex.class.st +++ b/Iceberg-Libgit/IceGitIndex.class.st @@ -1,13 +1,15 @@ Class { - #name : #IceGitIndex, - #superclass : #IceIndex, + #name : 'IceGitIndex', + #superclass : 'IceIndex', #instVars : [ 'modifiedFilePaths' ], - #category : #'Iceberg-Libgit-Core' + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #adding } +{ #category : 'adding' } IceGitIndex >> addPackage: anIcePackageDefinition [ | pathSegments | @@ -16,19 +18,19 @@ IceGitIndex >> addPackage: anIcePackageDefinition [ self addPath: (RelativePath withAll: pathSegments) ] -{ #category : #storing } +{ #category : 'storing' } IceGitIndex >> addPath: aPath [ modifiedFilePaths add: aPath ] -{ #category : #operations } +{ #category : 'operations' } IceGitIndex >> addToGitIndex [ repository addFilesToIndex: modifiedFilePaths. ] -{ #category : #'API - commiting' } +{ #category : 'API - commiting' } IceGitIndex >> commitWithMessage: message andParents: parentCommits [ | index | @@ -60,33 +62,33 @@ IceGitIndex >> commitWithMessage: message andParents: parentCommits [ ^ repository commitFromGitCommit: (LGitCommit of: self repositoryHandle fromId: commitId)] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitIndex >> includes: aRelativePath [ ^ modifiedFilePaths includes: aRelativePath ] -{ #category : #initialization } +{ #category : 'initialization' } IceGitIndex >> initialize [ super initialize. modifiedFilePaths := Set new ] -{ #category : #testing } +{ #category : 'testing' } IceGitIndex >> isEmpty [ ^ modifiedFilePaths isEmpty ] -{ #category : #'API - commiting' } +{ #category : 'API - commiting' } IceGitIndex >> libGitCommitsFrom: aLGitRepository for: aListOfCommitish [ ^ aListOfCommitish collect: [ :commitish | LGitCommit of: aLGitRepository fromId: (LGitId fromHexString: commitish id) ] ] -{ #category : #storing } +{ #category : 'storing' } IceGitIndex >> removeFileDefinition: anIceFileDefinition [ (repository location resolve: anIceFileDefinition path) @@ -95,14 +97,14 @@ IceGitIndex >> removeFileDefinition: anIceFileDefinition [ self addPath: anIceFileDefinition path ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitIndex >> repositoryHandle [ ^ repository repositoryHandle ] -{ #category : #storing } +{ #category : 'storing' } IceGitIndex >> storeFileDefinition: anIceFileDefinition [ (repository location resolve: anIceFileDefinition path) @@ -113,7 +115,7 @@ IceGitIndex >> storeFileDefinition: anIceFileDefinition [ self addPath: anIceFileDefinition path ] -{ #category : #storing } +{ #category : 'storing' } IceGitIndex >> storeMCVersion: aMCVersion [ | pathSegments | @@ -126,13 +128,13 @@ IceGitIndex >> storeMCVersion: aMCVersion [ self addPath: (RelativePath withAll: pathSegments) ] -{ #category : #storing } +{ #category : 'storing' } IceGitIndex >> storeVersion: aMCVersion [ repository internalStoreVersion: aMCVersion ] -{ #category : #updating } +{ #category : 'updating' } IceGitIndex >> updateDiskWorkingCopy: anIceDiff [ anIceDiff tree accept: diff --git a/Iceberg-Libgit/IceGitLocalBranch.class.st b/Iceberg-Libgit/IceGitLocalBranch.class.st index 86c55a68c4..1f2f236fa1 100644 --- a/Iceberg-Libgit/IceGitLocalBranch.class.st +++ b/Iceberg-Libgit/IceGitLocalBranch.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceGitLocalBranch, - #superclass : #IceLocalBranch, - #category : #'Iceberg-Libgit-Core' + #name : 'IceGitLocalBranch', + #superclass : 'IceLocalBranch', + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #'private - pushing' } +{ #category : 'private - pushing' } IceGitLocalBranch >> basicPushTo: aRemote [ | gitRemote | @@ -32,13 +34,13 @@ IceGitLocalBranch >> basicPushTo: aRemote [ yourself) ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitLocalBranch >> branchNamePrefix [ ^ 'refs/heads/' ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitLocalBranch >> commit [ repository handleLibgitError: [ | gitCommit gitId | @@ -47,7 +49,7 @@ IceGitLocalBranch >> commit [ ^ self repository commitFromGitCommit: gitCommit ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitLocalBranch >> commit: anIceGitCommit [ "Update the branch to point to a commit. If the branch is HEAD, check it out in disk also." @@ -65,74 +67,94 @@ IceGitLocalBranch >> commit: anIceGitCommit [ yourself) ]] ] -{ #category : #'API - branches' } +{ #category : 'API - branches' } IceGitLocalBranch >> delete [ repository handleLibgitError: [ | found | found := self repositoryHandle lookupLocalBranch: self name ifAbsent: [ nil ]. self repositoryHandle deleteBranch: found ] ] -{ #category : #'file-access' } +{ #category : 'file-access' } IceGitLocalBranch >> fileSystem [ ^ self commit fileSystem ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitLocalBranch >> gitRef [ ^ self name ] -{ #category : #'private - tracking' } +{ #category : 'private - tracking' } IceGitLocalBranch >> hasUpstream [ self upstreamIfNone: [ ^ false ]. ^ true ] -{ #category : #merging } +{ #category : 'merging' } IceGitLocalBranch >> mergeWithBranch: anIceGitRemoteBranch [ self shouldBeImplemented. ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitLocalBranch >> name [ ^ self fullname withoutPrefix: self branchNamePrefix ] -{ #category : #'private - pushing' } +{ #category : 'private - pushing' } IceGitLocalBranch >> pushBranchToRemote: aRemote gitRemote: gitRemote progress: pushProgress [ - - gitRemote + + | pushOptions | + pushOptions := gitRemote ffiLibrary uniqueInstance + pushOptionsStructureClass defaults + callbacks: + ((gitRemote ffiLibrary uniqueInstance + remoteCallbacksStructureClass withProvider: + (IceCredentialsProvider defaultForRemote: + aRemote)) + pushTransferProgress: pushProgress; + yourself); + yourself. + + Iceberg configureLGitProxyOpt: pushOptions proxyOptions. + + gitRemote pushWithRefSpec: (LGitRefSpec new - source: self fullname; - destination: self fullname; - yourself) - pushOptions: (gitRemote ffiLibrary uniqueInstance pushOptionsStructureClass defaults - callbacks: ((gitRemote ffiLibrary uniqueInstance remoteCallbacksStructureClass withProvider: (IceCredentialsProvider defaultForRemote: aRemote)) - pushTransferProgress: pushProgress; - yourself); - yourself) + source: self fullname; + destination: self fullname; + yourself) + pushOptions: pushOptions ] -{ #category : #'private - pushing' } +{ #category : 'private - pushing' } IceGitLocalBranch >> pushTag: tag toRemote: aRemote gitRemote: gitRemote progress: pushProgress [ - gitRemote + | pushOptions | + pushOptions := gitRemote ffiLibrary uniqueInstance + pushOptionsStructureClass defaults + callbacks: + ((gitRemote ffiLibrary uniqueInstance + remoteCallbacksStructureClass withProvider: + (IceCredentialsProvider defaultForRemote: + aRemote)) + pushTransferProgress: pushProgress; + yourself); + yourself. + + Iceberg configureLGitProxyOpt: pushOptions proxyOptions. + + gitRemote pushWithRefSpec: (LGitRefSpec new - source: 'refs/tags/' , tag name; - destination: 'refs/tags/' , tag name; - yourself) - pushOptions: (gitRemote ffiLibrary uniqueInstance pushOptionsStructureClass defaults - callbacks: ((gitRemote ffiLibrary uniqueInstance remoteCallbacksStructureClass withProvider: (IceCredentialsProvider defaultForRemote: aRemote)) - pushTransferProgress: pushProgress; - yourself); - yourself) + source: 'refs/tags/' , tag name; + destination: 'refs/tags/' , tag name; + yourself) + pushOptions: pushOptions ] -{ #category : #'private - pushing' } +{ #category : 'private - pushing' } IceGitLocalBranch >> pushTagsToRemote: aRemote gitRemote: gitRemote progress: pushProgress [ self tags do: [ :tag | @@ -143,21 +165,21 @@ IceGitLocalBranch >> pushTagsToRemote: aRemote gitRemote: gitRemote progress: pu progress: pushProgress ] ] -{ #category : #'API - remotes' } +{ #category : 'API - remotes' } IceGitLocalBranch >> pushTo: aRemote [ repository handleLibgitError: [ self basicPushTo: aRemote ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitLocalBranch >> repositoryHandle [ ^ repository repositoryHandle ] -{ #category : #'API - remotes' } +{ #category : 'API - remotes' } IceGitLocalBranch >> setUpstream: anIceGitRemoteBranch [ repository handleLibgitError: [ | localBranch | @@ -165,20 +187,20 @@ IceGitLocalBranch >> setUpstream: anIceGitRemoteBranch [ localBranch setUpstream: anIceGitRemoteBranch gitRef ] ] -{ #category : #'private - pushing' } +{ #category : 'private - pushing' } IceGitLocalBranch >> setUpstreamIfMissing: aRemote [ self hasUpstream ifTrue: [ ^ self ]. self setUpstream: (aRemote remoteBranchNamed: self gitRef) ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitLocalBranch >> shortname [ ^ self name ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitLocalBranch >> trackedBranch [ | upstream | @@ -189,19 +211,19 @@ IceGitLocalBranch >> trackedBranch [ ^ upstream ] -{ #category : #tracking } +{ #category : 'tracking' } IceGitLocalBranch >> tracksRemoteBranch [ ^ self hasUpstream ] -{ #category : #'private - tracking' } +{ #category : 'private - tracking' } IceGitLocalBranch >> upstream [ ^ self upstreamIfNone: [ IceUpstreamNotConfigured signal ] ] -{ #category : #'private - tracking' } +{ #category : 'private - tracking' } IceGitLocalBranch >> upstreamIfNone: aBlock [ repository handleLibgitError: [ | localBranch gitUpstream | localBranch := self repositoryHandle lookupLocalBranch: self name. diff --git a/Iceberg-Libgit/IceGitNetworkRemote.class.st b/Iceberg-Libgit/IceGitNetworkRemote.class.st index 38735c7e88..44457b73e7 100644 --- a/Iceberg-Libgit/IceGitNetworkRemote.class.st +++ b/Iceberg-Libgit/IceGitNetworkRemote.class.st @@ -2,8 +2,8 @@ Base abstract class for SCP and HTTPS remotes. " Class { - #name : #IceGitNetworkRemote, - #superclass : #IceGitRemote, + #name : 'IceGitNetworkRemote', + #superclass : 'IceGitRemote', #instVars : [ 'user', 'host', @@ -11,27 +11,29 @@ Class { 'path', 'owner' ], - #category : #'Iceberg-Libgit-Core' + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } IceGitNetworkRemote class >> canHandleUrl: aString [ "I am abstract I can't handle any url." ^ false ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } IceGitNetworkRemote class >> defaultPort [ ^self subclassResponsibility ] -{ #category : #testing } +{ #category : 'testing' } IceGitNetworkRemote class >> isAbstract [ ^ self == IceGitNetworkRemote ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitNetworkRemote >> detailedInfo [ ^ { 'Origin' -> self url. @@ -41,22 +43,22 @@ IceGitNetworkRemote >> detailedInfo [ } ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitNetworkRemote >> host [ ^ host ] -{ #category : #querying } +{ #category : 'querying' } IceGitNetworkRemote >> organizer [ ^ self owner ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitNetworkRemote >> owner [ ^ owner ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitNetworkRemote >> parseUrl [ | znUrl | znUrl := ZnUrl fromString: url. @@ -72,23 +74,23 @@ IceGitNetworkRemote >> parseUrl [ projectName := self stripPossibleExtension: (znUrl segments last). ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitNetworkRemote >> path [ ^path ifNil: [ path := OrderedCollection new ]. ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitNetworkRemote >> port [ ^port ifNil: [ self class defaultPort ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitNetworkRemote >> portName [ ^self port asString ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitNetworkRemote >> projectPath [ | projectPath | @@ -99,26 +101,26 @@ IceGitNetworkRemote >> projectPath [ ^ (RelativePath withAll: projectPath) pathString ] -{ #category : #comparing } +{ #category : 'comparing' } IceGitNetworkRemote >> referencesSameRemoteLocationAs: another [ ^ (self httpsUrl withoutSuffix: '.git') sameAs: (another httpsUrl withoutSuffix: '.git') ] -{ #category : #private } +{ #category : 'private' } IceGitNetworkRemote >> stripPossibleExtension: aString [ ^ (aString endsWith: '.git') ifTrue: [ aString allButLast: 4 ] ifFalse: [ aString ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitNetworkRemote >> user [ ^user ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitNetworkRemote >> userName [ ^user ifNil: [ '' ] diff --git a/Iceberg-Libgit/IceGitRemote.class.st b/Iceberg-Libgit/IceGitRemote.class.st index 06bffe6ca0..b3981f5cca 100644 --- a/Iceberg-Libgit/IceGitRemote.class.st +++ b/Iceberg-Libgit/IceGitRemote.class.st @@ -1,34 +1,36 @@ Class { - #name : #IceGitRemote, - #superclass : #IceRemote, - #category : #'Iceberg-Libgit-Core' + #name : 'IceGitRemote', + #superclass : 'IceRemote', + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } IceGitRemote class >> canHandleUrl: aRepositoryUrl [ ^ self subclassResponsibility ] -{ #category : #testing } +{ #category : 'testing' } IceGitRemote class >> isAbstract [ ^ self == IceGitRemote ] -{ #category : #testing } +{ #category : 'testing' } IceGitRemote class >> isValidUrl: aRepositoryUrl [ ^ self allSubclasses anySatisfy: [ :subclass | subclass canHandleUrl: aRepositoryUrl ] ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } IceGitRemote class >> name: aName url: anUrl [ ^ (self url: anUrl) name: aName; yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } IceGitRemote class >> url: aRepositoryUrl [ self allSubclasses detect: [ :subclass | subclass canHandleUrl: aRepositoryUrl ] @@ -36,52 +38,56 @@ IceGitRemote class >> url: aRepositoryUrl [ ifNone: [ IceWrongUrl signal: 'Remote repository scheme not supported: ', aRepositoryUrl ] ] -{ #category : #comparing } +{ #category : 'comparing' } IceGitRemote >> = another [ ^ self species = another species and: [ self referencesSameRemoteLocationAs: another ] ] -{ #category : #branches } +{ #category : 'branches' } IceGitRemote >> branches [ ^ self localRepository remoteTrackedBranches select: [ :e | e remoteName = self name ] ] -{ #category : #fetching } -IceGitRemote >> fetch [ - +{ #category : 'fetching' } +IceGitRemote >> doFetchWithRefSpec: refSpec [ + localRepository handleLibgitError: [ - [ (LGitRemote of: self repositoryHandle named: self name) + [ + (LGitRemote of: self repositoryHandle named: self name) lookup; - fetchWithCredentials: (IceCredentialsProvider defaultForRemote: self) - andProgressCallback: IceGitTransferProgress new ] + fetchWithCredentials: + (IceCredentialsProvider defaultForRemote: self) + andProgressCallback: IceGitTransferProgress new + refSpec: refSpec + proxyConfigurationBlock: [ :proxyOpt | Iceberg configureLGitProxyOpt: proxyOpt ] ] on: LGitAbstractError - do: [ :e | e acceptError: (IceLibgitErrorVisitor onContext: self) ]. - - "Call post fetch to fix unknown commits" - localRepository postFetch ] + do: [ :e | e acceptError: (IceLibgitErrorVisitor onContext: self) ] ] +] + +{ #category : 'fetching' } +IceGitRemote >> fetch [ + + self doFetchWithRefSpec: nil. + + "Call post fetch to fix unknown commits" + localRepository postFetch ] -{ #category : #fetching } +{ #category : 'fetching' } IceGitRemote >> fetchBranch: aBranch [ - - localRepository handleLibgitError: [ - [ | refSpec remote | - refSpec := LGitRefSpec - fromString: - ('{2}:refs/remotes/{1}/{2}' - format: - {self name. - aBranch name}). - (remote := LGitRemote of: self repositoryHandle named: self name) - lookup; - fetchWithCredentials: (IceCredentialsProvider defaultForRemote: self) refSpec: refSpec ] - on: LGitAbstractError - do: [ :e | e acceptError: (IceLibgitErrorVisitor onContext: self) ] ] + + | refSpec | + refSpec := LGitRefSpec fromString: + ('{2}:refs/remotes/{1}/{2}' format: { + self name. + aBranch name }). + + self doFetchWithRefSpec: refSpec ] -{ #category : #branches } +{ #category : 'branches' } IceGitRemote >> remoteBranchNamed: aString ifPresent: presentBlock ifAbsent: absentBlock [ localRepository handleLibgitError: [ @@ -94,7 +100,7 @@ IceGitRemote >> remoteBranchNamed: aString ifPresent: presentBlock ifAbsent: abs ifNil: absentBlock ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitRemote >> repositoryHandle [ diff --git a/Iceberg-Libgit/IceGitRemoteBranch.class.st b/Iceberg-Libgit/IceGitRemoteBranch.class.st index b353f51311..fd596cd87e 100644 --- a/Iceberg-Libgit/IceGitRemoteBranch.class.st +++ b/Iceberg-Libgit/IceGitRemoteBranch.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceGitRemoteBranch, - #superclass : #IceRemoteBranch, - #category : #'Iceberg-Libgit-Core' + #name : 'IceGitRemoteBranch', + #superclass : 'IceRemoteBranch', + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } IceGitRemoteBranch >> commit [ repository handleLibgitError: [ | gitCommit gitId | @@ -13,7 +15,7 @@ IceGitRemoteBranch >> commit [ ^ self repository commitFromGitCommit: gitCommit ] ] -{ #category : #'API - branches' } +{ #category : 'API - branches' } IceGitRemoteBranch >> delete [ repository handleLibgitError: [ | found | @@ -21,43 +23,43 @@ IceGitRemoteBranch >> delete [ self repositoryHandle deleteBranch: found ] ] -{ #category : #filesystem } +{ #category : 'filesystem' } IceGitRemoteBranch >> fileSystem [ ^ self commit fileSystem ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitRemoteBranch >> gitRef [ ^ self name ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitRemoteBranch >> name [ ^ self fullname withoutPrefix: self prefix ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitRemoteBranch >> prefix [ ^ 'refs/remotes/' ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitRemoteBranch >> remoteName [ ^ (self fullname substrings: '/') third ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitRemoteBranch >> repositoryHandle [ ^ repository repositoryHandle ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitRemoteBranch >> shortname [ ^ self name withoutPrefix: self remoteName, '/' diff --git a/Iceberg-Libgit/IceGitScpRemote.class.st b/Iceberg-Libgit/IceGitScpRemote.class.st index a2370bdaa4..8a1b6b3301 100644 --- a/Iceberg-Libgit/IceGitScpRemote.class.st +++ b/Iceberg-Libgit/IceGitScpRemote.class.st @@ -4,12 +4,14 @@ A remote repository created out of a SCP url, such as 'git@github.com:npasserini " Class { - #name : #IceGitScpRemote, - #superclass : #IceGitNetworkRemote, - #category : #'Iceberg-Libgit-Core' + #name : 'IceGitScpRemote', + #superclass : 'IceGitNetworkRemote', + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } IceGitScpRemote class >> canHandleUrl: aUrl [ "Very simplistic implementation that does not cover all cases. Either there is the ssh scheme or treat all non absolute paths as SSH" @@ -17,41 +19,41 @@ IceGitScpRemote class >> canHandleUrl: aUrl [ ^ (self isSSHUrl: aUrl) or: [ self isAlternateSSHUrl: aUrl ] ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } IceGitScpRemote class >> defaultPort [ ^ 22 ] -{ #category : #testing } +{ #category : 'testing' } IceGitScpRemote class >> isAlternateSSHUrl: aUrl [ "Definition taken from https://stackoverflow.com/questions/14348874/git-repository-url-ssh-syntax-without-absolute-path" ^ (aUrl includesSubstring: '://') not and: [ (aUrl beginsWith: '/') not ] ] -{ #category : #testing } +{ #category : 'testing' } IceGitScpRemote class >> isSSHUrl: aUrl [ ^ aUrl beginsWith: 'ssh://' ] -{ #category : #'private - patches' } +{ #category : 'private - patches' } IceGitScpRemote >> httpsUrl [ ^ 'https://{1}/{2}.git' format: { self host . self projectPath } ] -{ #category : #testing } +{ #category : 'testing' } IceGitScpRemote >> isAlternateSSHUrl: aString [ ^ self class isAlternateSSHUrl: aString ] -{ #category : #testing } +{ #category : 'testing' } IceGitScpRemote >> isSSHUrl: aString [ ^ self class isSSHUrl: aString ] -{ #category : #'private - patches' } +{ #category : 'private - patches' } IceGitScpRemote >> parseUrl [ | urlStream restSegments | (self isSSHUrl: url) diff --git a/Iceberg-Libgit/IceGitSshRemote.class.st b/Iceberg-Libgit/IceGitSshRemote.class.st index eb06776166..728c3bda7c 100644 --- a/Iceberg-Libgit/IceGitSshRemote.class.st +++ b/Iceberg-Libgit/IceGitSshRemote.class.st @@ -4,22 +4,24 @@ A remote repository created out of a git url, such as 'git://localhost/owner/re " Class { - #name : #IceGitSshRemote, - #superclass : #IceGitNetworkRemote, - #category : #'Iceberg-Libgit-Core' + #name : 'IceGitSshRemote', + #superclass : 'IceGitNetworkRemote', + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } IceGitSshRemote class >> canHandleUrl: aRepositoryUrl [ ^ aRepositoryUrl beginsWith: 'git://' ] -{ #category : #'accessing - defaults' } +{ #category : 'accessing - defaults' } IceGitSshRemote class >> defaultPort [ ^9418 ] -{ #category : #'private - patches' } +{ #category : 'private - patches' } IceGitSshRemote >> httpsUrl [ ^ 'https://{1}/{2}.git' format: { self host . self projectPath } diff --git a/Iceberg-Libgit/IceGitUnbornBranch.class.st b/Iceberg-Libgit/IceGitUnbornBranch.class.st index f0aaa8f118..bfb6f50102 100644 --- a/Iceberg-Libgit/IceGitUnbornBranch.class.st +++ b/Iceberg-Libgit/IceGitUnbornBranch.class.st @@ -1,16 +1,18 @@ Class { - #name : #IceGitUnbornBranch, - #superclass : #IceUnbornBranch, - #category : #'Iceberg-Libgit-Core' + #name : 'IceGitUnbornBranch', + #superclass : 'IceUnbornBranch', + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } IceGitUnbornBranch >> branchNamePrefix [ ^ 'refs/heads/' ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitUnbornBranch >> gitRef [ "When the repository is unborn, the repository has a single ref that points to no commits. The HEAD file then contains some content such as: @@ -21,7 +23,7 @@ IceGitUnbornBranch >> gitRef [ ^ ((repository location / '.git' / 'HEAD') contents withoutPrefix: 'ref: ') trimBoth ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitUnbornBranch >> name [ "Remove the refs/heads prefix from the full branch name" ^ self gitRef withoutPrefix: self branchNamePrefix diff --git a/Iceberg-Libgit/IceGitWorkingCopyUpdateVisitor.class.st b/Iceberg-Libgit/IceGitWorkingCopyUpdateVisitor.class.st index 54c69eed46..59bbfffb05 100644 --- a/Iceberg-Libgit/IceGitWorkingCopyUpdateVisitor.class.st +++ b/Iceberg-Libgit/IceGitWorkingCopyUpdateVisitor.class.st @@ -1,60 +1,62 @@ Class { - #name : #IceGitWorkingCopyUpdateVisitor, - #superclass : #IceTreeVisitor, + #name : 'IceGitWorkingCopyUpdateVisitor', + #superclass : 'IceTreeVisitor', #instVars : [ 'repository', 'diff', 'index' ], - #category : #'Iceberg-Libgit-Commit' + #category : 'Iceberg-Libgit-Commit', + #package : 'Iceberg-Libgit', + #tag : 'Commit' } -{ #category : #accessing } +{ #category : 'accessing' } IceGitWorkingCopyUpdateVisitor >> diff: anIceDiff [ diff := anIceDiff ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitWorkingCopyUpdateVisitor >> index: anIndex [ index := anIndex ] -{ #category : #operations } +{ #category : 'operations' } IceGitWorkingCopyUpdateVisitor >> removeFile: anIceFileDefinition [ (repository location resolvePath: anIceFileDefinition path) ensureDelete ] -{ #category : #actions } +{ #category : 'actions' } IceGitWorkingCopyUpdateVisitor >> removeFileReferenceInPath: aPath [ (repository workingCopy fileSystem resolve: aPath) ensureDeleteAll ] -{ #category : #operations } +{ #category : 'operations' } IceGitWorkingCopyUpdateVisitor >> removePackage: aDefinition [ (repository location resolvePath: aDefinition path) ensureDeleteAll ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitWorkingCopyUpdateVisitor >> repository: anIceLibgitRepository [ repository := anIceLibgitRepository ] -{ #category : #visiting } +{ #category : 'visiting' } IceGitWorkingCopyUpdateVisitor >> visitAddition: anIceAddition [ anIceAddition definition accept: self ] -{ #category : #visiting } +{ #category : 'visiting' } IceGitWorkingCopyUpdateVisitor >> visitDirectoryDefinition: anIceDirectoryDefinition [ self visitChildrenOf: currentNode ] -{ #category : #visiting } +{ #category : 'visiting' } IceGitWorkingCopyUpdateVisitor >> visitFileNode: anIceFileDefinition [ | reference | @@ -66,25 +68,25 @@ IceGitWorkingCopyUpdateVisitor >> visitFileNode: anIceFileDefinition [ writeStream nextPutAll: anIceFileDefinition basicContents ]. ] -{ #category : #visiting } +{ #category : 'visiting' } IceGitWorkingCopyUpdateVisitor >> visitModification: anIceModification [ ^ anIceModification leftDefinition accept: self ] -{ #category : #visiting } +{ #category : 'visiting' } IceGitWorkingCopyUpdateVisitor >> visitNoModification: anIceNoModification [ anIceNoModification definition accept: self ] -{ #category : #visiting } +{ #category : 'visiting' } IceGitWorkingCopyUpdateVisitor >> visitNonConflictingOperation: anIceNonConflictingOperation [ anIceNonConflictingOperation chosenOperation accept: self ] -{ #category : #visiting } +{ #category : 'visiting' } IceGitWorkingCopyUpdateVisitor >> visitPackage: anIcePackageDefinition [ "I am a package, I have to export my changes using the repository format. @@ -114,13 +116,13 @@ IceGitWorkingCopyUpdateVisitor >> visitPackage: anIcePackageDefinition [ index storeVersion: version ] -{ #category : #visiting } +{ #category : 'visiting' } IceGitWorkingCopyUpdateVisitor >> visitRemoval: anIceRemoval [ anIceRemoval definition removeFrom: self ] -{ #category : #visiting } +{ #category : 'visiting' } IceGitWorkingCopyUpdateVisitor >> visitRootDefinition: anIceRootDefinition [ self visitChildrenOf: currentNode diff --git a/Iceberg-Libgit/IceIndexUpdateVisitor.class.st b/Iceberg-Libgit/IceIndexUpdateVisitor.class.st index 3d32c8c960..122ae237cf 100644 --- a/Iceberg-Libgit/IceIndexUpdateVisitor.class.st +++ b/Iceberg-Libgit/IceIndexUpdateVisitor.class.st @@ -1,79 +1,81 @@ Class { - #name : #IceIndexUpdateVisitor, - #superclass : #IceTreeVisitor, + #name : 'IceIndexUpdateVisitor', + #superclass : 'IceTreeVisitor', #instVars : [ 'diff', 'index' ], - #category : #'Iceberg-Libgit-Commit' + #category : 'Iceberg-Libgit-Commit', + #package : 'Iceberg-Libgit', + #tag : 'Commit' } -{ #category : #accessing } +{ #category : 'accessing' } IceIndexUpdateVisitor >> diff: anIceDiff [ diff := anIceDiff ] -{ #category : #accessing } +{ #category : 'accessing' } IceIndexUpdateVisitor >> index: anIndex [ index := anIndex ] -{ #category : #accessing } +{ #category : 'accessing' } IceIndexUpdateVisitor >> repository [ ^ index repository ] -{ #category : #visiting } +{ #category : 'visiting' } IceIndexUpdateVisitor >> visitAddition: anIceAddition [ anIceAddition definition accept: self ] -{ #category : #visiting } +{ #category : 'visiting' } IceIndexUpdateVisitor >> visitDirectoryDefinition: anIceDirectoryDefinition [ self visitChildrenOf: currentNode ] -{ #category : #visiting } +{ #category : 'visiting' } IceIndexUpdateVisitor >> visitFileNode: anIceFileDefinition [ index addPath: anIceFileDefinition path ] -{ #category : #visiting } +{ #category : 'visiting' } IceIndexUpdateVisitor >> visitModification: anIceModification [ ^ anIceModification leftDefinition accept: self ] -{ #category : #visiting } +{ #category : 'visiting' } IceIndexUpdateVisitor >> visitNoModification: anIceNoModification [ anIceNoModification definition accept: self ] -{ #category : #visiting } +{ #category : 'visiting' } IceIndexUpdateVisitor >> visitNonConflictingOperation: anIceNonConflictingOperation [ anIceNonConflictingOperation chosenOperation accept: self ] -{ #category : #visiting } +{ #category : 'visiting' } IceIndexUpdateVisitor >> visitPackage: anIcePackageDefinition [ index addPackage: anIcePackageDefinition ] -{ #category : #visiting } +{ #category : 'visiting' } IceIndexUpdateVisitor >> visitRemoval: anIceRemoval [ "Do the same as an addition" self visitAddition: anIceRemoval ] -{ #category : #visiting } +{ #category : 'visiting' } IceIndexUpdateVisitor >> visitRootDefinition: anIceRootDefinition [ self visitChildrenOf: currentNode diff --git a/Iceberg-Libgit/IceLibgitCommitWalk.class.st b/Iceberg-Libgit/IceLibgitCommitWalk.class.st index 2ac805ce81..08816b49ca 100644 --- a/Iceberg-Libgit/IceLibgitCommitWalk.class.st +++ b/Iceberg-Libgit/IceLibgitCommitWalk.class.st @@ -2,16 +2,18 @@ Utility class for searching through a commit history taking advantage of git revwalk utilities. Found and returned commits will be added to the commit cache of the corresponding IceRepository. " Class { - #name : #IceLibgitCommitWalk, - #superclass : #IceAbstractCommitWalk, + #name : 'IceLibgitCommitWalk', + #superclass : 'IceAbstractCommitWalk', #instVars : [ 'revwalk', 'lgitRepository' ], - #category : #'Iceberg-Libgit-Core' + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #walking } +{ #category : 'walking' } IceLibgitCommitWalk >> commitsDo: aBlock [ self maxNumber ifNil: [ super commitsDo: aBlock ] @@ -26,7 +28,7 @@ IceLibgitCommitWalk >> commitsDo: aBlock [ ] -{ #category : #'walk definition' } +{ #category : 'walk definition' } IceLibgitCommitWalk >> fromBranch: branch [ [ self revwalk pushReference: (lgitRepository lookupBranch: (branch isRemote ifTrue: [branch fullname] ifFalse: [ branch shortname ]) remote: branch isRemote) ] on: LGit_GIT_EINVALIDSPEC do: [ @@ -38,27 +40,27 @@ IceLibgitCommitWalk >> fromBranch: branch [ ] -{ #category : #'walk definition' } +{ #category : 'walk definition' } IceLibgitCommitWalk >> fromCommit: commit [ self fromCommitId: commit id ] -{ #category : #'walk definition' } +{ #category : 'walk definition' } IceLibgitCommitWalk >> fromCommitId: commitId [ self fromLGitId: (LGitId fromHexString: commitId) ] -{ #category : #'walk definition' } +{ #category : 'walk definition' } IceLibgitCommitWalk >> fromHead [ self revwalk pushHead ] -{ #category : #'walk definition' } +{ #category : 'walk definition' } IceLibgitCommitWalk >> fromLGitId: lGitId [ self revwalk pushCommit: lGitId ] -{ #category : #'walk definition' } +{ #category : 'walk definition' } IceLibgitCommitWalk >> fromTag: tag [ self revwalk. ^ self fromLGitId: (lgitRepository revparse: tag name) id @@ -66,21 +68,21 @@ IceLibgitCommitWalk >> fromTag: tag [ ] -{ #category : #private } +{ #category : 'private' } IceLibgitCommitWalk >> rawResultsDo: aBlockClosure [ self revwalk select: [ :result | self shouldInclude: result ] thenDo: aBlockClosure ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitCommitWalk >> repositoryHandle [ ^ repository repositoryHandle ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitCommitWalk >> revwalk [ repository handleLibgitError: [ @@ -93,7 +95,7 @@ IceLibgitCommitWalk >> revwalk [ revwalk ]] ] -{ #category : #private } +{ #category : 'private' } IceLibgitCommitWalk >> shouldInclude: aLGitCommit [ ^ self modifyingPackage ifNil: [ true ] @@ -102,7 +104,7 @@ IceLibgitCommitWalk >> shouldInclude: aLGitCommit [ ] -{ #category : #'walk definition' } +{ #category : 'walk definition' } IceLibgitCommitWalk >> uptoCommit: commit [ self revwalk hideCommit: (LGitId fromHexString: commit id) ] diff --git a/Iceberg-Libgit/IceLibgitErrorVisitor.class.st b/Iceberg-Libgit/IceLibgitErrorVisitor.class.st index 7221b4a4d6..38dfa13180 100644 --- a/Iceberg-Libgit/IceLibgitErrorVisitor.class.st +++ b/Iceberg-Libgit/IceLibgitErrorVisitor.class.st @@ -8,15 +8,17 @@ I also have a context, which points to the object that is requesting the excepti This context is used to obtain more information about the operation that failed, usually not provided by Libgit, such as urls, locations, etc. " Class { - #name : #IceLibgitErrorVisitor, - #superclass : #Object, + #name : 'IceLibgitErrorVisitor', + #superclass : 'Object', #instVars : [ 'context' ], - #category : #'Iceberg-Libgit-Exceptions' + #category : 'Iceberg-Libgit-Exceptions', + #package : 'Iceberg-Libgit', + #tag : 'Exceptions' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } IceLibgitErrorVisitor class >> onContext: aContext [ ^ self new @@ -24,24 +26,24 @@ IceLibgitErrorVisitor class >> onContext: aContext [ yourself ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitErrorVisitor >> context [ ^ context ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitErrorVisitor >> context: anObject [ context := anObject ] -{ #category : #visiting } +{ #category : 'visiting' } IceLibgitErrorVisitor >> visitECONFLICT: anError [ anError object = LGitErrorTypeEnum giterr_checkout ifTrue: [ ^ anError resignalAs: IceCheckoutConflictError new ]. self visitGenericError: anError ] -{ #category : #visiting } +{ #category : 'visiting' } IceLibgitErrorVisitor >> visitEEOF: aLGit_GIT_EEOF [ aLGit_GIT_EEOF messageText trimmed = 'ERROR: Repository not found.' @@ -50,7 +52,7 @@ IceLibgitErrorVisitor >> visitEEOF: aLGit_GIT_EEOF [ ^ self visitGenericError: aLGit_GIT_EEOF ] -{ #category : #visiting } +{ #category : 'visiting' } IceLibgitErrorVisitor >> visitEEXISTS: anError [ (anError messageText asLowercase beginsWith: 'failed to write reference ''refs/tags') @@ -66,13 +68,13 @@ IceLibgitErrorVisitor >> visitEEXISTS: anError [ self visitGenericError: anError ] -{ #category : #visiting } +{ #category : 'visiting' } IceLibgitErrorVisitor >> visitENOTFOUND: anError [ NotFound signal: anError messageText ] -{ #category : #visiting } +{ #category : 'visiting' } IceLibgitErrorVisitor >> visitERROR: anError [ (anError object = LGitErrorTypeEnum giterr_ssh) @@ -93,7 +95,7 @@ IceLibgitErrorVisitor >> visitERROR: anError [ self visitGenericError: anError ] -{ #category : #visiting } +{ #category : 'visiting' } IceLibgitErrorVisitor >> visitEUSER: anError [ "Since user errors do not have a code, they can can just be handled by analysis of messageText. String comparisson is not the thing in history, but for not it will @@ -105,7 +107,7 @@ IceLibgitErrorVisitor >> visitEUSER: anError [ self visitGenericError: anError ] -{ #category : #visiting } +{ #category : 'visiting' } IceLibgitErrorVisitor >> visitGenericError: anError [ IceGenericError new diff --git a/Iceberg-Libgit/IceLibgitRepository.class.st b/Iceberg-Libgit/IceLibgitRepository.class.st index fe29a55322..1a52008d33 100644 --- a/Iceberg-Libgit/IceLibgitRepository.class.st +++ b/Iceberg-Libgit/IceLibgitRepository.class.st @@ -5,8 +5,8 @@ I have a handle to a LGitRepository that is lazily initialized on usage, and cle Every access to the libgit repository should be wrapped with a call to #handleLibgitError: to manage possible libgit errors and transform them to a correct iceberg error. " Class { - #name : #IceLibgitRepository, - #superclass : #IceRepository, + #name : 'IceLibgitRepository', + #superclass : 'IceRepository', #instVars : [ 'location', 'commitCache', @@ -18,27 +18,29 @@ Class { 'ShareRepositoriesBetweenImages', 'SharedRepositoriesLocation' ], - #category : #'Iceberg-Libgit-Core' + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #settings } +{ #category : 'settings' } IceLibgitRepository class >> defaultCodeSubdirectory [ ^ DefaultCodeSubdirectory ifNil: [ DefaultCodeSubdirectory := 'src' ] ] -{ #category : #settings } +{ #category : 'settings' } IceLibgitRepository class >> defaultCodeSubdirectory: aString [ DefaultCodeSubdirectory := aString ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitRepository class >> defaultFileFormat [ ^ Smalltalk at: self defaultFileFormatType asSymbol ] -{ #category : #settings } +{ #category : 'settings' } IceLibgitRepository class >> defaultFileFormatType [ ^ DefaultFileFormatType ifNil: [ DefaultFileFormatType := TIceRepositoryWriter traitUsers @@ -47,19 +49,19 @@ IceLibgitRepository class >> defaultFileFormatType [ ifNone: [ nil "To be filled later (on first demand)" ] ] ] -{ #category : #settings } +{ #category : 'settings' } IceLibgitRepository class >> defaultFileFormatType: anObject [ DefaultFileFormatType := anObject ] -{ #category : #settings } +{ #category : 'settings' } IceLibgitRepository class >> formatTypeDomainValues [ ^ TIceRepositoryWriter traitUsers ifNotEmpty: [ :users | users collect: [ :each | each description -> each name ] ] ifEmpty: [ { 'Undefined' -> nil } ] ] -{ #category : #rules } +{ #category : 'rules' } IceLibgitRepository class >> libgitErrorHandlerPragmaSelector [ "Pragma selector used to detect methods used as libgit error handlers. @@ -67,7 +69,7 @@ IceLibgitRepository class >> libgitErrorHandlerPragmaSelector [ ^ #libgitErrorHandler ] -{ #category : #rules } +{ #category : 'rules' } IceLibgitRepository class >> libgitErrorHandlerSelector [ "Detect what method is used for handling libgit errors. @@ -78,7 +80,7 @@ IceLibgitRepository class >> libgitErrorHandlerSelector [ each pragmas anySatisfy: [ :pragma | pragma keyword = self libgitErrorHandlerPragmaSelector ] ]) selector ] -{ #category : #rules } +{ #category : 'rules' } IceLibgitRepository class >> libgitRepositoryHandleAccessorPragmaSelector [ "Pragma selector used to detect methods allowed to directly access the repository handle. @@ -86,25 +88,25 @@ IceLibgitRepository class >> libgitRepositoryHandleAccessorPragmaSelector [ ^ #repositoryHandleAccessor ] -{ #category : #rules } +{ #category : 'rules' } IceLibgitRepository class >> libgitRepositoryHandleAccessors [ ^ self allMethods select: [ :m | m pragmas anySatisfy: [ :p | p keyword = self libgitRepositoryHandleAccessorPragmaSelector ] ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitRepository class >> localRepositoriesLocation [ ^ FileLocator localDirectory / #iceberg ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitRepository class >> repositoriesLocation [ ^ self shareRepositoriesBetweenImages ifTrue: [ self sharedRepositoriesLocation ] ifFalse: [ self localRepositoriesLocation ] ] -{ #category : #utilities } +{ #category : 'utilities' } IceLibgitRepository class >> requiredLibGit2MinimumVersion [ ^ IceSemanticVersion major: 0 @@ -112,7 +114,7 @@ IceLibgitRepository class >> requiredLibGit2MinimumVersion [ patch: 1 ] -{ #category : #settings } +{ #category : 'settings' } IceLibgitRepository class >> settingsOn: aBuilder [ @@ -148,38 +150,38 @@ IceLibgitRepository class >> settingsOn: aBuilder [ ] -{ #category : #settings } +{ #category : 'settings' } IceLibgitRepository class >> shareRepositoriesBetweenImages [ ^ ShareRepositoriesBetweenImages ifNil: [ ShareRepositoriesBetweenImages := false ] ] -{ #category : #settings } +{ #category : 'settings' } IceLibgitRepository class >> shareRepositoriesBetweenImages: anObject [ ShareRepositoriesBetweenImages := anObject ] -{ #category : #settings } +{ #category : 'settings' } IceLibgitRepository class >> sharedRepositoriesLocation [ ^ SharedRepositoriesLocation ifNil: [ SharedRepositoriesLocation := (FileLocator home / #iceberg) asFileReference ] ] -{ #category : #settings } +{ #category : 'settings' } IceLibgitRepository class >> sharedRepositoriesLocation: anObject [ SharedRepositoriesLocation := anObject ] -{ #category : #settings } +{ #category : 'settings' } IceLibgitRepository class >> sharedRepositoriesLocationString [ ^ self sharedRepositoriesLocation fullName ] -{ #category : #settings } +{ #category : 'settings' } IceLibgitRepository class >> sharedRepositoriesLocationString: aString [ SharedRepositoriesLocation := aString asFileReference ] -{ #category : #utilities } +{ #category : 'utilities' } IceLibgitRepository class >> verifyBackendAvailabilityIfNot: aBlock [ | presentVersion requiredVersion | @@ -189,13 +191,13 @@ IceLibgitRepository class >> verifyBackendAvailabilityIfNot: aBlock [ ifFalse: [ ^ aBlock cull: requiredVersion cull: presentVersion ] ] -{ #category : #'API - files' } +{ #category : 'API - files' } IceLibgitRepository >> addFileToIndex: aFile [ self addFilesToIndex: { aFile } ] -{ #category : #'API - files' } +{ #category : 'API - files' } IceLibgitRepository >> addFilesToIndex: aCollection [ self handleLibgitError: [ @@ -214,37 +216,37 @@ IceLibgitRepository >> addFilesToIndex: aCollection [ free ] ] -{ #category : #'to-cleanup' } +{ #category : 'to-cleanup' } IceLibgitRepository >> addTo: aMCRepositoryGroup [ "For now do not add me as an MCRepository" ] -{ #category : #'API - branches' } +{ #category : 'API - branches' } IceLibgitRepository >> allBranches [ ^ self localBranches, self remoteTrackedBranches ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> basicCodeDirectory [ ^ self subdirectory isEmptyOrNil ifTrue: [ self repositoryDirectory ] ifFalse: [ self repositoryDirectory / self subdirectory ]. ] -{ #category : #'API - branches' } +{ #category : 'API - branches' } IceLibgitRepository >> basicNewBranchNamed: aString [ ^ IceGitLocalBranch named: aString inRepository: self ] -{ #category : #'API - branches' } +{ #category : 'API - branches' } IceLibgitRepository >> basicNewRemoteBranchNamed: aString [ ^ IceGitRemoteBranch named: aString inRepository: self ] -{ #category : #'API - branches' } +{ #category : 'API - branches' } IceLibgitRepository >> branchNamed: aString ifPresent: presentBlock ifAbsent: absentBlock [ self handleLibgitError: [ | found | @@ -252,7 +254,7 @@ IceLibgitRepository >> branchNamed: aString ifPresent: presentBlock ifAbsent: ab ^ found ifNil: absentBlock ifNotNil: [ presentBlock value: (self basicNewBranchNamed: found name) ] ] ] -{ #category : #'private - changes' } +{ #category : 'private - changes' } IceLibgitRepository >> changedFilesBetween: aCommitish and: otherCommitish [ "Answer a list of files that changed between two commits" @@ -263,7 +265,7 @@ IceLibgitRepository >> changedFilesBetween: aCommitish and: otherCommitish [ ^ diff files ] ] -{ #category : #'API - registry' } +{ #category : 'API - registry' } IceLibgitRepository >> checkForRegistryConflicts [ "If the repository has no location, do not check for conflicts." @@ -292,7 +294,7 @@ and the original repository''s url is {3}.' format: {self location. self origin. repo origin}) ]]. ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> codeDirectory [ "Code repository might have been deleted or image might have been moved." self repositoryDirectory exists @@ -300,13 +302,13 @@ IceLibgitRepository >> codeDirectory [ ifFalse: [ IceLocalRepositoryMissing signalFor: self ] ] -{ #category : #'private - commits' } +{ #category : 'private - commits' } IceLibgitRepository >> commitCache [ ^ commitCache ifNil: [ commitCache := LRUCache new maximumWeight: 30 ] ] -{ #category : #'private - commits' } +{ #category : 'private - commits' } IceLibgitRepository >> commitFromGitCommit: aLGitCommit [ ^ self commitCache at: aLGitCommit id hexString ifAbsentPut: [ @@ -321,12 +323,12 @@ IceLibgitRepository >> commitFromGitCommit: aLGitCommit [ yourself ] ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> commitIdFrom: aLGitCommit [ ^ aLGitCommit id hexString ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> commitishNamed: aName [ "Resolve a name in the form of: - a commit hash @@ -345,7 +347,7 @@ IceLibgitRepository >> commitishNamed: aName [ self revparse: aName ] ] -{ #category : #'API - branches' } +{ #category : 'API - branches' } IceLibgitRepository >> createBranch: branchName [ | newBranch | "This is really low level and may provoke problems. @@ -370,7 +372,7 @@ IceLibgitRepository >> createBranch: branchName [ ^ self head ] ] -{ #category : #'API - branches' } +{ #category : 'API - branches' } IceLibgitRepository >> createBranch: aString inCommit: anIceGitCommit [ self handleLibgitError: [ @@ -382,7 +384,7 @@ IceLibgitRepository >> createBranch: aString inCommit: anIceGitCommit [ yourself ] ] -{ #category : #'API - working copy' } +{ #category : 'API - working copy' } IceLibgitRepository >> createSourceDirectory [ (location / self subdirectory) ensureCreateDirectory. @@ -391,7 +393,7 @@ IceLibgitRepository >> createSourceDirectory [ store ] -{ #category : #'API - registry' } +{ #category : 'API - registry' } IceLibgitRepository >> delete [ "Delete is idempotent. If the repository does not exist, do nothing. Otherwise, forget the repository and remove it from the disk. @@ -403,7 +405,7 @@ IceLibgitRepository >> delete [ self locationIfPresent: [ :aLocation | aLocation ensureDeleteAll ] ] -{ #category : #printing } +{ #category : 'printing' } IceLibgitRepository >> description [ ^ [ super description ] on: Error do: [ self location isNil @@ -411,7 +413,7 @@ IceLibgitRepository >> description [ ifFalse: [ 'Bad location: ', self location path pathString ] ] ] -{ #category : #'API - packages' } +{ #category : 'API - packages' } IceLibgitRepository >> directoryForPackage: mcPackage [ | package | package := self packageNamed: mcPackage name. @@ -420,7 +422,7 @@ IceLibgitRepository >> directoryForPackage: mcPackage [ ifFalse: [ self subdirectory, '/', (self directoryNameForPackage: package) ] ] -{ #category : #'API - packages' } +{ #category : 'API - packages' } IceLibgitRepository >> directoryNameForPackage: package [ ^ (self writerClass @@ -428,7 +430,7 @@ IceLibgitRepository >> directoryNameForPackage: package [ asString ] -{ #category : #'API - packages' } +{ #category : 'API - packages' } IceLibgitRepository >> directoryPathStringForPackage: aMCPackage [ ^ self subdirectory isEmptyOrNil @@ -436,7 +438,7 @@ IceLibgitRepository >> directoryPathStringForPackage: aMCPackage [ ifFalse: [ self subdirectory, '/', (self directoryNameForPackage: aMCPackage) ] ] -{ #category : #'private - remotes' } +{ #category : 'private - remotes' } IceLibgitRepository >> doRemoveRemote: aRemote [ self handleLibgitError: [ (LGitRemote of: self repositoryHandle named: aRemote name) @@ -444,7 +446,7 @@ IceLibgitRepository >> doRemoveRemote: aRemote [ delete ] ] -{ #category : #'private - libgit' } +{ #category : 'private - libgit' } IceLibgitRepository >> free [ (handle isNil or: [ handle isNull ]) @@ -453,7 +455,7 @@ IceLibgitRepository >> free [ handle := nil ] ] -{ #category : #'API - configuration' } +{ #category : 'API - configuration' } IceLibgitRepository >> getConfigurationGlobal: aBoolean [ self handleLibgitError: [ | config | @@ -463,7 +465,7 @@ IceLibgitRepository >> getConfigurationGlobal: aBoolean [ ifFalse: [ config ] ] ] -{ #category : #'private - libgit' } +{ #category : 'private - libgit' } IceLibgitRepository >> handleLibgitError: aBlock [ "Handle errors while calling libgit. The pragma is used to detect this method and verify on architectural rules that it is correctly called" @@ -472,32 +474,32 @@ IceLibgitRepository >> handleLibgitError: aBlock [ aBlock on: LGitCallReturnHandler do: [ :error | error acceptError: (IceLibgitErrorVisitor onContext: self) ] ] -{ #category : #'API - tags' } +{ #category : 'API - tags' } IceLibgitRepository >> hasTagNamed: aString [ ^ self tagNames includes: aString ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> head [ ^ self lookupHead ] -{ #category : #printing } +{ #category : 'printing' } IceLibgitRepository >> headDescription [ ^ [ super headDescription ] on: Error do: [ 'Bad location' ] ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> iceCommitFrom: aGitCommit [ "The type of 'aCommitish' depends on how each backend internal representation. " ^ self commitFromGitCommit: aGitCommit ] -{ #category : #'private - initialization' } +{ #category : 'private - initialization' } IceLibgitRepository >> init [ "Initialize new repository. This is the equivalent to running in the command line: $ git init @@ -506,45 +508,45 @@ IceLibgitRepository >> init [ self initBare: false ] -{ #category : #initialization } +{ #category : 'initialization' } IceLibgitRepository >> initBare: isBare [ (LGitRepository on: self location) initBare: isBare ] -{ #category : #'private - commits' } +{ #category : 'private - commits' } IceLibgitRepository >> internalStoreVersion: aMCVersion [ self writerClass forInternalStoreFileOut: aMCVersion on: self ] -{ #category : #testing } +{ #category : 'testing' } IceLibgitRepository >> isCloneOfUrl: aString [ ^ self isMissing not and: [ super isCloneOfUrl: aString ] ] -{ #category : #testing } +{ #category : 'testing' } IceLibgitRepository >> isCodeMissing [ ^ self subdirectory isEmptyOrNil ifTrue: [ self isMissing ] ifFalse: [ (self repositoryDirectory / self subdirectory) exists not ] ] -{ #category : #testing } +{ #category : 'testing' } IceLibgitRepository >> isMissing [ ^ self repositoryDirectory isNil or: [ self repositoryDirectory exists not ] ] -{ #category : #'API - packages' } +{ #category : 'API - packages' } IceLibgitRepository >> isModified [ "We cannot correctly determine if a repository is modified if it is missing so, false" ^ self isMissing not and: [ super isModified ] ] -{ #category : #'API - packages' } +{ #category : 'API - packages' } IceLibgitRepository >> isPackageExported: anIceSavedPackage [ | packageLocation | @@ -552,13 +554,13 @@ IceLibgitRepository >> isPackageExported: anIceSavedPackage [ ^ packageLocation exists and: [ packageLocation hasChildren ] ] -{ #category : #testing } +{ #category : 'testing' } IceLibgitRepository >> isValid [ self flag: #pharoTodo. "Make this tests more solid" ^ self isMissing not ] -{ #category : #'API - branches' } +{ #category : 'API - branches' } IceLibgitRepository >> localBranches [ self handleLibgitError: [ @@ -569,24 +571,24 @@ IceLibgitRepository >> localBranches [ streamContents: [ :stream | self repositoryHandle localBranchesDo: [ :br :isLocal | stream nextPut: (self basicNewBranchNamed: br name) ] ] ] ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> location [ ^ location ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> location: aFileReference [ location := aFileReference. self resetHandle ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> locationIfPresent: aBlock [ ^ self locationIfPresent: aBlock ifAbsent: [ self ] ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> locationIfPresent: aBlock ifAbsent: absentBlock [ self location ifNil: [ ^ absentBlock value ]. @@ -596,25 +598,25 @@ IceLibgitRepository >> locationIfPresent: aBlock ifAbsent: absentBlock [ ifFalse: [ absentBlock value ] ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> log [ ^ self logClass for: self ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> logClass [ ^ IceLog allSubclasses detect: [ :each | each isAvailableFor: self ] ] -{ #category : #'API - commits' } +{ #category : 'API - commits' } IceLibgitRepository >> lookupCommit: commitId ifAbsent: aBlock [ ^ [ self revparse: commitId ] on: NotFound do: aBlock ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> lookupHead [ self handleLibgitError: [ | head | self repositoryHandle isUnborn @@ -625,7 +627,7 @@ IceLibgitRepository >> lookupHead [ ifFalse: [ head object asIcebergObjectInRepository: self ] ] ] -{ #category : #'private - monticello' } +{ #category : 'private - monticello' } IceLibgitRepository >> mcVersionFor: iceVersion [ [ | commit | commit := iceVersion commit libgitCommit. @@ -637,7 +639,7 @@ IceLibgitRepository >> mcVersionFor: iceVersion [ signal ] ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> mergeBaseBetween: aCommitId and: anotherCommitId [ self handleLibgitError: [ ^ (self repositoryHandle @@ -645,42 +647,42 @@ IceLibgitRepository >> mergeBaseBetween: aCommitId and: anotherCommitId [ and: (LGitId fromHexString: anotherCommitId)) hexString ] ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> name [ ^ name ifNil: [ name := self obtainRepositoryName ] ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> newCommitWalk [ ^ IceLibgitCommitWalk forRepository: self ] -{ #category : #'private - changes' } +{ #category : 'private - changes' } IceLibgitRepository >> newIndex [ ^ IceGitIndex on: self ] -{ #category : #'API - commits' } +{ #category : 'API - commits' } IceLibgitRepository >> newNoCommit [ ^ IceNoCommit repository: self ] -{ #category : #'API - project' } +{ #category : 'API - project' } IceLibgitRepository >> newProjectFromCommit: aCommit [ ^ IceProjectReader readProjectFrom: self ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> obtainRepositoryName [ ^ self location basename ] -{ #category : #'API - remotes' } +{ #category : 'API - remotes' } IceLibgitRepository >> origin [ ^ self @@ -691,7 +693,7 @@ IceLibgitRepository >> origin [ yourself ] ] -{ #category : #'API - packages' } +{ #category : 'API - packages' } IceLibgitRepository >> packageLocationFor: anIceSavedPackage [ | packageLocation directoryName | @@ -703,36 +705,36 @@ IceLibgitRepository >> packageLocationFor: anIceSavedPackage [ ^ packageLocation ] -{ #category : #'private - tags' } +{ #category : 'private - tags' } IceLibgitRepository >> peelTag: anIceTag [ self handleLibgitError: [ | lgitRef | lgitRef := (self repositoryHandle lookup: 'refs/tags/', anIceTag name). ^ self lookupCommit: lgitRef targetId hexString ] ] -{ #category : #'API - project' } +{ #category : 'API - project' } IceLibgitRepository >> project [ ^ self workingCopy project ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> properties [ ^ self workingCopy repositoryProperties ] -{ #category : #'API - properties' } +{ #category : 'API - properties' } IceLibgitRepository >> readerClass [ ^ self properties readerClass ] -{ #category : #'API - remotes' } +{ #category : 'API - remotes' } IceLibgitRepository >> remoteAt: aString put: aRemote [ self handleLibgitError: [ self repositoryHandle addRemote: aRemote name url: aRemote url ] ] -{ #category : #'API - remotes' } +{ #category : 'API - remotes' } IceLibgitRepository >> remoteBranchNamed: aString ifPresent: presentBlock ifAbsent: absentBlock [ self handleLibgitError: [ | branchRef | @@ -740,7 +742,7 @@ IceLibgitRepository >> remoteBranchNamed: aString ifPresent: presentBlock ifAbse presentBlock value: (self basicNewRemoteBranchNamed: branchRef name) ] ] -{ #category : #'API - remotes' } +{ #category : 'API - remotes' } IceLibgitRepository >> remoteNamed: aName ifAbsent: aBlockClosure [ self handleLibgitError: [ | gitRemote | @@ -752,7 +754,7 @@ IceLibgitRepository >> remoteNamed: aName ifAbsent: aBlockClosure [ do: [ ^ aBlockClosure value ] ] ] -{ #category : #'API - remotes' } +{ #category : 'API - remotes' } IceLibgitRepository >> remoteTrackedBranches [ self handleLibgitError: [ @@ -765,7 +767,7 @@ IceLibgitRepository >> remoteTrackedBranches [ stream nextPut: (self basicNewRemoteBranchNamed: br name) ] ] ] ] -{ #category : #'API - remotes' } +{ #category : 'API - remotes' } IceLibgitRepository >> remotes [ LGitLibrary uniqueInstance isAvailable @@ -783,19 +785,19 @@ IceLibgitRepository >> remotes [ yourself ] ] ] -{ #category : #'API - tags' } +{ #category : 'API - tags' } IceLibgitRepository >> removeTag: anIceTag [ self handleLibgitError: [ self repositoryHandle git_tag_delete: anIceTag name ] ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> repositoryDirectory [ ^ self location ] -{ #category : #'private - libgit' } +{ #category : 'private - libgit' } IceLibgitRepository >> repositoryHandle [ @@ -804,12 +806,12 @@ IceLibgitRepository >> repositoryHandle [ ^ handle ] -{ #category : #'private - libgit' } +{ #category : 'private - libgit' } IceLibgitRepository >> resetHandle [ handle := nil ] -{ #category : #'API - commits' } +{ #category : 'API - commits' } IceLibgitRepository >> revparse: aName [ self handleLibgitError: [ | gitCommit gitId | @@ -818,7 +820,7 @@ IceLibgitRepository >> revparse: aName [ ^ self commitFromGitCommit: gitCommit ] ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> setHead: anIceGitCommitish [ "Need to keep the reference, if not it is garbage collected. As the options are only passed to a FFI call" @@ -835,18 +837,18 @@ IceLibgitRepository >> setHead: anIceGitCommitish [ yourself) ] ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> subdirectory [ ^ self project sourceDirectory ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> subdirectory: aString [ self project sourceDirectory: aString ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> subdirectoryPath [ "API compatible both with Pharo6 and Pharo7. @@ -857,13 +859,13 @@ IceLibgitRepository >> subdirectoryPath [ ^ RelativePath withAll: (RelativePath canonicalizeElements: ($/ split: self subdirectory)) ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> subdirectoryReference [ ^ self location resolve: self subdirectoryPath ] -{ #category : #'API - tags' } +{ #category : 'API - tags' } IceLibgitRepository >> tags [ self handleLibgitError: [ ^ self repositoryHandle tags @@ -871,7 +873,7 @@ IceLibgitRepository >> tags [ IceTag named: each inRepository: self ] ] ] -{ #category : #'API - accessing' } +{ #category : 'API - accessing' } IceLibgitRepository >> writerClass [ ^ self project writerClass ] diff --git a/Iceberg-Libgit/IceLibgitTreeBuilder.class.st b/Iceberg-Libgit/IceLibgitTreeBuilder.class.st index d4f13da3d9..77a6ff4c0f 100644 --- a/Iceberg-Libgit/IceLibgitTreeBuilder.class.st +++ b/Iceberg-Libgit/IceLibgitTreeBuilder.class.st @@ -29,8 +29,8 @@ Internal Representation and Key Implementation Points. Implementation Points " Class { - #name : #IceLibgitTreeBuilder, - #superclass : #Object, + #name : 'IceLibgitTreeBuilder', + #superclass : 'Object', #instVars : [ 'parent', 'entryName', @@ -40,16 +40,18 @@ Class { 'initialTree', 'hasChanges' ], - #category : #'Iceberg-Libgit-Core' + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } IceLibgitTreeBuilder class >> on: aLGitTree [ "Creates a tree builder on the root of the repository" ^ self new initializeWithTree: aLGitTree ] -{ #category : #modifying } +{ #category : 'modifying' } IceLibgitTreeBuilder >> addEntryNamed: name withContents: aString [ self builder addEntry: (LGitBlob of: self repository fromString: aString) @@ -59,7 +61,7 @@ IceLibgitTreeBuilder >> addEntryNamed: name withContents: aString [ hasChanges := true ] -{ #category : #building } +{ #category : 'building' } IceLibgitTreeBuilder >> buildTree [ self children keysAndValuesDo: [ :childEntryName :childBuilder | childBuilder hasChanges ifTrue: [ @@ -72,7 +74,7 @@ IceLibgitTreeBuilder >> buildTree [ ^ self builder newTree ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitTreeBuilder >> builder [ ^ builder ifNil: [ builder := LGitTreeBuilder @@ -81,28 +83,28 @@ IceLibgitTreeBuilder >> builder [ ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitTreeBuilder >> changes [ ^ changes ifNil: [ changes := OrderedCollection new ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitTreeBuilder >> children [ ^ children ifNil: [ children := Dictionary new ] ] -{ #category : #modifying } +{ #category : 'modifying' } IceLibgitTreeBuilder >> deleteAll [ self builder clear. ] -{ #category : #patches } +{ #category : 'patches' } IceLibgitTreeBuilder >> directory [ ^ self ] -{ #category : #querying } +{ #category : 'querying' } IceLibgitTreeBuilder >> entryByName: aString [ ^ self children at: aString @@ -112,7 +114,7 @@ IceLibgitTreeBuilder >> entryByName: aString [ entryName: aString ] ] -{ #category : #querying } +{ #category : 'querying' } IceLibgitTreeBuilder >> entryByPath: aString [ ^ (aString = '.' ) ifTrue: [ self ] @@ -121,12 +123,12 @@ IceLibgitTreeBuilder >> entryByPath: aString [ into: [ :treeBuilder :name | treeBuilder entryByName: name ]] ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitTreeBuilder >> entryName [ ^ entryName ] -{ #category : #querying } +{ #category : 'querying' } IceLibgitTreeBuilder >> hasChanges [ ^ hasChanges or: [ initialTree isNil "It means that this is a new tree" @@ -134,20 +136,20 @@ IceLibgitTreeBuilder >> hasChanges [ ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitTreeBuilder >> initialTree [ ^ initialTree ] -{ #category : #initialization } +{ #category : 'initialization' } IceLibgitTreeBuilder >> initialize [ super initialize. hasChanges := false. ] -{ #category : #initializing } +{ #category : 'initializing' } IceLibgitTreeBuilder >> initializeWithParent: anIceTreeBuilder entryName: aString [ | treeEntry | parent := anIceTreeBuilder. @@ -162,18 +164,18 @@ IceLibgitTreeBuilder >> initializeWithParent: anIceTreeBuilder entryName: aStrin ] -{ #category : #initializing } +{ #category : 'initializing' } IceLibgitTreeBuilder >> initializeWithTree: aLGitTree [ "This is a builder on the root of a repository" initialTree := aLGitTree ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitTreeBuilder >> parent [ ^ parent ] -{ #category : #printing } +{ #category : 'printing' } IceLibgitTreeBuilder >> printOn: aStream [ aStream nextPutAll: self class name; @@ -183,7 +185,7 @@ IceLibgitTreeBuilder >> printOn: aStream [ ] -{ #category : #printing } +{ #category : 'printing' } IceLibgitTreeBuilder >> printPathOn: aStream [ parent ifNil: [ @@ -194,7 +196,7 @@ IceLibgitTreeBuilder >> printPathOn: aStream [ nextPutAll: entryName ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceLibgitTreeBuilder >> repository [ ^ parent ifNotNil: [ self parent repository ] diff --git a/Iceberg-Libgit/IceMCSnapshotPatchVisitor.class.st b/Iceberg-Libgit/IceMCSnapshotPatchVisitor.class.st index 85f316af55..47f3fb5750 100644 --- a/Iceberg-Libgit/IceMCSnapshotPatchVisitor.class.st +++ b/Iceberg-Libgit/IceMCSnapshotPatchVisitor.class.st @@ -1,44 +1,46 @@ Class { - #name : #IceMCSnapshotPatchVisitor, - #superclass : #IceTreeVisitor, + #name : 'IceMCSnapshotPatchVisitor', + #superclass : 'IceTreeVisitor', #instVars : [ 'patcher' ], - #category : #'Iceberg-Libgit-Commit' + #category : 'Iceberg-Libgit-Commit', + #package : 'Iceberg-Libgit', + #tag : 'Commit' } -{ #category : #accessing } +{ #category : 'accessing' } IceMCSnapshotPatchVisitor >> patcher: aMCPatcher [ patcher := aMCPatcher ] -{ #category : #visiting } +{ #category : 'visiting' } IceMCSnapshotPatchVisitor >> visitAddition: anIceAddition [ anIceAddition definition addToPatcher: patcher. self visitChildrenOf: currentNode ] -{ #category : #visiting } +{ #category : 'visiting' } IceMCSnapshotPatchVisitor >> visitModification: anIceModification [ anIceModification leftDefinition addModification: anIceModification toPatcher: patcher. self visitChildrenOf: currentNode ] -{ #category : #visiting } +{ #category : 'visiting' } IceMCSnapshotPatchVisitor >> visitNoModification: anIceNoModification [ anIceNoModification definition addToPatcher: patcher. self visitChildrenOf: currentNode ] -{ #category : #visiting } +{ #category : 'visiting' } IceMCSnapshotPatchVisitor >> visitNonConflictingOperation: anIceNonConflictingOperation [ ^ anIceNonConflictingOperation chosenOperation accept: self ] -{ #category : #visiting } +{ #category : 'visiting' } IceMCSnapshotPatchVisitor >> visitRemoval: anIceRemoval [ anIceRemoval definition removeFromPatcher: patcher. self visitChildrenOf: currentNode diff --git a/Iceberg-Libgit/IceRepositoryCreator.class.st b/Iceberg-Libgit/IceRepositoryCreator.class.st index 8be5355293..73240d6d15 100644 --- a/Iceberg-Libgit/IceRepositoryCreator.class.st +++ b/Iceberg-Libgit/IceRepositoryCreator.class.st @@ -8,8 +8,8 @@ I do this (trying in this order): You can also define branchName to checkout a specific branch. " Class { - #name : #IceRepositoryCreator, - #superclass : #Object, + #name : 'IceRepositoryCreator', + #superclass : 'Object', #instVars : [ 'location', 'url', @@ -20,15 +20,17 @@ Class { 'ensureProjectFile', 'isBareRepository' ], - #category : #'Iceberg-Libgit-Core' + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator class >> defaultSubdirectory [ ^ '' ] -{ #category : #testing } +{ #category : 'testing' } IceRepositoryCreator class >> isGitRoot: aReference [ self flag: #pharoTodo. "This does not understand submodules" ^ aReference isDirectory @@ -36,7 +38,7 @@ IceRepositoryCreator class >> isGitRoot: aReference [ and: [ (aReference / '.git' / 'config') exists ] ] ] -{ #category : #'private - actions' } +{ #category : 'private - actions' } IceRepositoryCreator >> addLocalRepository [ self repository location: self locationToUse. self repository pluginManager repositoryWillBeCreated: self repository. @@ -48,7 +50,7 @@ IceRepositoryCreator >> addLocalRepository [ ^ self repository ] -{ #category : #'private - actions' } +{ #category : 'private - actions' } IceRepositoryCreator >> addLocalRepositoryAndCheckout [ | localRepository | localRepository := self addLocalRepository. @@ -59,7 +61,7 @@ IceRepositoryCreator >> addLocalRepositoryAndCheckout [ ^ localRepository ] -{ #category : #private } +{ #category : 'private' } IceRepositoryCreator >> addProjectFileTo: aRepository [ | newProject | @@ -68,24 +70,24 @@ IceRepositoryCreator >> addProjectFileTo: aRepository [ aRepository workingCopy basicSetProject: newProject. ] -{ #category : #private } +{ #category : 'private' } IceRepositoryCreator >> addPropertiesFileTo: aRepository [ aRepository properties fileFormat: self formatToUse ] -{ #category : #remotes } +{ #category : 'remotes' } IceRepositoryCreator >> addRemote: aString [ self remote: (IceGitRemote url: aString) ] -{ #category : #initialization } +{ #category : 'initialization' } IceRepositoryCreator >> beBare [ isBareRepository := true ] -{ #category : #'private - actions' } +{ #category : 'private - actions' } IceRepositoryCreator >> cloneRepository [ IceGitClone new location: self locationToUse; @@ -104,17 +106,17 @@ IceRepositoryCreator >> cloneRepository [ ^ self repository ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator >> commitishName [ ^ branchName ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator >> commitishName: aName [ branchName := aName ] -{ #category : #actions } +{ #category : 'actions' } IceRepositoryCreator >> createNewRepositoryNamed: aString [ | locationToUse | self validate. @@ -136,7 +138,7 @@ IceRepositoryCreator >> createNewRepositoryNamed: aString [ ^ repository ] -{ #category : #actions } +{ #category : 'actions' } IceRepositoryCreator >> createRepository [ ^ [ self validate. @@ -149,7 +151,7 @@ IceRepositoryCreator >> createRepository [ e signal ] ] -{ #category : #'private - accessing' } +{ #category : 'private - accessing' } IceRepositoryCreator >> defaultLocation [ | remoteToUse | remoteToUse := self remoteToUse. @@ -158,7 +160,7 @@ IceRepositoryCreator >> defaultLocation [ / remoteToUse projectName ] -{ #category : #private } +{ #category : 'private' } IceRepositoryCreator >> doEnsureProject [ ensureProjectFile ifFalse: [ ^ self ]. @@ -177,100 +179,100 @@ IceRepositoryCreator >> doEnsureProject [ self repository workingCopy refreshPackages. ] -{ #category : #'API-project' } +{ #category : 'API-project' } IceRepositoryCreator >> ensureProjectFile [ ensureProjectFile := true ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator >> formatToUse [ ^ IceLibgitRepository defaultFileFormat ] -{ #category : #initialization } +{ #category : 'initialization' } IceRepositoryCreator >> initialize [ super initialize. ensureProjectFile := false. isBareRepository := false ] -{ #category : #'private - testing' } +{ #category : 'private - testing' } IceRepositoryCreator >> isCloning [ ^ self remoteToUse notNil ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator >> location [ ^ location ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator >> location: anObject [ location := anObject ] -{ #category : #'private - accessing' } +{ #category : 'private - accessing' } IceRepositoryCreator >> locationToUse [ ^ self location ifNil: [ self defaultLocation ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator >> remote [ ^ remote ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator >> remote: anObject [ remote := anObject ] -{ #category : #'private - accessing' } +{ #category : 'private - accessing' } IceRepositoryCreator >> remoteToUse [ self remote ifNotNil: [ ^ self remote ]. self url ifNotNil: [ ^ IceGitRemote url: self url ]. ^ nil ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator >> repository [ ^ repository ifNil: [ repository := IceLibgitRepository new ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator >> repository: anExistingRepository [ repository := anExistingRepository ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator >> subdirectory [ ^ subdirectory ifNil: [ self class defaultSubdirectory ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator >> subdirectory: anObject [ subdirectory := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator >> url [ ^ url ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryCreator >> url: anObject [ url := anObject ] -{ #category : #private } +{ #category : 'private' } IceRepositoryCreator >> validate [ self validateLocation. self validateAlreadyPresentAndNotGit. self validateNotDuplicated ] -{ #category : #private } +{ #category : 'private' } IceRepositoryCreator >> validateAlreadyPresentAndNotGit [ "Validate if I will add a local repository (url isNil and location isNotNil)... testing the local directory actually exists" @@ -283,14 +285,14 @@ IceRepositoryCreator >> validateAlreadyPresentAndNotGit [ ] -{ #category : #private } +{ #category : 'private' } IceRepositoryCreator >> validateLocation [ (self location isNil and: [ self remoteToUse isNil ]) ifTrue: [ IceError signal: 'No location/url or remote defined.' ] ] -{ #category : #private } +{ #category : 'private' } IceRepositoryCreator >> validateNotDuplicated [ (self remoteToUse isNotNil and: [ self locationToUse exists and: [ self locationToUse hasChildren ] ]) diff --git a/Iceberg-Libgit/IceRepositoryProperties.class.st b/Iceberg-Libgit/IceRepositoryProperties.class.st index 6a547b0e63..3f47452796 100644 --- a/Iceberg-Libgit/IceRepositoryProperties.class.st +++ b/Iceberg-Libgit/IceRepositoryProperties.class.st @@ -7,17 +7,19 @@ I can answer concrete things about repositories, e.g. : - ... " Class { - #name : #IceRepositoryProperties, - #superclass : #Object, + #name : 'IceRepositoryProperties', + #superclass : 'Object', #instVars : [ 'properties', 'repository', 'commitish' ], - #category : #'Iceberg-Libgit-Core' + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } IceRepositoryProperties class >> fromDictionary: aDictionary commitish: aCommitish [ ^ self new repository: aCommitish repository; @@ -27,7 +29,7 @@ IceRepositoryProperties class >> fromDictionary: aDictionary commitish: aCommiti yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } IceRepositoryProperties class >> fromFileReference: aFileReference commitish: aCommitish [ aFileReference exists @@ -35,31 +37,31 @@ IceRepositoryProperties class >> fromFileReference: aFileReference commitish: aC ^ self fromDictionary: (self readPropertiesFrom: aFileReference) commitish: aCommitish ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } IceRepositoryProperties class >> fromFileReferenceDirectory: aDirectory commitish: aCommitish [ ^ self fromFileReference: aDirectory / self propertiesFileName commitish: aCommitish ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties class >> propertiesFileName [ ^ '.properties' ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } IceRepositoryProperties class >> readPropertiesFrom: aFileReference [ self flag: #pharoFixMe. "When Pharo 6.1 will not be supported anymore we can directly use: `ref readStreamDo: [ :stream | STON fromStream: stream ]` but currently FileReference>>readStream return a ZnBufferedStream in Pharo 61 and a ZnCharacterReadStream decoding utf8 in Pharo 7." ^ aFileReference binaryReadStreamDo: [ :stream | STON fromStream: (ZnCharacterReadStream on: stream encoding: 'utf8') ] ] -{ #category : #comparing } +{ #category : 'comparing' } IceRepositoryProperties >> = anotherObject [ ^ self species = anotherObject species and: [ properties = anotherObject properties ] ] -{ #category : #writing } +{ #category : 'writing' } IceRepositoryProperties >> addToChangeBuilder: anIceChangeImporter [ anIceChangeImporter @@ -68,36 +70,36 @@ IceRepositoryProperties >> addToChangeBuilder: anIceChangeImporter [ contents: self contentsString ] -{ #category : #converting } +{ #category : 'converting' } IceRepositoryProperties >> asBornProperties [ ^ self ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties >> at: aKey [ ^ self properties at: aKey ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties >> at: aKey put: aValue [ self properties at: aKey put: aValue ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties >> commitish [ ^ commitish ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties >> commitish: anObject [ self assert: anObject isNotNil. commitish := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties >> contentsString [ ^ ByteArray streamContents: [ :stream | @@ -107,7 +109,7 @@ IceRepositoryProperties >> contentsString [ nextPut: self properties ] ] -{ #category : #'initialization-release' } +{ #category : 'initialization-release' } IceRepositoryProperties >> ensureDefaultProperties [ properties at: #format ifAbsentPut: [ @@ -115,72 +117,72 @@ IceRepositoryProperties >> ensureDefaultProperties [ ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties >> fileFormat [ ^ self writerClass ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties >> fileFormat: aClass [ self fileFormatId: aClass id ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties >> fileFormatId: aFileFormatId [ self properties at: #format put: aFileFormatId ] -{ #category : #comparing } +{ #category : 'comparing' } IceRepositoryProperties >> hash [ ^ properties hash ] -{ #category : #testing } +{ #category : 'testing' } IceRepositoryProperties >> isDirty [ ^ repository workingCopy referenceCommit properties ~= self ] -{ #category : #testing } +{ #category : 'testing' } IceRepositoryProperties >> isUnborn [ ^ false ] -{ #category : #private } +{ #category : 'private' } IceRepositoryProperties >> properties [ ^ properties ifNil: [ properties := Dictionary new ] ] -{ #category : #private } +{ #category : 'private' } IceRepositoryProperties >> properties: aDictionary [ properties := aDictionary ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties >> propertiesFilePath [ ^ repository project sourceDirectoryPath / self class propertiesFileName ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties >> readerClass [ ^ TIceRepositoryReader users detect: [ :each | each id = self fileFormat id ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties >> repository [ ^ repository ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties >> repository: anIceLibgitRepository [ repository := anIceLibgitRepository ] -{ #category : #storing } +{ #category : 'storing' } IceRepositoryProperties >> storeOnDirectory: aFileLocator root: rootDirectory [ | propertiesFileReference relativePath | @@ -196,7 +198,7 @@ IceRepositoryProperties >> storeOnDirectory: aFileLocator root: rootDirectory [ nextPut: self properties ] ] -{ #category : #storing } +{ #category : 'storing' } IceRepositoryProperties >> storeOnFileReference: aFileReference [ aFileReference @@ -208,7 +210,7 @@ IceRepositoryProperties >> storeOnFileReference: aFileReference [ nextPut: self properties ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceRepositoryProperties >> writerClass [ ^ self properties at: 'format' diff --git a/Iceberg-Libgit/IceSemanticVersion.class.st b/Iceberg-Libgit/IceSemanticVersion.class.st index 7476697175..b567db4abe 100644 --- a/Iceberg-Libgit/IceSemanticVersion.class.st +++ b/Iceberg-Libgit/IceSemanticVersion.class.st @@ -4,17 +4,19 @@ Since I exist just to be able to compare versions, I'm limited (reason why I'm n " Class { - #name : #IceSemanticVersion, - #superclass : #Magnitude, + #name : 'IceSemanticVersion', + #superclass : 'Magnitude', #instVars : [ 'major', 'minor', 'patch' ], - #category : #'Iceberg-Libgit-Core' + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } IceSemanticVersion class >> fromArray: anArray [ ^ self major: anArray first @@ -22,7 +24,7 @@ IceSemanticVersion class >> fromArray: anArray [ patch: anArray third ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } IceSemanticVersion class >> major: majorNumber minor: minorNumber patch: patchNumber [ ^ self basicNew initializeMajor: majorNumber @@ -31,12 +33,12 @@ IceSemanticVersion class >> major: majorNumber minor: minorNumber patch: patchNu yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } IceSemanticVersion class >> new [ self error: 'Use one of my siblings' ] -{ #category : #comparing } +{ #category : 'comparing' } IceSemanticVersion >> < aMagnitude [ "Answer whether the receiver is less than the argument." | version | @@ -45,7 +47,7 @@ IceSemanticVersion >> < aMagnitude [ ] -{ #category : #comparing } +{ #category : 'comparing' } IceSemanticVersion >> = aMagnitude [ "Compare the receiver with the argument and answer with true if the receiver is equal to the argument. Otherwise answer false." @@ -56,7 +58,7 @@ IceSemanticVersion >> = aMagnitude [ ] -{ #category : #converting } +{ #category : 'converting' } IceSemanticVersion >> asInteger [ "this does not works for versions 0.100+.*, but I do not think it will arrive to that" ^ (self major * 10000) @@ -64,7 +66,7 @@ IceSemanticVersion >> asInteger [ + self patch ] -{ #category : #comparing } +{ #category : 'comparing' } IceSemanticVersion >> hash [ ^ ((self species hash bitXor: self major) @@ -73,34 +75,34 @@ IceSemanticVersion >> hash [ ] -{ #category : #converting } +{ #category : 'converting' } IceSemanticVersion >> iceSemanticVersion [ ^ self ] -{ #category : #initialization } +{ #category : 'initialization' } IceSemanticVersion >> initializeMajor: majorNumber minor: minorNumber patch: patchNumber [ major := majorNumber. minor := minorNumber. patch := patchNumber ] -{ #category : #accessing } +{ #category : 'accessing' } IceSemanticVersion >> major [ ^ major ] -{ #category : #accessing } +{ #category : 'accessing' } IceSemanticVersion >> minor [ ^ minor ] -{ #category : #accessing } +{ #category : 'accessing' } IceSemanticVersion >> patch [ ^ patch ] -{ #category : #printing } +{ #category : 'printing' } IceSemanticVersion >> printOn: stream [ stream << self major asString diff --git a/Iceberg-Libgit/IceUnbornRepositoryProperties.class.st b/Iceberg-Libgit/IceUnbornRepositoryProperties.class.st index 59bccec1ad..dcf385a31d 100644 --- a/Iceberg-Libgit/IceUnbornRepositoryProperties.class.st +++ b/Iceberg-Libgit/IceUnbornRepositoryProperties.class.st @@ -1,17 +1,19 @@ Class { - #name : #IceUnbornRepositoryProperties, - #superclass : #IceRepositoryProperties, - #category : #'Iceberg-Libgit-Core' + #name : 'IceUnbornRepositoryProperties', + #superclass : 'IceRepositoryProperties', + #category : 'Iceberg-Libgit-Core', + #package : 'Iceberg-Libgit', + #tag : 'Core' } -{ #category : #testing } +{ #category : 'testing' } IceUnbornRepositoryProperties >> addToChangeBuilder: anIceChangeImporter [ "I'm unborn" ^ self ] -{ #category : #testing } +{ #category : 'testing' } IceUnbornRepositoryProperties >> asBornProperties [ ^ IceRepositoryProperties @@ -19,7 +21,7 @@ IceUnbornRepositoryProperties >> asBornProperties [ commitish: commitish ] -{ #category : #testing } +{ #category : 'testing' } IceUnbornRepositoryProperties >> isUnborn [ ^ true diff --git a/Iceberg-Libgit/LGitAbstractError.extension.st b/Iceberg-Libgit/LGitAbstractError.extension.st index a03353045d..0b3773409b 100644 --- a/Iceberg-Libgit/LGitAbstractError.extension.st +++ b/Iceberg-Libgit/LGitAbstractError.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #LGitAbstractError } +Extension { #name : 'LGitAbstractError' } -{ #category : #'*Iceberg-Libgit' } +{ #category : '*Iceberg-Libgit' } LGitAbstractError >> acceptError: aVisitor [ ^ aVisitor visitGenericError: self ] diff --git a/Iceberg-Libgit/LGit_GIT_ECONFLICT.extension.st b/Iceberg-Libgit/LGit_GIT_ECONFLICT.extension.st index e1416fe606..d17964ccaf 100644 --- a/Iceberg-Libgit/LGit_GIT_ECONFLICT.extension.st +++ b/Iceberg-Libgit/LGit_GIT_ECONFLICT.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #'LGit_GIT_ECONFLICT' } +Extension { #name : 'LGit_GIT_ECONFLICT' } -{ #category : #'*Iceberg-Libgit' } +{ #category : '*Iceberg-Libgit' } LGit_GIT_ECONFLICT >> acceptError: aVisitor [ ^ aVisitor visitECONFLICT: self ] diff --git a/Iceberg-Libgit/LGit_GIT_EEOF.extension.st b/Iceberg-Libgit/LGit_GIT_EEOF.extension.st index aa4d074d34..132eaea2dd 100644 --- a/Iceberg-Libgit/LGit_GIT_EEOF.extension.st +++ b/Iceberg-Libgit/LGit_GIT_EEOF.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #'LGit_GIT_EEOF' } +Extension { #name : 'LGit_GIT_EEOF' } -{ #category : #'*Iceberg-Libgit' } +{ #category : '*Iceberg-Libgit' } LGit_GIT_EEOF >> acceptError: aVisitor [ ^ aVisitor visitEEOF: self diff --git a/Iceberg-Libgit/LGit_GIT_ENOTFOUND.extension.st b/Iceberg-Libgit/LGit_GIT_ENOTFOUND.extension.st index 6462c57e5d..008c807c52 100644 --- a/Iceberg-Libgit/LGit_GIT_ENOTFOUND.extension.st +++ b/Iceberg-Libgit/LGit_GIT_ENOTFOUND.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #'LGit_GIT_ENOTFOUND' } +Extension { #name : 'LGit_GIT_ENOTFOUND' } -{ #category : #'*Iceberg-Libgit' } +{ #category : '*Iceberg-Libgit' } LGit_GIT_ENOTFOUND >> acceptError: aVisitor [ ^ aVisitor visitENOTFOUND: self ] diff --git a/Iceberg-Libgit/LGit_GIT_ERROR.extension.st b/Iceberg-Libgit/LGit_GIT_ERROR.extension.st index 996009194d..5479d79a31 100644 --- a/Iceberg-Libgit/LGit_GIT_ERROR.extension.st +++ b/Iceberg-Libgit/LGit_GIT_ERROR.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #'LGit_GIT_ERROR' } +Extension { #name : 'LGit_GIT_ERROR' } -{ #category : #'*Iceberg-Libgit' } +{ #category : '*Iceberg-Libgit' } LGit_GIT_ERROR >> acceptError: aVisitor [ ^ aVisitor visitERROR: self ] diff --git a/Iceberg-Libgit/LGit_GIT_EUSER.extension.st b/Iceberg-Libgit/LGit_GIT_EUSER.extension.st index a7e670a417..a8d53004d6 100644 --- a/Iceberg-Libgit/LGit_GIT_EUSER.extension.st +++ b/Iceberg-Libgit/LGit_GIT_EUSER.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #'LGit_GIT_EUSER' } +Extension { #name : 'LGit_GIT_EUSER' } -{ #category : #'*Iceberg-Libgit' } +{ #category : '*Iceberg-Libgit' } LGit_GIT_EUSER >> acceptError: aVisitor [ ^ aVisitor visitEUSER: self ] diff --git a/Iceberg-Libgit/Magnitude.extension.st b/Iceberg-Libgit/Magnitude.extension.st index d27342fa45..1206c0237f 100644 --- a/Iceberg-Libgit/Magnitude.extension.st +++ b/Iceberg-Libgit/Magnitude.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #Magnitude } +Extension { #name : 'Magnitude' } -{ #category : #'*Iceberg-Libgit' } +{ #category : '*Iceberg-Libgit' } Magnitude >> iceSemanticVersion [ ^ IceSemanticVersion major: self asInteger minor: 0 patch: 0 ] diff --git a/Iceberg-Libgit/ManifestIcebergLibgit.class.st b/Iceberg-Libgit/ManifestIcebergLibgit.class.st index ffd7d0a8b8..d1a372608c 100644 --- a/Iceberg-Libgit/ManifestIcebergLibgit.class.st +++ b/Iceberg-Libgit/ManifestIcebergLibgit.class.st @@ -2,12 +2,14 @@ I store metadata for this package. These meta data are used by other tools such as the SmalllintManifestChecker and the critics Browser " Class { - #name : #ManifestIcebergLibgit, - #superclass : #PackageManifest, - #category : #'Iceberg-Libgit-Manifest' + #name : 'ManifestIcebergLibgit', + #superclass : 'PackageManifest', + #category : 'Iceberg-Libgit-Manifest', + #package : 'Iceberg-Libgit', + #tag : 'Manifest' } -{ #category : #'meta-data' } +{ #category : 'meta-data' } ManifestIcebergLibgit class >> description [ ^ 'I contains the core of the libgit binding of Iceberg. diff --git a/Iceberg-Libgit/TIceRepositoryReader.trait.st b/Iceberg-Libgit/TIceRepositoryReader.trait.st index fdf9f0a4ee..452e058883 100644 --- a/Iceberg-Libgit/TIceRepositoryReader.trait.st +++ b/Iceberg-Libgit/TIceRepositoryReader.trait.st @@ -2,16 +2,18 @@ I indicate when a clas is reader for iceberg " Trait { - #name : #TIceRepositoryReader, - #category : #'Iceberg-Libgit-Writing' + #name : 'TIceRepositoryReader', + #category : 'Iceberg-Libgit-Writing', + #package : 'Iceberg-Libgit', + #tag : 'Writing' } -{ #category : #accessing } +{ #category : 'accessing' } TIceRepositoryReader classSide >> id [ ^ self required ] -{ #category : #testing } +{ #category : 'testing' } TIceRepositoryReader classSide >> isLegacyDefault [ ^ false ] diff --git a/Iceberg-Libgit/TIceRepositoryWriter.trait.st b/Iceberg-Libgit/TIceRepositoryWriter.trait.st index 29bc669bb6..ae87f6b5d8 100644 --- a/Iceberg-Libgit/TIceRepositoryWriter.trait.st +++ b/Iceberg-Libgit/TIceRepositoryWriter.trait.st @@ -2,22 +2,24 @@ I indicate when a class is writer for iceberg " Trait { - #name : #TIceRepositoryWriter, - #category : #'Iceberg-Libgit-Writing' + #name : 'TIceRepositoryWriter', + #category : 'Iceberg-Libgit-Writing', + #package : 'Iceberg-Libgit', + #tag : 'Writing' } -{ #category : #accessing } +{ #category : 'accessing' } TIceRepositoryWriter classSide >> id [ ^ self required ] -{ #category : #testing } +{ #category : 'testing' } TIceRepositoryWriter classSide >> isDefault [ "Indicates when this is default when create new repositories" ^ false ] -{ #category : #testing } +{ #category : 'testing' } TIceRepositoryWriter classSide >> isLegacyDefault [ "Indicates when repository is default as legacy (when there is no properties file indicating a specific format type)" diff --git a/Iceberg-Libgit/package.st b/Iceberg-Libgit/package.st index 5b2adfb856..994226c8c8 100644 --- a/Iceberg-Libgit/package.st +++ b/Iceberg-Libgit/package.st @@ -1 +1 @@ -Package { #name : #'Iceberg-Libgit' } +Package { #name : 'Iceberg-Libgit' } diff --git a/Iceberg-Tests/IceAbstractTestCase.class.st b/Iceberg-Tests/IceAbstractTestCase.class.st index c358683866..24009302d0 100644 --- a/Iceberg-Tests/IceAbstractTestCase.class.st +++ b/Iceberg-Tests/IceAbstractTestCase.class.st @@ -1,111 +1,113 @@ Class { - #name : #IceAbstractTestCase, - #superclass : #IceParameterizedTestCase, + #name : 'IceAbstractTestCase', + #superclass : 'IceParameterizedTestCase', #instVars : [ 'fixture' ], - #category : 'Iceberg-Tests-Base' + #category : 'Iceberg-Tests-Base', + #package : 'Iceberg-Tests', + #tag : 'Base' } -{ #category : #assertions } +{ #category : 'assertions' } IceAbstractTestCase >> assertClassExists: aString [ self assert: (self repository workingCopy environment ask includesClassNamed: aString) ] -{ #category : #assertions } +{ #category : 'assertions' } IceAbstractTestCase >> assertMethodExists: aMethodName inClass: aClassName [ self assert: ((self repository workingCopy environment ask classNamed: aClassName) includesSelector: aMethodName) ] -{ #category : #assertions } +{ #category : 'assertions' } IceAbstractTestCase >> assertPackageExists: aString [ self assert: (self repository workingCopy environment ask includesPackageNamed: aString) ] -{ #category : #assertions } +{ #category : 'assertions' } IceAbstractTestCase >> denyClassExists: aString [ self deny: (self repository workingCopy environment ask includesClassNamed: aString) ] -{ #category : #asserting } +{ #category : 'asserting' } IceAbstractTestCase >> denyMethodExists: aMethodName inClass: aClassName [ self deny: ((self repository workingCopy environment ask classNamed: aClassName) includesSelector: aMethodName) ] -{ #category : #assertions } +{ #category : 'assertions' } IceAbstractTestCase >> denyPackageExists: aString [ self deny: (self repository workingCopy environment ask includesPackageNamed: aString) ] -{ #category : #running } +{ #category : 'running' } IceAbstractTestCase >> newFixture [ self subclassResponsibility ] -{ #category : #factory } +{ #category : 'factory' } IceAbstractTestCase >> newRemoteNamed: aString [ ^ fixture newRemoteNamed: aString ] -{ #category : #accessing } +{ #category : 'accessing' } IceAbstractTestCase >> packageName1 [ ^ fixture packageName1 ] -{ #category : #accessing } +{ #category : 'accessing' } IceAbstractTestCase >> packageName2 [ ^ fixture packageName2 ] -{ #category : #accessing } +{ #category : 'accessing' } IceAbstractTestCase >> remote [ ^ fixture remote ] -{ #category : #accessing } +{ #category : 'accessing' } IceAbstractTestCase >> remoteBranchName [ ^ fixture remoteBranchName ] -{ #category : #accessing } +{ #category : 'accessing' } IceAbstractTestCase >> remoteRepository [ ^ fixture remoteRepository ] -{ #category : #accessing } +{ #category : 'accessing' } IceAbstractTestCase >> repository [ ^ fixture repository ] -{ #category : #running } +{ #category : 'running' } IceAbstractTestCase >> setUp [ super setUp. fixture := self newFixture. fixture setUp ] -{ #category : #running } +{ #category : 'running' } IceAbstractTestCase >> tearDown [ fixture tearDown. super tearDown. ] -{ #category : #accessing } +{ #category : 'accessing' } IceAbstractTestCase >> workingCopy [ ^ self repository workingCopy diff --git a/Iceberg-Tests/IceAbstractTestFactory.class.st b/Iceberg-Tests/IceAbstractTestFactory.class.st index 8a4bebf73d..1bd35ca1a2 100644 --- a/Iceberg-Tests/IceAbstractTestFactory.class.st +++ b/Iceberg-Tests/IceAbstractTestFactory.class.st @@ -1,46 +1,48 @@ Class { - #name : #IceAbstractTestFactory, - #superclass : #Object, - #category : 'Iceberg-Tests-Common-Fixtures' + #name : 'IceAbstractTestFactory', + #superclass : 'Object', + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #initialization } +{ #category : 'initialization' } IceAbstractTestFactory class >> setUp [ ^ self new setUp ] -{ #category : #accessing } +{ #category : 'accessing' } IceAbstractTestFactory >> ensureRemoteRepository [ self subclassResponsibility ] -{ #category : #testing } +{ #category : 'testing' } IceAbstractTestFactory >> isGit [ self subclassResponsibility ] -{ #category : #initialization } +{ #category : 'initialization' } IceAbstractTestFactory >> newRemoteNamed: aName toRepository: aRepository [ self subclassResponsibility ] -{ #category : #initialization } +{ #category : 'initialization' } IceAbstractTestFactory >> newRepositoryNamed: projectName [ ^ self newRepositoryNamed: projectName withSubdirectory: '' ] -{ #category : #initialization } +{ #category : 'initialization' } IceAbstractTestFactory >> newRepositoryNamed: projectName withSubdirectory: aSubdirectory [ self subclassResponsibility ] -{ #category : #initialization } +{ #category : 'initialization' } IceAbstractTestFactory >> tearDownWithRepository: aRepository [ self subclassResponsibility diff --git a/Iceberg-Tests/IceBasicCherryPickingFixture.class.st b/Iceberg-Tests/IceBasicCherryPickingFixture.class.st index d3264849bc..25e9773fa2 100644 --- a/Iceberg-Tests/IceBasicCherryPickingFixture.class.st +++ b/Iceberg-Tests/IceBasicCherryPickingFixture.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceBasicCherryPickingFixture, - #superclass : #IceBasicRepositoryFixture, - #category : #'Iceberg-Tests-Cherrypicking' + #name : 'IceBasicCherryPickingFixture', + #superclass : 'IceBasicRepositoryFixture', + #category : 'Iceberg-Tests-Cherrypicking', + #package : 'Iceberg-Tests', + #tag : 'Cherrypicking' } -{ #category : #running } +{ #category : 'running' } IceBasicCherryPickingFixture >> setUp [ super setUp. diff --git a/Iceberg-Tests/IceBasicRepositoryFixture.class.st b/Iceberg-Tests/IceBasicRepositoryFixture.class.st index e41f987c8b..c299f52fe4 100644 --- a/Iceberg-Tests/IceBasicRepositoryFixture.class.st +++ b/Iceberg-Tests/IceBasicRepositoryFixture.class.st @@ -1,14 +1,16 @@ Class { - #name : #IceBasicRepositoryFixture, - #superclass : #IceNotYetClonedRepositoryFixture, + #name : 'IceBasicRepositoryFixture', + #superclass : 'IceNotYetClonedRepositoryFixture', #instVars : [ 'repository', 'subdirectory' ], - #category : 'Iceberg-Tests-Common-Fixtures' + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #initialization } +{ #category : 'initialization' } IceBasicRepositoryFixture class >> inGit [ ^ self new @@ -16,7 +18,7 @@ IceBasicRepositoryFixture class >> inGit [ yourself ] -{ #category : #initialization } +{ #category : 'initialization' } IceBasicRepositoryFixture class >> inMemory [ ^ self new @@ -24,43 +26,43 @@ IceBasicRepositoryFixture class >> inMemory [ yourself ] -{ #category : #initialization } +{ #category : 'initialization' } IceBasicRepositoryFixture >> initialize [ super initialize. subdirectory := ''. ] -{ #category : #initialization } +{ #category : 'initialization' } IceBasicRepositoryFixture >> newRemoteNamed: aName [ ^ factory newRemoteNamed: aName toRepository: repository ] -{ #category : #accessing } +{ #category : 'accessing' } IceBasicRepositoryFixture >> repository [ ^ repository ] -{ #category : #running } +{ #category : 'running' } IceBasicRepositoryFixture >> setUp [ super setUp. repository := factory newRepositoryNamed: projectName withSubdirectory: self subdirectory ] -{ #category : #running } +{ #category : 'running' } IceBasicRepositoryFixture >> subdirectory [ ^ subdirectory ] -{ #category : #running } +{ #category : 'running' } IceBasicRepositoryFixture >> subdirectory: aSubdirectory [ subdirectory := aSubdirectory ] -{ #category : #running } +{ #category : 'running' } IceBasicRepositoryFixture >> tearDown [ factory tearDownWithRepository: repository. diff --git a/Iceberg-Tests/IceBornRepositoryTest.class.st b/Iceberg-Tests/IceBornRepositoryTest.class.st index 46a8125840..82f23a18a2 100644 --- a/Iceberg-Tests/IceBornRepositoryTest.class.st +++ b/Iceberg-Tests/IceBornRepositoryTest.class.st @@ -1,23 +1,25 @@ Class { - #name : #IceBornRepositoryTest, - #superclass : #IceAbstractTestCase, - #category : 'Iceberg-Tests-Common' + #name : 'IceBornRepositoryTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Common', + #package : 'Iceberg-Tests', + #tag : 'Common' } -{ #category : #testing } +{ #category : 'testing' } IceBornRepositoryTest class >> isAbstract [ ^ self == IceBornRepositoryTest ] -{ #category : #accessing } +{ #category : 'accessing' } IceBornRepositoryTest >> expectedCommitsInNewBranch [ "A git repository has just the initial commit" ^ 1 ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testAccessingNonExistingTagRaisesException [ self repository head isUnbornBranch ifTrue: [ ^ self skip ]. @@ -25,7 +27,7 @@ IceBornRepositoryTest >> testAccessingNonExistingTagRaisesException [ self should: [self repository tagNamed: 'nonExisting'] raise: IceTagNotFound ] -{ #category : #'tests-remotes' } +{ #category : 'tests-remotes' } IceBornRepositoryTest >> testAddNewRemoteListsRemote [ | remote | @@ -35,7 +37,7 @@ IceBornRepositoryTest >> testAddNewRemoteListsRemote [ self assert: (self repository remotes includes: remote). ] -{ #category : #'tests-remotes' } +{ #category : 'tests-remotes' } IceBornRepositoryTest >> testAddTwoRemotesWithSameNameRaiseError [ | remote | @@ -46,7 +48,7 @@ IceBornRepositoryTest >> testAddTwoRemotesWithSameNameRaiseError [ self should: [ self repository addRemote: remote ] raise: IceRemoteAlreadyExistsError ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testBranchAlreadyExistsErrorInformsExistingBranchName [ | branchName | @@ -59,7 +61,7 @@ IceBornRepositoryTest >> testBranchAlreadyExistsErrorInformsExistingBranchName [ do: [ :error | self assert: error branchName equals: branchName ] ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testBranchNotFoundErrorInformsNotFoundBranchName [ | branchName | @@ -70,7 +72,7 @@ IceBornRepositoryTest >> testBranchNotFoundErrorInformsNotFoundBranchName [ do: [ :error | self assert: error branchName equals: branchName ] ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testBranchWithSlashesNotFoundErrorInformsNotFoundBranchName [ | branchName | @@ -81,7 +83,7 @@ IceBornRepositoryTest >> testBranchWithSlashesNotFoundErrorInformsNotFoundBranch do: [ :error | self assert: error branchName equals: branchName ] ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testCreateExistingBranchRaisesError [ self repository head isUnbornBranch ifTrue: [ ^ self skip ]. @@ -89,7 +91,7 @@ IceBornRepositoryTest >> testCreateExistingBranchRaisesError [ self should: [self repository createBranch: 'master'] raise: IceBranchAlreadyExists ] -{ #category : #'tests-tags' } +{ #category : 'tests-tags' } IceBornRepositoryTest >> testCreateExistingTagRaisesError [ self repository head isUnbornBranch ifTrue: [ ^ self skip ]. @@ -98,7 +100,7 @@ IceBornRepositoryTest >> testCreateExistingTagRaisesError [ self should: [self repository createTag: 'v1.0'] raise: IceTagAlreadyExists ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testCreateNewBranchSwitchesToBranch [ | createdBranch | @@ -106,7 +108,7 @@ IceBornRepositoryTest >> testCreateNewBranchSwitchesToBranch [ self assert: self repository head equals: createdBranch ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testCreateNewBranchWithSlashesSwitchesToBranch [ | createdBranch | @@ -114,7 +116,7 @@ IceBornRepositoryTest >> testCreateNewBranchWithSlashesSwitchesToBranch [ self assert: self repository head equals: createdBranch ] -{ #category : #'tests-remotes' } +{ #category : 'tests-remotes' } IceBornRepositoryTest >> testDeleteRepositoryDeletesLocation [ "Test valid only for git backend. Other backends may not have location" @@ -126,7 +128,7 @@ IceBornRepositoryTest >> testDeleteRepositoryDeletesLocation [ self deny: self repository location exists. ] -{ #category : #'tests-tags' } +{ #category : 'tests-tags' } IceBornRepositoryTest >> testDeleteTagDoesNotListListsDeletedTag [ | tagName | @@ -139,7 +141,7 @@ IceBornRepositoryTest >> testDeleteTagDoesNotListListsDeletedTag [ self assert: self repository tags isEmpty ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testListBranchesListsExistingBranches [ | branches | @@ -148,7 +150,7 @@ IceBornRepositoryTest >> testListBranchesListsExistingBranches [ self assert: branches first name equals: 'master' ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testListBranchesListsNewBranch [ | branches branchName | @@ -164,7 +166,7 @@ IceBornRepositoryTest >> testListBranchesListsNewBranch [ ifNone: [ self fail ] ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testListBranchesListsNewBranchWithSlashes [ | branches branchName | @@ -180,7 +182,7 @@ IceBornRepositoryTest >> testListBranchesListsNewBranchWithSlashes [ ifNone: [ self fail ] ] -{ #category : #'tests-tags' } +{ #category : 'tests-tags' } IceBornRepositoryTest >> testListTagsListsNewTag [ | tags tagName | @@ -196,7 +198,7 @@ IceBornRepositoryTest >> testListTagsListsNewTag [ ifNone: [ self fail ] ] -{ #category : #'tests-tags' } +{ #category : 'tests-tags' } IceBornRepositoryTest >> testListTagsOfACommitWithNoTagsReturnsEmptyCollection [ self repository head isUnbornBranch ifTrue: [ ^ self skip ]. @@ -204,7 +206,7 @@ IceBornRepositoryTest >> testListTagsOfACommitWithNoTagsReturnsEmptyCollection [ self assert: self repository headCommit tags isEmpty ] -{ #category : #'tests-tags' } +{ #category : 'tests-tags' } IceBornRepositoryTest >> testListTagsOfACommitWithTagsReturnsTagCollection [ self repository head isUnbornBranch ifTrue: [ ^ self skip ]. @@ -213,7 +215,7 @@ IceBornRepositoryTest >> testListTagsOfACommitWithTagsReturnsTagCollection [ self assert: self repository headCommit tags first name equals: 'test' ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testNewBranchReferencesCurrentCommitAtBranchTime [ | commitAtBranchTime createdBranch | @@ -222,7 +224,7 @@ IceBornRepositoryTest >> testNewBranchReferencesCurrentCommitAtBranchTime [ self assert: createdBranch commit equals: commitAtBranchTime ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testNewBranchWithSlashReferencesCurrentCommitAtBranchTime [ | commitAtBranchTime createdBranch | @@ -231,13 +233,13 @@ IceBornRepositoryTest >> testNewBranchWithSlashReferencesCurrentCommitAtBranchTi self assert: createdBranch commit equals: commitAtBranchTime ] -{ #category : #'tests-remotes' } +{ #category : 'tests-remotes' } IceBornRepositoryTest >> testNewRepositoryHasNoRemotes [ self assert: self repository remotes isEmpty ] -{ #category : #'tests-remotes' } +{ #category : 'tests-remotes' } IceBornRepositoryTest >> testRemoteAlreadyExistsErrorReferencesExistingRemote [ | remote remoteName | @@ -252,7 +254,7 @@ IceBornRepositoryTest >> testRemoteAlreadyExistsErrorReferencesExistingRemote [ do: [ :error | self assert: error remoteName equals: remoteName ] ] -{ #category : #'tests-project' } +{ #category : 'tests-project' } IceBornRepositoryTest >> testRepositoryHasProjectFile [ fixture factory isGit ifFalse: [ ^ self skip ]. @@ -261,7 +263,7 @@ IceBornRepositoryTest >> testRepositoryHasProjectFile [ self assert: (self repository location / '.project') exists ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testSwitchToExistingBranchNameChangesRepositoryHead [ | branchName newBranch masterBranch | @@ -278,7 +280,7 @@ IceBornRepositoryTest >> testSwitchToExistingBranchNameChangesRepositoryHead [ self assert: newBranch equals: self repository head. ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testSwitchToExistingBranchNameWithSlashesChangesRepositoryHead [ | branchName newBranch masterBranch | @@ -295,19 +297,19 @@ IceBornRepositoryTest >> testSwitchToExistingBranchNameWithSlashesChangesReposit self assert: newBranch equals: self repository head. ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testSwitchToUnexistingBranchRaisesError [ self should: [self repository switchToBranchNamed: 'nonexisting'] raise: IceBranchNotFound ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceBornRepositoryTest >> testSwitchToUnexistingBranchWithSlashesRaisesError [ self should: [self repository switchToBranchNamed: 'feature/nonexisting'] raise: IceBranchNotFound ] -{ #category : #'tests-tags' } +{ #category : 'tests-tags' } IceBornRepositoryTest >> testTagAlreadyExistsErrorInformsExistingTagName [ | tagName | diff --git a/Iceberg-Tests/IceCherryPickBrowserTest.class.st b/Iceberg-Tests/IceCherryPickBrowserTest.class.st index 0a8da366c2..fcf654b9fa 100644 --- a/Iceberg-Tests/IceCherryPickBrowserTest.class.st +++ b/Iceberg-Tests/IceCherryPickBrowserTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceCherryPickBrowserTest, - #superclass : #IceCherryPickingTest, - #category : #'Iceberg-Tests-Cherrypicking' + #name : 'IceCherryPickBrowserTest', + #superclass : 'IceCherryPickingTest', + #category : 'Iceberg-Tests-Cherrypicking', + #package : 'Iceberg-Tests', + #tag : 'Cherrypicking' } -{ #category : #tests } +{ #category : 'tests' } IceCherryPickBrowserTest >> testWindowOnMethodConflict [ | commitToCherryPick presenter | diff --git a/Iceberg-Tests/IceCherryPickingInitialDependencies.class.st b/Iceberg-Tests/IceCherryPickingInitialDependencies.class.st index 86cf8a48da..4ee15245c0 100644 --- a/Iceberg-Tests/IceCherryPickingInitialDependencies.class.st +++ b/Iceberg-Tests/IceCherryPickingInitialDependencies.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceCherryPickingInitialDependencies, - #superclass : #IceCherryPickingTest, - #category : #'Iceberg-Tests-Cherrypicking' + #name : 'IceCherryPickingInitialDependencies', + #superclass : 'IceCherryPickingTest', + #category : 'Iceberg-Tests-Cherrypicking', + #package : 'Iceberg-Tests', + #tag : 'Cherrypicking' } -{ #category : #tests } +{ #category : 'tests' } IceCherryPickingInitialDependencies >> testAddClassWithMethod [ | commitToCherryPick initialDiff commonAncestor extendedDiff receiverDiff cherrypicker | self repository createBranch: 'b2'. @@ -45,7 +47,7 @@ IceCherryPickingInitialDependencies >> testAddClassWithMethod [ equals: 1. ] -{ #category : #tests } +{ #category : 'tests' } IceCherryPickingInitialDependencies >> testRemoveClassWithMethod [ | commitToCherryPick initialDiff commonAncestor extendedDiff receiverDiff cherrypicker | diff --git a/Iceberg-Tests/IceCherryPickingTest.class.st b/Iceberg-Tests/IceCherryPickingTest.class.st index 3b99e430b6..24a1c8ef29 100644 --- a/Iceberg-Tests/IceCherryPickingTest.class.st +++ b/Iceberg-Tests/IceCherryPickingTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #IceCherryPickingTest, - #superclass : #IceAbstractTestCase, - #category : #'Iceberg-Tests-Cherrypicking' + #name : 'IceCherryPickingTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Cherrypicking', + #package : 'Iceberg-Tests', + #tag : 'Cherrypicking' } -{ #category : #testing } +{ #category : 'testing' } IceCherryPickingTest class >> isAbstract [ ^ self name = #IceCherryPickingTest ] -{ #category : #running } +{ #category : 'running' } IceCherryPickingTest >> newFixture [ ^ IceBasicCherryPickingFixture inGit diff --git a/Iceberg-Tests/IceClassesCherryPickingTest.class.st b/Iceberg-Tests/IceClassesCherryPickingTest.class.st index 43ae0f7d63..3226450f27 100644 --- a/Iceberg-Tests/IceClassesCherryPickingTest.class.st +++ b/Iceberg-Tests/IceClassesCherryPickingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceClassesCherryPickingTest, - #superclass : #IceCherryPickingTest, - #category : #'Iceberg-Tests-Cherrypicking' + #name : 'IceClassesCherryPickingTest', + #superclass : 'IceCherryPickingTest', + #category : 'Iceberg-Tests-Cherrypicking', + #package : 'Iceberg-Tests', + #tag : 'Cherrypicking' } -{ #category : #tests } +{ #category : 'tests' } IceClassesCherryPickingTest >> testAddClassDependingInATrait [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -52,7 +54,7 @@ IceClassesCherryPickingTest >> testAddClassDependingInATrait [ equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } IceClassesCherryPickingTest >> testAddClassDependingInATraitWithComposition [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -102,7 +104,7 @@ IceClassesCherryPickingTest >> testAddClassDependingInATraitWithComposition [ equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } IceClassesCherryPickingTest >> testAddClassSideMethodInExistingClass [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -134,7 +136,7 @@ IceClassesCherryPickingTest >> testAddClassSideMethodInExistingClass [ / 'm1') value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceClassesCherryPickingTest >> testAddClassUsingASharedPool [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -186,7 +188,7 @@ IceClassesCherryPickingTest >> testAddClassUsingASharedPool [ equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } IceClassesCherryPickingTest >> testAddClassWithMethod [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -215,7 +217,7 @@ IceClassesCherryPickingTest >> testAddClassWithMethod [ assert: (diff / self packageName1 / 'TestClass2' / 'm1') value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceClassesCherryPickingTest >> testAddClassWithSuperclassAsDependency [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -263,7 +265,7 @@ IceClassesCherryPickingTest >> testAddClassWithSuperclassAsDependency [ isClassDefinition ] -{ #category : #tests } +{ #category : 'tests' } IceClassesCherryPickingTest >> testAddClassWithoutDependencies [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -292,7 +294,7 @@ IceClassesCherryPickingTest >> testAddClassWithoutDependencies [ definition isClassDefinition ] -{ #category : #tests } +{ #category : 'tests' } IceClassesCherryPickingTest >> testModifyClassWithoutDependencies [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -323,7 +325,7 @@ IceClassesCherryPickingTest >> testModifyClassWithoutDependencies [ definition isClassDefinition ] -{ #category : #tests } +{ #category : 'tests' } IceClassesCherryPickingTest >> testRemoveClassWithSubclasses [ | commitToCherryPick diff mergeTree | @@ -360,7 +362,7 @@ IceClassesCherryPickingTest >> testRemoveClassWithSubclasses [ (diff / self packageName1 / 'TestSubclass') value isRemoval . ] -{ #category : #tests } +{ #category : 'tests' } IceClassesCherryPickingTest >> testRemoveClassWithSubclassesAndIntermediarySubclass [ | commitToCherryPick diff mergeTree | self repository workingCopy diff --git a/Iceberg-Tests/IceCleanWorkingCopyFixture.class.st b/Iceberg-Tests/IceCleanWorkingCopyFixture.class.st index efe7321fa1..c6a56eafae 100644 --- a/Iceberg-Tests/IceCleanWorkingCopyFixture.class.st +++ b/Iceberg-Tests/IceCleanWorkingCopyFixture.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceCleanWorkingCopyFixture, - #superclass : #IceBasicRepositoryFixture, - #category : 'Iceberg-Tests-Common-Fixtures' + #name : 'IceCleanWorkingCopyFixture', + #superclass : 'IceBasicRepositoryFixture', + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #running } +{ #category : 'running' } IceCleanWorkingCopyFixture >> setUp [ super setUp. diff --git a/Iceberg-Tests/IceCleanWorkingCopyTest.class.st b/Iceberg-Tests/IceCleanWorkingCopyTest.class.st index d7c635d903..5678308dcb 100644 --- a/Iceberg-Tests/IceCleanWorkingCopyTest.class.st +++ b/Iceberg-Tests/IceCleanWorkingCopyTest.class.st @@ -1,41 +1,43 @@ Class { - #name : #IceCleanWorkingCopyTest, - #superclass : #IceAbstractTestCase, - #category : 'Iceberg-Tests-Common' + #name : 'IceCleanWorkingCopyTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Common', + #package : 'Iceberg-Tests', + #tag : 'Common' } -{ #category : #testing } +{ #category : 'testing' } IceCleanWorkingCopyTest class >> isAbstract [ ^ self == IceCleanWorkingCopyTest ] -{ #category : #helpers } +{ #category : 'helpers' } IceCleanWorkingCopyTest >> commit1 [ ^ self currentCommitOfPackage: self packageName1 ] -{ #category : #helpers } +{ #category : 'helpers' } IceCleanWorkingCopyTest >> commit2 [ ^ self currentCommitOfPackage: self packageName2 ] -{ #category : #helpers } +{ #category : 'helpers' } IceCleanWorkingCopyTest >> currentCommitOfPackage: aPackageName [ ^ (self repository workingCopy packageNamed: aPackageName) currentCommit ] -{ #category : #tests } +{ #category : 'tests' } IceCleanWorkingCopyTest >> testWorkingCopyHasSingleCommit [ self repository workingCopy initializePackagesFromRepository. self assert: self repository workingCopy hasSingleCommit ] -{ #category : #tests } +{ #category : 'tests' } IceCleanWorkingCopyTest >> testWorkingCopyIsInSingleCommitStateWhenNewPackageIsCreated [ self repository workingCopy initializePackagesFromRepository. @@ -48,7 +50,7 @@ IceCleanWorkingCopyTest >> testWorkingCopyIsInSingleCommitStateWhenNewPackageIsC self shouldnt: [self repository workingCopy validateCanCommit] raise: IceWorkingCopyDesyncronized ] -{ #category : #tests } +{ #category : 'tests' } IceCleanWorkingCopyTest >> testWorkingCopyIsInSingleCommitStateWhenPackageIsNotLoaded [ (self repository packageNamed: self packageName1) unload. @@ -65,14 +67,14 @@ IceCleanWorkingCopyTest >> testWorkingCopyIsInSingleCommitStateWhenPackageIsNotL self shouldnt: [self repository workingCopy validateCanCommit] raise: IceWorkingCopyDesyncronized ] -{ #category : #tests } +{ #category : 'tests' } IceCleanWorkingCopyTest >> testWorkingCopyIsNotUnknownCommot [ self repository workingCopy initializePackagesFromRepository. self deny: self repository workingCopy hasUnknownCommit ] -{ #category : #tests } +{ #category : 'tests' } IceCleanWorkingCopyTest >> testWorkingCopySingleCommitIsPackage1Commit [ self repository workingCopy initializePackagesFromRepository. @@ -81,7 +83,7 @@ IceCleanWorkingCopyTest >> testWorkingCopySingleCommitIsPackage1Commit [ equals: (self repository packageNamed: self packageName1) currentCommit ] -{ #category : #tests } +{ #category : 'tests' } IceCleanWorkingCopyTest >> testWorkingCopySingleCommitIsPackage2Commit [ self repository workingCopy initializePackagesFromRepository. @@ -90,14 +92,14 @@ IceCleanWorkingCopyTest >> testWorkingCopySingleCommitIsPackage2Commit [ equals: (self repository packageNamed: self packageName2) currentCommit ] -{ #category : #tests } +{ #category : 'tests' } IceCleanWorkingCopyTest >> testWorkingStateIncludesPackage1CurrentCommit [ self repository workingCopy initializePackagesFromRepository. self assert: (self repository workingCopy workingCopyState includesCommit: self commit1). ] -{ #category : #tests } +{ #category : 'tests' } IceCleanWorkingCopyTest >> testWorkingStateIncludesPackage2CurrentCommit [ self repository workingCopy initializePackagesFromRepository. diff --git a/Iceberg-Tests/IceClonedFromRemoteFixture.class.st b/Iceberg-Tests/IceClonedFromRemoteFixture.class.st index 38c8159f4c..3268c450cc 100644 --- a/Iceberg-Tests/IceClonedFromRemoteFixture.class.st +++ b/Iceberg-Tests/IceClonedFromRemoteFixture.class.st @@ -1,47 +1,49 @@ Class { - #name : #IceClonedFromRemoteFixture, - #superclass : #IceNotYetClonedRepositoryFixture, + #name : 'IceClonedFromRemoteFixture', + #superclass : 'IceNotYetClonedRepositoryFixture', #instVars : [ 'remote', 'remoteBranchName', 'repository', 'pushRepository' ], - #category : #'Iceberg-Tests-Common-Fixtures' + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #accessing } +{ #category : 'accessing' } IceClonedFromRemoteFixture >> pushRepository [ ^ pushRepository ] -{ #category : #accessing } +{ #category : 'accessing' } IceClonedFromRemoteFixture >> remote [ ^ remote ] -{ #category : #accessing } +{ #category : 'accessing' } IceClonedFromRemoteFixture >> remoteBranchName [ ^ remoteBranchName ifNil: [ remoteBranchName := 'master' ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceClonedFromRemoteFixture >> remoteBranchName: aBranchName [ remoteBranchName := aBranchName ] -{ #category : #accessing } +{ #category : 'accessing' } IceClonedFromRemoteFixture >> remoteRepository [ ^ remoteRepository ] -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } IceClonedFromRemoteFixture >> repository [ ^ repository ] -{ #category : #running } +{ #category : 'running' } IceClonedFromRemoteFixture >> setUp [ super setUp. remoteRepository := self ensureRemoteRepository. @@ -79,7 +81,7 @@ IceClonedFromRemoteFixture >> setUp [ repository commitWithMessage: 'Initial local commit'." ] -{ #category : #running } +{ #category : 'running' } IceClonedFromRemoteFixture >> tearDown [ factory tearDownWithRepository: repository. factory tearDownWithRepository: remoteRepository. diff --git a/Iceberg-Tests/IceConflictsCherryPickingTest.class.st b/Iceberg-Tests/IceConflictsCherryPickingTest.class.st index c74c72ed69..f16d06239b 100644 --- a/Iceberg-Tests/IceConflictsCherryPickingTest.class.st +++ b/Iceberg-Tests/IceConflictsCherryPickingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceConflictsCherryPickingTest, - #superclass : #IceCherryPickingTest, - #category : #'Iceberg-Tests-Cherrypicking' + #name : 'IceConflictsCherryPickingTest', + #superclass : 'IceCherryPickingTest', + #category : 'Iceberg-Tests-Cherrypicking', + #package : 'Iceberg-Tests', + #tag : 'Cherrypicking' } -{ #category : #tests } +{ #category : 'tests' } IceConflictsCherryPickingTest >> testAddPackageConflict [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -34,7 +36,7 @@ IceConflictsCherryPickingTest >> testAddPackageConflict [ deny: (mergeTree / self packageName2) value isConflict ] -{ #category : #tests } +{ #category : 'tests' } IceConflictsCherryPickingTest >> testMethodModificationConflict [ | commitToCherryPick diff mergeTree | self repository workingCopy addPackageNamed: self packageName1. diff --git a/Iceberg-Tests/IceCredentialStoreTest.class.st b/Iceberg-Tests/IceCredentialStoreTest.class.st index 23290389f0..b6ccb11423 100644 --- a/Iceberg-Tests/IceCredentialStoreTest.class.st +++ b/Iceberg-Tests/IceCredentialStoreTest.class.st @@ -1,21 +1,23 @@ Class { - #name : #IceCredentialStoreTest, - #superclass : #TestCase, + #name : 'IceCredentialStoreTest', + #superclass : 'TestCase', #instVars : [ 'store', 'file', 'dir' ], - #category : #'Iceberg-Tests-Security' + #category : 'Iceberg-Tests-Security', + #package : 'Iceberg-Tests', + #tag : 'Security' } -{ #category : #running } +{ #category : 'running' } IceCredentialStoreTest >> setUp [ super setUp. store := IceCredentialStore new ] -{ #category : #running } +{ #category : 'running' } IceCredentialStoreTest >> tearDown [ file ifNotNil: [ file ensureDelete ]. dir ifNotNil: [ dir ensureDeleteAll ]. @@ -23,7 +25,7 @@ IceCredentialStoreTest >> tearDown [ ] -{ #category : #tests } +{ #category : 'tests' } IceCredentialStoreTest >> testEmptySShStore [ | cred | @@ -34,7 +36,7 @@ IceCredentialStoreTest >> testEmptySShStore [ self assert: cred privateKey equals: IceSshCredentials defaultPrivateKey. ] -{ #category : #tests } +{ #category : 'tests' } IceCredentialStoreTest >> testEmptyStore [ | cred | @@ -42,7 +44,7 @@ IceCredentialStoreTest >> testEmptyStore [ self deny: cred isPresent. ] -{ #category : #'tests - store' } +{ #category : 'tests - store' } IceCredentialStoreTest >> testLoadNonExistingFile [ | newStore cred | @@ -60,7 +62,7 @@ IceCredentialStoreTest >> testLoadNonExistingFile [ ] -{ #category : #tests } +{ #category : 'tests' } IceCredentialStoreTest >> testLookupHostname [ | cred orig | @@ -78,7 +80,7 @@ IceCredentialStoreTest >> testLookupHostname [ ] -{ #category : #'tests - store' } +{ #category : 'tests - store' } IceCredentialStoreTest >> testSaveAndLoadEmptyStore [ | newStore cred | @@ -98,7 +100,7 @@ IceCredentialStoreTest >> testSaveAndLoadEmptyStore [ ] -{ #category : #'tests - store' } +{ #category : 'tests - store' } IceCredentialStoreTest >> testStoreInNonExistingDirectory [ | newStore cred otherStore | @@ -130,7 +132,7 @@ IceCredentialStoreTest >> testStoreInNonExistingDirectory [ ] -{ #category : #'tests - store' } +{ #category : 'tests - store' } IceCredentialStoreTest >> testStoreInNonExistingFile [ | newStore cred otherStore | @@ -159,7 +161,7 @@ IceCredentialStoreTest >> testStoreInNonExistingFile [ ] -{ #category : #tests } +{ #category : 'tests' } IceCredentialStoreTest >> testStorePlainText [ | cred orig | @@ -177,7 +179,7 @@ IceCredentialStoreTest >> testStorePlainText [ ] -{ #category : #'tests - store' } +{ #category : 'tests - store' } IceCredentialStoreTest >> testStorePlainTextSavingInFile [ | cred orig newStore | @@ -203,7 +205,7 @@ IceCredentialStoreTest >> testStorePlainTextSavingInFile [ ] -{ #category : #tests } +{ #category : 'tests' } IceCredentialStoreTest >> testStoreSSH [ | cred orig | @@ -224,7 +226,7 @@ IceCredentialStoreTest >> testStoreSSH [ self assert: cred keyPassphrase equals: 'aPassword'. ] -{ #category : #'tests - store' } +{ #category : 'tests - store' } IceCredentialStoreTest >> testStoreToken [ | original | @@ -243,7 +245,7 @@ IceCredentialStoreTest >> testStoreToken [ ] -{ #category : #'tests - store' } +{ #category : 'tests - store' } IceCredentialStoreTest >> testStoreTokenSavingInFile [ | original newStore | @@ -270,13 +272,13 @@ IceCredentialStoreTest >> testStoreTokenSavingInFile [ ] -{ #category : #'tests - store' } +{ #category : 'tests - store' } IceCredentialStoreTest >> tokenForTesting [ ^ 'e72e16c7e42f292c6912e7710c838347ae178b4a' ] -{ #category : #'tests - store' } +{ #category : 'tests - store' } IceCredentialStoreTest >> usernameForTesting [ ^ 'aUsername' diff --git a/Iceberg-Tests/IceDetachedWorkingCopyFixture.class.st b/Iceberg-Tests/IceDetachedWorkingCopyFixture.class.st index 19730594ba..80f68d238b 100644 --- a/Iceberg-Tests/IceDetachedWorkingCopyFixture.class.st +++ b/Iceberg-Tests/IceDetachedWorkingCopyFixture.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceDetachedWorkingCopyFixture, - #superclass : #IceBasicRepositoryFixture, - #category : 'Iceberg-Tests-Common-Fixtures' + #name : 'IceDetachedWorkingCopyFixture', + #superclass : 'IceBasicRepositoryFixture', + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #running } +{ #category : 'running' } IceDetachedWorkingCopyFixture >> setUp [ | head | diff --git a/Iceberg-Tests/IceDetachedWorkingCopyTest.class.st b/Iceberg-Tests/IceDetachedWorkingCopyTest.class.st index efc79d6b90..0cc36b4c68 100644 --- a/Iceberg-Tests/IceDetachedWorkingCopyTest.class.st +++ b/Iceberg-Tests/IceDetachedWorkingCopyTest.class.st @@ -1,36 +1,38 @@ Class { - #name : #IceDetachedWorkingCopyTest, - #superclass : #IceAbstractTestCase, - #category : 'Iceberg-Tests-Common' + #name : 'IceDetachedWorkingCopyTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Common', + #package : 'Iceberg-Tests', + #tag : 'Common' } -{ #category : #testing } +{ #category : 'testing' } IceDetachedWorkingCopyTest class >> isAbstract [ ^ self == IceDetachedWorkingCopyTest ] -{ #category : #tests } +{ #category : 'tests' } IceDetachedWorkingCopyTest >> testIsDetached [ self assert: self repository workingCopy isDetached ] -{ #category : #tests } +{ #category : 'tests' } IceDetachedWorkingCopyTest >> testPackageIsNotDirty [ "There is no difference between the code in the image and the checkout'd code" self deny: self repository workingCopy isModified ] -{ #category : #tests } +{ #category : 'tests' } IceDetachedWorkingCopyTest >> testReattachInNewBranchMakesNoMoreDetached [ self repository createBranch: 'test' inCommit: self repository workingCopy referenceCommit. self deny: self repository workingCopy isDetached. ] -{ #category : #tests } +{ #category : 'tests' } IceDetachedWorkingCopyTest >> testReattachInNewBranchMakesNoMoreDirty [ self repository createBranch: 'test' inCommit: self repository workingCopy referenceCommit. diff --git a/Iceberg-Tests/IceDiffTests.class.st b/Iceberg-Tests/IceDiffTests.class.st index 7f95c49c78..036f623b6b 100644 --- a/Iceberg-Tests/IceDiffTests.class.st +++ b/Iceberg-Tests/IceDiffTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceDiffTests, - #superclass : #TestCase, - #category : 'Iceberg-Tests-Changes' + #name : 'IceDiffTests', + #superclass : 'TestCase', + #category : 'Iceberg-Tests-Changes', + #package : 'Iceberg-Tests', + #tag : 'Changes' } -{ #category : #tests } +{ #category : 'tests' } IceDiffTests >> testSimmetricDifferenceOfEmptyTreesGivesEmptyDiff [ | left right diff | @@ -16,7 +18,7 @@ IceDiffTests >> testSimmetricDifferenceOfEmptyTreesGivesEmptyDiff [ self deny: diff notEmpty ] -{ #category : #tests } +{ #category : 'tests' } IceDiffTests >> testSimmetricDifferenceOfFileAdditionCreatesAdditionOperation [ | left right diff | @@ -29,7 +31,7 @@ IceDiffTests >> testSimmetricDifferenceOfFileAdditionCreatesAdditionOperation [ self assert: (diff / 'Readme.md') value isRemoval ] -{ #category : #tests } +{ #category : 'tests' } IceDiffTests >> testSimmetricDifferenceOfFileModificationCreatesModificationOperation [ | left right diff leftMemoryFileSystem leftFileRef rightMemoryFileSystem rightFileRef | @@ -54,7 +56,7 @@ IceDiffTests >> testSimmetricDifferenceOfFileModificationCreatesModificationOper self assert: (diff / 'Readme.md') value rightDefinition contents equals: 'right'. ] -{ #category : #tests } +{ #category : 'tests' } IceDiffTests >> testSimmetricDifferenceOfFileModificationWithinDirectoryCreatesModificationOnDirectory [ | left right diff leftMemoryFileSystem leftFileRef rightMemoryFileSystem rightFileRef | @@ -77,7 +79,7 @@ IceDiffTests >> testSimmetricDifferenceOfFileModificationWithinDirectoryCreatesM self assert: (diff / 'src') value isModification ] -{ #category : #tests } +{ #category : 'tests' } IceDiffTests >> testSimmetricDifferenceOfFileModificationWithinDirectoryCreatesModificationOperationOnFile [ | left right diff leftMemoryFileSystem leftFileRef rightMemoryFileSystem rightFileRef leftSrc rightSrc | @@ -104,7 +106,7 @@ IceDiffTests >> testSimmetricDifferenceOfFileModificationWithinDirectoryCreatesM self assert: (diff / 'src' / 'Readme.md') value rightDefinition contents equals: 'right'. ] -{ #category : #tests } +{ #category : 'tests' } IceDiffTests >> testSimmetricDifferenceOfFileRemovalCreatesRemovalOperation [ | left right diff | @@ -117,7 +119,7 @@ IceDiffTests >> testSimmetricDifferenceOfFileRemovalCreatesRemovalOperation [ self assert: (diff / 'Readme.md') value isRemoval ] -{ #category : #tests } +{ #category : 'tests' } IceDiffTests >> testTwoSimmetricDifferencesShouldGiveTheSameResult [ | left right leftMemoryFileSystem leftFileRef rightMemoryFileSystem rightFileRef diff1 diff2 leftSrc rightSrc | diff --git a/Iceberg-Tests/IceDirtyDetachedWorkingCopyFixture.class.st b/Iceberg-Tests/IceDirtyDetachedWorkingCopyFixture.class.st index bf743e1d5e..1dbb526ebc 100644 --- a/Iceberg-Tests/IceDirtyDetachedWorkingCopyFixture.class.st +++ b/Iceberg-Tests/IceDirtyDetachedWorkingCopyFixture.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceDirtyDetachedWorkingCopyFixture, - #superclass : #IceDetachedWorkingCopyFixture, - #category : 'Iceberg-Tests-Common-Fixtures' + #name : 'IceDirtyDetachedWorkingCopyFixture', + #superclass : 'IceDetachedWorkingCopyFixture', + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #running } +{ #category : 'running' } IceDirtyDetachedWorkingCopyFixture >> setUp [ super setUp. diff --git a/Iceberg-Tests/IceDirtyDetachedWorkingCopyTest.class.st b/Iceberg-Tests/IceDirtyDetachedWorkingCopyTest.class.st index a5f2a215e9..fcd32eddf9 100644 --- a/Iceberg-Tests/IceDirtyDetachedWorkingCopyTest.class.st +++ b/Iceberg-Tests/IceDirtyDetachedWorkingCopyTest.class.st @@ -1,43 +1,45 @@ Class { - #name : #IceDirtyDetachedWorkingCopyTest, - #superclass : #IceAbstractTestCase, - #category : 'Iceberg-Tests-Common' + #name : 'IceDirtyDetachedWorkingCopyTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Common', + #package : 'Iceberg-Tests', + #tag : 'Common' } -{ #category : #testing } +{ #category : 'testing' } IceDirtyDetachedWorkingCopyTest class >> isAbstract [ ^ self == IceDirtyDetachedWorkingCopyTest ] -{ #category : #tests } +{ #category : 'tests' } IceDirtyDetachedWorkingCopyTest >> testIsDetached [ self assert: self repository workingCopy isDetached ] -{ #category : #tests } +{ #category : 'tests' } IceDirtyDetachedWorkingCopyTest >> testPackageIsDirty [ "There are uncommited changes" self assert: self repository workingCopy isModified ] -{ #category : #tests } +{ #category : 'tests' } IceDirtyDetachedWorkingCopyTest >> testReattachInNewBranchIsStillDirty [ self repository createBranch: 'test' inCommit: self repository workingCopy referenceCommit. self assert: self repository workingCopy isModified. ] -{ #category : #tests } +{ #category : 'tests' } IceDirtyDetachedWorkingCopyTest >> testReattachInNewBranchMakesNoMoreDetached [ self repository createBranch: 'test' inCommit: self repository workingCopy referenceCommit. self deny: self repository workingCopy isDetached. ] -{ #category : #tests } +{ #category : 'tests' } IceDirtyDetachedWorkingCopyTest >> testWorkingCopyDiffIsAgainstReferenceCommitAndNotHead [ self assert: self repository workingCopyDiff targetVersion equals: self repository workingCopy referenceCommit. diff --git a/Iceberg-Tests/IceExtensionMethodCherryPickingTest.class.st b/Iceberg-Tests/IceExtensionMethodCherryPickingTest.class.st index 275bbae6b1..7aa8ce38a9 100644 --- a/Iceberg-Tests/IceExtensionMethodCherryPickingTest.class.st +++ b/Iceberg-Tests/IceExtensionMethodCherryPickingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceExtensionMethodCherryPickingTest, - #superclass : #IceCherryPickingTest, - #category : #'Iceberg-Tests-Cherrypicking' + #name : 'IceExtensionMethodCherryPickingTest', + #superclass : 'IceCherryPickingTest', + #category : 'Iceberg-Tests-Cherrypicking', + #package : 'Iceberg-Tests', + #tag : 'Cherrypicking' } -{ #category : #tests } +{ #category : 'tests' } IceExtensionMethodCherryPickingTest >> testAddExtensionMethodInExistingClass [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -34,7 +36,7 @@ IceExtensionMethodCherryPickingTest >> testAddExtensionMethodInExistingClass [ value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceExtensionMethodCherryPickingTest >> testAddExtensionMethodInExistingTrait [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -65,7 +67,7 @@ IceExtensionMethodCherryPickingTest >> testAddExtensionMethodInExistingTrait [ / 'm1') value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceExtensionMethodCherryPickingTest >> testAddTwoExtensionMethodsInExistingClass [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -96,7 +98,7 @@ IceExtensionMethodCherryPickingTest >> testAddTwoExtensionMethodsInExistingClass assert: (diff / self packageName2 / 'TestClass' / 'm2') value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceExtensionMethodCherryPickingTest >> testAddTwoExtensionMethodsInExistingClasses [ | commitToCherryPick diff mergeTree | @@ -137,7 +139,7 @@ IceExtensionMethodCherryPickingTest >> testAddTwoExtensionMethodsInExistingClass assert: (diff / self packageName2 / 'TestClass2' / 'm2') value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceExtensionMethodCherryPickingTest >> testAddTwoExtensionMethodsInNonExistingClasses [ | commitToCherryPick diff mergeTree | self repository workingCopy addPackageNamed: self packageName2. @@ -188,7 +190,7 @@ IceExtensionMethodCherryPickingTest >> testAddTwoExtensionMethodsInNonExistingCl assert: (diff / self packageName2 / 'TestClass2' / 'm2') value isAddition. ] -{ #category : #tests } +{ #category : 'tests' } IceExtensionMethodCherryPickingTest >> testModifyExtensionMethodInExistingClass [ | commitToCherryPick diff mergeTree | self repository workingCopy addPackageNamed: self packageName2. @@ -223,7 +225,7 @@ IceExtensionMethodCherryPickingTest >> testModifyExtensionMethodInExistingClass assert: (diff / self packageName2 / 'TestClass' / 'm1') value isModification. ] -{ #category : #tests } +{ #category : 'tests' } IceExtensionMethodCherryPickingTest >> testRemoveExtensionMethodInExistingClass [ | commitToCherryPick diff mergeTree | self repository workingCopy addPackageNamed: self packageName2. diff --git a/Iceberg-Tests/IceFileDefinitionTests.class.st b/Iceberg-Tests/IceFileDefinitionTests.class.st index a2d6690a41..a4fcf4b1c6 100644 --- a/Iceberg-Tests/IceFileDefinitionTests.class.st +++ b/Iceberg-Tests/IceFileDefinitionTests.class.st @@ -1,23 +1,25 @@ Class { - #name : #IceFileDefinitionTests, - #superclass : #TestCase, - #category : 'Iceberg-Tests-Changes' + #name : 'IceFileDefinitionTests', + #superclass : 'TestCase', + #category : 'Iceberg-Tests-Changes', + #package : 'Iceberg-Tests', + #tag : 'Changes' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } IceFileDefinitionTests class >> bytesWithIlegalLeadingBytes [ ^ #[102 111 111 160 102 111 111] ] -{ #category : #tests } +{ #category : 'tests' } IceFileDefinitionTests >> hexDumped: bytesWithIlegalLeadingBytes [ ^ String streamContents: [ :str | bytesWithIlegalLeadingBytes hexDumpOn: str max: Float infinity ]. ] -{ #category : #tests } +{ #category : 'tests' } IceFileDefinitionTests >> testContentsOfBinaryTextFileDefinitionInUtf8IsHexDumped [ | definition hexDumped | @@ -31,7 +33,7 @@ IceFileDefinitionTests >> testContentsOfBinaryTextFileDefinitionInUtf8IsHexDumpe self assert: definition contents equals: hexDumped. ] -{ #category : #tests } +{ #category : 'tests' } IceFileDefinitionTests >> testContentsOfTextFileDefinitionInUtf16IsHexDumped [ | text definition bytes | @@ -46,7 +48,7 @@ IceFileDefinitionTests >> testContentsOfTextFileDefinitionInUtf16IsHexDumped [ self assert: definition contents equals: (self hexDumped: bytes). ] -{ #category : #tests } +{ #category : 'tests' } IceFileDefinitionTests >> testContentsOfTextFileDefinitionInUtf8IsDecoded [ | text definition | diff --git a/Iceberg-Tests/IceFileRemoteTest.class.st b/Iceberg-Tests/IceFileRemoteTest.class.st index 7dc03d5fc2..f385cd7b49 100644 --- a/Iceberg-Tests/IceFileRemoteTest.class.st +++ b/Iceberg-Tests/IceFileRemoteTest.class.st @@ -2,12 +2,14 @@ An IceFileRemoteTest is a test class for testing the behavior of IceFileRemote " Class { - #name : #IceFileRemoteTest, - #superclass : #TestCase, - #category : 'Iceberg-Tests-Core-Remotes' + #name : 'IceFileRemoteTest', + #superclass : 'TestCase', + #category : 'Iceberg-Tests-Core-Remotes', + #package : 'Iceberg-Tests', + #tag : 'Core-Remotes' } -{ #category : #tests } +{ #category : 'tests' } IceFileRemoteTest >> testCanHandleFileUrl [ | url | self assert: (IceGitFileRemote canHandleUrl: 'file:///Users/pharo/some-repo-name'). @@ -22,7 +24,7 @@ IceFileRemoteTest >> testCanHandleFileUrl [ ifFalse: [ '/Users/pharo/some-repo-name' ]). ] -{ #category : #tests } +{ #category : 'tests' } IceFileRemoteTest >> testCanHandleUnixPath [ "git clone existing-repo tmp-repo produces a url = /..../existing-repo remote" | url | diff --git a/Iceberg-Tests/IceGitCleanWorkingCopyTest.class.st b/Iceberg-Tests/IceGitCleanWorkingCopyTest.class.st index 3a19db3937..b676a0aa26 100644 --- a/Iceberg-Tests/IceGitCleanWorkingCopyTest.class.st +++ b/Iceberg-Tests/IceGitCleanWorkingCopyTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceGitCleanWorkingCopyTest, - #superclass : #IceCleanWorkingCopyTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceGitCleanWorkingCopyTest', + #superclass : 'IceCleanWorkingCopyTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitCleanWorkingCopyTest >> newFixture [ ^ IceCleanWorkingCopyFixture inGit ] diff --git a/Iceberg-Tests/IceGitCloneTest.class.st b/Iceberg-Tests/IceGitCloneTest.class.st index 4b8caa1da5..567026f166 100644 --- a/Iceberg-Tests/IceGitCloneTest.class.st +++ b/Iceberg-Tests/IceGitCloneTest.class.st @@ -1,19 +1,21 @@ Class { - #name : #IceGitCloneTest, - #superclass : #IceAbstractTestCase, + #name : 'IceGitCloneTest', + #superclass : 'IceAbstractTestCase', #instVars : [ 'oldProviderType' ], - #category : #'Iceberg-Tests-Git' + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitCloneTest >> newFixture [ ^ IceNotYetClonedRepositoryFixture inGit ] -{ #category : #tests } +{ #category : 'tests' } IceGitCloneTest >> setUp [ super setUp. @@ -21,14 +23,14 @@ IceGitCloneTest >> setUp [ IceCredentialsProvider providerType: IceNonInteractiveCredentialsProvider. ] -{ #category : #tests } +{ #category : 'tests' } IceGitCloneTest >> tearDown [ IceCredentialsProvider providerType: oldProviderType. super tearDown. ] -{ #category : #tests } +{ #category : 'tests' } IceGitCloneTest >> testCloneErrorRemovesLocation [ fixture ensureRemoteRepository. @@ -41,7 +43,7 @@ IceGitCloneTest >> testCloneErrorRemovesLocation [ self deny: fixture location exists ] -{ #category : #tests } +{ #category : 'tests' } IceGitCloneTest >> testClonedRepositoryIsGitClone [ fixture ensureRemoteRepository. @@ -54,7 +56,7 @@ IceGitCloneTest >> testClonedRepositoryIsGitClone [ self assert: (fixture location / '.git') exists ] -{ #category : #tests } +{ #category : 'tests' } IceGitCloneTest >> testLocationAlreadyExistsThrowsException [ | action | @@ -70,13 +72,13 @@ IceGitCloneTest >> testLocationAlreadyExistsThrowsException [ self should: [ action execute ] raise: IceCloneLocationAlreadyExists ] -{ #category : #tests } +{ #category : 'tests' } IceGitCloneTest >> testLocationDoesNotInitiallyExist [ self deny: fixture location exists ] -{ #category : #tests } +{ #category : 'tests' } IceGitCloneTest >> testLocationExistsAfterClone [ fixture ensureRemoteRepository. @@ -89,7 +91,7 @@ IceGitCloneTest >> testLocationExistsAfterClone [ self assert: fixture location exists ] -{ #category : #tests } +{ #category : 'tests' } IceGitCloneTest >> testRemoteDoesNotExistsShouldThrowException [ self isCI ifTrue: [ self skip ]. diff --git a/Iceberg-Tests/IceGitCommand.class.st b/Iceberg-Tests/IceGitCommand.class.st index be17760405..4e73aefd1a 100644 --- a/Iceberg-Tests/IceGitCommand.class.st +++ b/Iceberg-Tests/IceGitCommand.class.st @@ -31,22 +31,23 @@ The latter is useful for simplifying the specification of optional parameters, f " Class { - #name : #IceGitCommand, - #superclass : #Object, + #name : 'IceGitCommand', + #superclass : 'Object', #instVars : [ 'directory', 'command' ], - #category : #'Iceberg-Tests' + #category : 'Iceberg-Tests', + #package : 'Iceberg-Tests' } -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommand class >> gitCommand [ ^ Smalltalk os isWindows ifTrue: [ 'git' ] ifFalse:[ '/usr/bin/git' ] ] -{ #category : #execute } +{ #category : 'execute' } IceGitCommand class >> in: directory execute: commandDescription [ "See class comments for the specification of possible command descriptions" ^ self new @@ -56,7 +57,7 @@ IceGitCommand class >> in: directory execute: commandDescription [ ] -{ #category : #execute } +{ #category : 'execute' } IceGitCommand class >> preprocess: commandDescription [ commandDescription ifNil: [ ^ {} ]. commandDescription isString ifTrue: [ @@ -69,37 +70,37 @@ IceGitCommand class >> preprocess: commandDescription [ self error: ('Unknown argument type in git command: {1}' format: commandDescription) ] -{ #category : #execute } +{ #category : 'execute' } IceGitCommand class >> preprocessString: commandDescription [ ^ (commandDescription withoutPrefix: '"') withoutSuffix: '"' ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommand >> command [ ^ command ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommand >> command: anObject [ command := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommand >> directory [ ^ directory ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommand >> directory: anObject [ directory := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } IceGitCommand >> gitCommand [ ^ self class gitCommand ] -{ #category : #running } +{ #category : 'running' } IceGitCommand >> run [ UIManager default informUserDuring: [ :bar | @@ -108,7 +109,7 @@ IceGitCommand >> run [ ] -{ #category : #running } +{ #category : 'running' } IceGitCommand >> runLibCGitCommand [ | exitCode aCommandString | diff --git a/Iceberg-Tests/IceGitCommitMessageTest.class.st b/Iceberg-Tests/IceGitCommitMessageTest.class.st index a8a39dd12b..6c3fd745be 100644 --- a/Iceberg-Tests/IceGitCommitMessageTest.class.st +++ b/Iceberg-Tests/IceGitCommitMessageTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #IceGitCommitMessageTest, - #superclass : #IceAbstractTestCase, - #category : #'Iceberg-Tests-Git' + #name : 'IceGitCommitMessageTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitCommitMessageTest >> newFixture [ ^ IceBasicRepositoryFixture inGit ] -{ #category : #tests } +{ #category : 'tests' } IceGitCommitMessageTest >> testCommitEmptyString [ self repository commitWithMessage: ''. @@ -17,14 +19,14 @@ IceGitCommitMessageTest >> testCommitEmptyString [ ] -{ #category : #tests } +{ #category : 'tests' } IceGitCommitMessageTest >> testCommitNullString [ self should: [self repository commitWithMessage: nil] raise: Error. ] -{ #category : #tests } +{ #category : 'tests' } IceGitCommitMessageTest >> testCommitWideString [ | msg | msg := ZnUTF8Encoder new decodeBytes: (ByteArray readHexFrom: 'e38182e38184e38186'). "Japanese vowels a,i, and u - 'あいう'" @@ -33,7 +35,7 @@ IceGitCommitMessageTest >> testCommitWideString [ ] -{ #category : #tests } +{ #category : 'tests' } IceGitCommitMessageTest >> testCommitWithEndingPesosSign [ "We used to have a problem that in some messages (depending of padding) the $ was added at the end" | msg | @@ -43,7 +45,7 @@ IceGitCommitMessageTest >> testCommitWithEndingPesosSign [ ] -{ #category : #tests } +{ #category : 'tests' } IceGitCommitMessageTest >> testCommitWithoutPesosSign [ "We used to have a problem that in some messages (depending of padding) the $ was added at the end" | msg | @@ -53,7 +55,7 @@ IceGitCommitMessageTest >> testCommitWithoutPesosSign [ ] -{ #category : #tests } +{ #category : 'tests' } IceGitCommitMessageTest >> testDifferentSizes [ "We used to have a problem that in some messages (depending of padding) the $ was added at the end" | msg | diff --git a/Iceberg-Tests/IceGitDetachedWorkingCopyTest.class.st b/Iceberg-Tests/IceGitDetachedWorkingCopyTest.class.st index 1a5b386afc..e51f533659 100644 --- a/Iceberg-Tests/IceGitDetachedWorkingCopyTest.class.st +++ b/Iceberg-Tests/IceGitDetachedWorkingCopyTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceGitDetachedWorkingCopyTest, - #superclass : #IceDetachedWorkingCopyTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceGitDetachedWorkingCopyTest', + #superclass : 'IceDetachedWorkingCopyTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitDetachedWorkingCopyTest >> newFixture [ ^ IceDetachedWorkingCopyFixture inGit diff --git a/Iceberg-Tests/IceGitDirtyDetachedWorkingCopyTest.class.st b/Iceberg-Tests/IceGitDirtyDetachedWorkingCopyTest.class.st index 70346261fa..bf2e677114 100644 --- a/Iceberg-Tests/IceGitDirtyDetachedWorkingCopyTest.class.st +++ b/Iceberg-Tests/IceGitDirtyDetachedWorkingCopyTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceGitDirtyDetachedWorkingCopyTest, - #superclass : #IceDirtyDetachedWorkingCopyTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceGitDirtyDetachedWorkingCopyTest', + #superclass : 'IceDirtyDetachedWorkingCopyTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitDirtyDetachedWorkingCopyTest >> newFixture [ ^ IceDirtyDetachedWorkingCopyFixture inGit diff --git a/Iceberg-Tests/IceGitFileFormatTest.class.st b/Iceberg-Tests/IceGitFileFormatTest.class.st index 311c313664..2a54e25fd6 100644 --- a/Iceberg-Tests/IceGitFileFormatTest.class.st +++ b/Iceberg-Tests/IceGitFileFormatTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #IceGitFileFormatTest, - #superclass : #IceAbstractTestCase, - #category : 'Iceberg-Tests-Git' + #name : 'IceGitFileFormatTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitFileFormatTest >> newFixture [ ^ IceMultiplePackageFixture inGit ] -{ #category : #tests } +{ #category : 'tests' } IceGitFileFormatTest >> testRepositoryInFileTreeDoesNotSeeFilesCalledAsPackages [ | fileRef | @@ -28,7 +30,7 @@ IceGitFileFormatTest >> testRepositoryInFileTreeDoesNotSeeFilesCalledAsPackages self assertCollection: (self repository workingCopy packages collect: #name) hasSameElements: { #FileTreePackage } ] -{ #category : #tests } +{ #category : 'tests' } IceGitFileFormatTest >> testRepositoryInFileTreeDoesNotSeeTonelPackages [ self repository project fileFormat: IceLibgitFiletreeWriter. @@ -39,7 +41,7 @@ IceGitFileFormatTest >> testRepositoryInFileTreeDoesNotSeeTonelPackages [ self assertCollection: (self repository workingCopy packages collect: #name) hasSameElements: { #FileTreePackage } ] -{ #category : #tests } +{ #category : 'tests' } IceGitFileFormatTest >> testRepositoryWithFilesInUppercaseAreNotRecognizedAsPackages [ | fileRef | @@ -53,7 +55,7 @@ IceGitFileFormatTest >> testRepositoryWithFilesInUppercaseAreNotRecognizedAsPack self assertCollection: (self repository workingCopy packages collect: #name) hasSameElements: { self packageName1 asSymbol. self packageName2 asSymbol } ] -{ #category : #tests } +{ #category : 'tests' } IceGitFileFormatTest >> testRepositoryWithFiletreePackageNotRecognizedAsPackages [ self repository project fileFormat: IceLibgitFiletreeWriter. diff --git a/Iceberg-Tests/IceGitMergeTest.class.st b/Iceberg-Tests/IceGitMergeTest.class.st index 6ee068d5ba..ae8b7c26b7 100644 --- a/Iceberg-Tests/IceGitMergeTest.class.st +++ b/Iceberg-Tests/IceGitMergeTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #IceGitMergeTest, - #superclass : #IceMergeTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceGitMergeTest', + #superclass : 'IceMergeTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitMergeTest >> newFixture [ ^ IceBasicRepositoryFixture inGit ] -{ #category : #tests } +{ #category : 'tests' } IceGitMergeTest >> testConflictFile [ | fileRef branchMaster branchRemove | @@ -33,7 +35,7 @@ IceGitMergeTest >> testConflictFile [ self should: [ branchRemove merge ] raise: IceMergeResolutionRequest ] -{ #category : #tests } +{ #category : 'tests' } IceGitMergeTest >> testMergeBinaryFileAdditionCreatesFileInWorkingCopy [ | fileRef branchMaster newBranch | @@ -59,7 +61,7 @@ IceGitMergeTest >> testMergeBinaryFileAdditionCreatesFileInWorkingCopy [ self assert: fileRef exists. ] -{ #category : #tests } +{ #category : 'tests' } IceGitMergeTest >> testMergeOfInnessaryMergeCommit [ | c1 c2 c3 c4 i1 fileRef| @@ -135,7 +137,7 @@ IceGitMergeTest >> testMergeOfInnessaryMergeCommit [ ] -{ #category : #tests } +{ #category : 'tests' } IceGitMergeTest >> testMergeTextFileAdditionCreatesFileInWorkingCopy [ | fileRef branchMaster newBranch | @@ -160,7 +162,7 @@ IceGitMergeTest >> testMergeTextFileAdditionCreatesFileInWorkingCopy [ self assert: fileRef exists. ] -{ #category : #tests } +{ #category : 'tests' } IceGitMergeTest >> testMergeWithDirectoryRemovedOnOneBranchButNotOtherCausesConflict [ | fileRef otherFileRef branchMaster branchRemove | @@ -187,7 +189,7 @@ IceGitMergeTest >> testMergeWithDirectoryRemovedOnOneBranchButNotOtherCausesConf self should: [ branchRemove merge ] raise: IceMergeResolutionRequest ] -{ #category : #tests } +{ #category : 'tests' } IceGitMergeTest >> testMergeWithDirectoryRemovedWithFastForward [ | fileRef branchMaster branchRemove | @@ -211,7 +213,7 @@ IceGitMergeTest >> testMergeWithDirectoryRemovedWithFastForward [ self deny: fileRef parent exists ] -{ #category : #tests } +{ #category : 'tests' } IceGitMergeTest >> testMergeWithDirectoryRemovedWithMerge [ | fileRef otherFileRef branchMaster branchRemove | @@ -240,7 +242,7 @@ IceGitMergeTest >> testMergeWithDirectoryRemovedWithMerge [ self deny: fileRef parent exists. ] -{ #category : #tests } +{ #category : 'tests' } IceGitMergeTest >> testMergeWithEmptyIncomingCommitCreatesMergeCommit [ | incomingBranch | @@ -262,7 +264,7 @@ IceGitMergeTest >> testMergeWithEmptyIncomingCommitCreatesMergeCommit [ self assert: self repository workingCopy referenceCommit comment equals: 'Merge ' , incomingBranch commit id ] -{ #category : #tests } +{ #category : 'tests' } IceGitMergeTest >> testMergeWithFileRemovedWithFastForward [ | fileRef branchMaster branchRemove | @@ -285,7 +287,7 @@ IceGitMergeTest >> testMergeWithFileRemovedWithFastForward [ self deny: fileRef exists ] -{ #category : #tests } +{ #category : 'tests' } IceGitMergeTest >> testMergeWithFileRemovedWithMerge [ | fileRef otherFileRef branchMaster branchRemove | @@ -313,7 +315,7 @@ IceGitMergeTest >> testMergeWithFileRemovedWithMerge [ self deny: fileRef exists. ] -{ #category : #tests } +{ #category : 'tests' } IceGitMergeTest >> testMergeWithMissingProjectFile [ | incomingBranch fileRef | @@ -340,7 +342,7 @@ IceGitMergeTest >> testMergeWithMissingProjectFile [ self assert: self repository workingCopy referenceCommit comment equals: 'Merge ' , incomingBranch commit id ] -{ #category : #tests } +{ #category : 'tests' } IceGitMergeTest >> testResolveConflictInFileCreatesCorrectMergeCommit [ | fileRef branchMaster conflictingCommit baseCommit | diff --git a/Iceberg-Tests/IceGitPropertiesFileTest.class.st b/Iceberg-Tests/IceGitPropertiesFileTest.class.st index ba83484cb3..39de743538 100644 --- a/Iceberg-Tests/IceGitPropertiesFileTest.class.st +++ b/Iceberg-Tests/IceGitPropertiesFileTest.class.st @@ -1,15 +1,17 @@ Class { - #name : #IceGitPropertiesFileTest, - #superclass : #IceAbstractTestCase, - #category : 'Iceberg-Tests-Git' + #name : 'IceGitPropertiesFileTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitPropertiesFileTest >> newFixture [ ^ IceBasicRepositoryFixture inGit ] -{ #category : #tests } +{ #category : 'tests' } IceGitPropertiesFileTest >> testCommitSavesPropertiesFile [ self repository properties at: #bla put: #blo. @@ -18,7 +20,7 @@ IceGitPropertiesFileTest >> testCommitSavesPropertiesFile [ self assert: (self repository head properties at: #bla) equals: #blo ] -{ #category : #tests } +{ #category : 'tests' } IceGitPropertiesFileTest >> testPropertiesFileIsStoredInMemory [ | ston | @@ -29,7 +31,7 @@ IceGitPropertiesFileTest >> testPropertiesFileIsStoredInMemory [ self assert: (self repository properties at: #bla) equals: #blo ] -{ #category : #tests } +{ #category : 'tests' } IceGitPropertiesFileTest >> testRecoverPropertiesFromOldCommitEvenIfDiskIsDifferent [ self repository properties at: #bla put: #old. @@ -44,7 +46,7 @@ IceGitPropertiesFileTest >> testRecoverPropertiesFromOldCommitEvenIfDiskIsDiffer self assert: (self repository head properties at: #bla) equals: #old ] -{ #category : #tests } +{ #category : 'tests' } IceGitPropertiesFileTest >> testRecoverPropertiesFromOldCommitEvenIfHeadIsDifferent [ self repository properties at: #bla put: #old. diff --git a/Iceberg-Tests/IceGitRemoteTest.class.st b/Iceberg-Tests/IceGitRemoteTest.class.st index 44dc1891f6..50912e21cb 100644 --- a/Iceberg-Tests/IceGitRemoteTest.class.st +++ b/Iceberg-Tests/IceGitRemoteTest.class.st @@ -1,86 +1,88 @@ Class { - #name : #IceGitRemoteTest, - #superclass : #TestCase, - #category : #'Iceberg-Tests-Core-Remotes' + #name : 'IceGitRemoteTest', + #superclass : 'TestCase', + #category : 'Iceberg-Tests-Core-Remotes', + #package : 'Iceberg-Tests', + #tag : 'Core-Remotes' } -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testCanHandleGithubImplicitScpUrl [ self assert: (IceGitScpRemote canHandleUrl: 'git@github.com:npasserini/iceberg.git') ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testCanHandleGithubSSHUrl [ self assert: (IceGitSshRemote canHandleUrl: 'git://github.com/pharo-vcs/iceberg.git') ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testCanHandleGithubSSHUrlWithExplicitPort [ self assert: (IceGitSshRemote canHandleUrl: 'git://github.com:8372/pharo-vcs/iceberg'). ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testCanHandleGithubScpUrl [ self assert: (IceGitScpRemote canHandleUrl: 'ssh://git@github.com/npasserini/iceberg.git'). ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testCanHandleNonGithubImplicitScpUrl [ self assert: (IceGitScpRemote canHandleUrl: 'git@git.fremont.lamrc.net:diffuse/300/rdebug.git') ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testCanHandleNonGithubSSHUrl [ self assert: (IceGitSshRemote canHandleUrl: 'git://git.fremont.lamrc.net/diffuse/300/rdebug.git'). ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testCanHandleNonGithubScpUrl [ self assert: (IceGitScpRemote canHandleUrl: 'ssh://git@git.fremont.lamrc.net/diffuse/300/rdebug.git'). ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testGithubImplicitScpUrlExtractsFullUrlPath [ | url | url := IceGitScpRemote new url: 'git@github.com:pharo-vcs/iceberg.git'. self assert: url projectPath equals: 'pharo-vcs/iceberg' ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testGithubImplicitScpUrlExtractsOwner [ | url | url := IceGitScpRemote new url: 'git@github.com:pharo-vcs/iceberg.git'. self assert: url owner equals: 'pharo-vcs'. ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testGithubImplicitScpUrlExtractsPath [ | url | url := IceGitScpRemote new url: 'git@github.com:pharo-vcs/iceberg.git'. self assert: url path equals: #( ) ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testGithubImplicitScpUrlExtractsProjectName [ | url | url := IceGitScpRemote new url: 'git@github.com:pharo-vcs/iceberg.git'. self assert: url projectName equals: 'iceberg' ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testGithubImplicitScpUrlHasDefaultPort [ | url | url := IceGitScpRemote new url: 'git@github.com:pharo-vcs/iceberg.git'. self assert: url port equals: 22 ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testGithubImplicitScpUrlShouldBeTransformableToHttps [ | remote | @@ -88,49 +90,49 @@ IceGitRemoteTest >> testGithubImplicitScpUrlShouldBeTransformableToHttps [ self assert: remote httpsUrl equals: 'https://github.com/npasserini/iceberg.git' ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testGithubSSHUrlExtractsFullUrlPath [ | url | url := IceGitSshRemote new url: 'git://github.com/pharo-vcs/iceberg.git'. self assert: url projectPath equals: 'pharo-vcs/iceberg' ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testGithubSSHUrlExtractsOwner [ | url | url := IceGitSshRemote new url: 'git://github.com/pharo-vcs/iceberg.git'. self assert: url owner equals: 'pharo-vcs'. ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testGithubSSHUrlExtractsPath [ | url | url := IceGitSshRemote new url: 'git://github.com/pharo-vcs/iceberg.git'. self assert: url path equals: OrderedCollection new ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testGithubSSHUrlExtractsPort [ | url | url := IceGitSshRemote new url: 'git://github.com:8372/pharo-vcs/iceberg.git'. self assert: url port equals: 8372 ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testGithubSSHUrlExtractsProjectName [ | url | url := IceGitSshRemote new url: 'git://github.com/pharo-vcs/iceberg.git'. self assert: url projectName equals: 'iceberg' ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testGithubSSHUrlHasDefaultPort [ | url | url := IceGitSshRemote new url: 'git://github.com/pharo-vcs/iceberg.git'. self assert: url port equals: 9418 ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testGithubSSHUrlShouldBeTransformableToHttps [ | url | @@ -138,42 +140,42 @@ IceGitRemoteTest >> testGithubSSHUrlShouldBeTransformableToHttps [ self assert: url httpsUrl equals: 'https://github.com/pharo-vcs/iceberg.git' ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testGithubScpUrlExtractsFullUrlPath [ | url | url := IceGitScpRemote new url: 'ssh://git@github.com/pharo-vcs/iceberg.git'. self assert: url projectPath equals: 'pharo-vcs/iceberg' ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testGithubScpUrlExtractsOwner [ | url | url := IceGitScpRemote new url: 'ssh://git@github.com/pharo-vcs/iceberg.git'. self assert: url owner equals: 'pharo-vcs'. ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testGithubScpUrlExtractsPath [ | url | url := IceGitScpRemote new url: 'ssh://git@github.com/pharo-vcs/iceberg.git'. self assert: url path asArray equals: #( ) ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testGithubScpUrlExtractsProjectName [ | url | url := IceGitScpRemote new url: 'ssh://git@github.com/pharo-vcs/iceberg.git'. self assert: url projectName equals: 'iceberg' ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testGithubScpUrlHasDefaultPort [ | url | url := IceGitScpRemote new url: 'ssh://git@github.com/pharo-vcs/iceberg.git'. self assert: url port equals: 22 ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testGithubScpUrlShouldBeTransformableToHttps [ | remote | @@ -181,7 +183,7 @@ IceGitRemoteTest >> testGithubScpUrlShouldBeTransformableToHttps [ self assert: remote httpsUrl equals: 'https://github.com/npasserini/iceberg.git' ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testHTTPSRemoteEqualsLocationThanSCPRemote [ | sshremote scpremote | sshremote := IceGitHttpsRemote new url: 'https://github.com/pharo-vcs/iceberg.git'. @@ -189,7 +191,7 @@ IceGitRemoteTest >> testHTTPSRemoteEqualsLocationThanSCPRemote [ self assert: (sshremote referencesSameRemoteLocationAs: scpremote). ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testHTTPSRemoteNotEqualsLocationThanSCPRemote [ | sshremote scpremote | sshremote := IceGitHttpsRemote new url: 'https://github.com/pharo-vcs/iceberg.git'. @@ -197,42 +199,42 @@ IceGitRemoteTest >> testHTTPSRemoteNotEqualsLocationThanSCPRemote [ self deny: (sshremote referencesSameRemoteLocationAs: scpremote). ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testNonGithubImplicitScpUrlExtractsFullUrlPath [ | url | url := IceGitScpRemote new url: 'git@git.fremont.lamrc.net:diffuse/300/rdebug.git'. self assert: url projectPath equals: 'diffuse/300/rdebug' ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testNonGithubImplicitScpUrlExtractsOwner [ | url | url := IceGitScpRemote new url: 'git@git.fremont.lamrc.net:diffuse/300/rdebug.git'. self assert: url owner equals: '300'. ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testNonGithubImplicitScpUrlExtractsPath [ | url | url := IceGitScpRemote new url: 'git@git.fremont.lamrc.net:diffuse/300/rdebug.git'. self assert: url path equals: #( diffuse ) ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testNonGithubImplicitScpUrlExtractsProjectName [ | url | url := IceGitScpRemote new url: 'git@git.fremont.lamrc.net:diffuse/300/rdebug.git'. self assert: url projectName equals: 'rdebug' ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testNonGithubImplicitScpUrlHasDefaultPort [ | url | url := IceGitScpRemote new url: 'git@git.fremont.lamrc.net:diffuse/300/rdebug.git'. self assert: url port equals: 22 ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testNonGithubImplicitScpUrlShouldBeTransformableToHttps [ | url | @@ -240,42 +242,42 @@ IceGitRemoteTest >> testNonGithubImplicitScpUrlShouldBeTransformableToHttps [ self assert: url httpsUrl equals: 'https://git.fremont.lamrc.net/diffuse/300/rdebug.git' ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testNonGithubSSHUrlExtractsFullUrlPath [ | url | url := IceGitSshRemote new url: 'git://git.fremont.lamrc.net/diffuse/300/rdebug.git'. self assert: url projectPath equals: 'diffuse/300/rdebug' ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testNonGithubSSHUrlExtractsOwner [ | url | url := IceGitSshRemote new url: 'git://git.fremont.lamrc.net/diffuse/300/rdebug.git'. self assert: url owner equals: '300'. ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testNonGithubSSHUrlExtractsPath [ | url | url := IceGitSshRemote new url: 'git://git.fremont.lamrc.net/diffuse/300/rdebug.git'. self assert: url path asArray equals: #( diffuse ) ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testNonGithubSSHUrlExtractsPort [ | url | url := IceGitSshRemote new url: 'git://git.fremont.lamrc.net:8372/diffuse/300/rdebug.git'. self assert: url port equals: 8372 ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testNonGithubSSHUrlHasDefaultPort [ | url | url := IceGitSshRemote new url: 'git://git.fremont.lamrc.net/diffuse/300/rdebug.git'. self assert: url port equals: 9418 ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testNonGithubSSHUrlShouldBeTransformableToHttps [ | url | @@ -283,42 +285,42 @@ IceGitRemoteTest >> testNonGithubSSHUrlShouldBeTransformableToHttps [ self assert: url httpsUrl equals: 'https://git.fremont.lamrc.net/diffuse/300/rdebug.git' ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testNonGithubScpUrlExtractsFullUrlPath [ | url | url := IceGitScpRemote new url: 'ssh://git.fremont.lamrc.net/diffuse/300/rdebug.git'. self assert: url projectPath equals: 'diffuse/300/rdebug' ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testNonGithubScpUrlExtractsOwner [ | url | url := IceGitScpRemote new url: 'ssh://git.fremont.lamrc.net/diffuse/300/rdebug.git'. self assert: url owner equals: '300'. ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testNonGithubScpUrlExtractsPath [ | url | url := IceGitScpRemote new url: 'ssh://git.fremont.lamrc.net/diffuse/300/rdebug.git'. self assert: url path asArray equals: #( diffuse ) ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testNonGithubScpUrlExtractsProjectName [ | url | url := IceGitScpRemote new url: 'ssh://git.fremont.lamrc.net/diffuse/300/rdebug.git'. self assert: url projectName equals: 'rdebug' ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testNonGithubScpUrlHasDefaultPort [ | url | url := IceGitScpRemote new url: 'ssh://git.fremont.lamrc.net/diffuse/300/rdebug.git'. self assert: url port equals: 22 ] -{ #category : #'tests-scp' } +{ #category : 'tests-scp' } IceGitRemoteTest >> testNonGithubScpUrlShouldBeTransformableToHttps [ | url | @@ -326,7 +328,7 @@ IceGitRemoteTest >> testNonGithubScpUrlShouldBeTransformableToHttps [ self assert: url httpsUrl equals: 'https://git.fremont.lamrc.net/diffuse/300/rdebug.git' ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testSSHRemoteEqualsLocationThanSCPRemote [ | sshremote scpremote | sshremote := IceGitSshRemote new url: 'git://github.com/pharo-vcs/iceberg.git'. @@ -334,7 +336,7 @@ IceGitRemoteTest >> testSSHRemoteEqualsLocationThanSCPRemote [ self assert: (sshremote referencesSameRemoteLocationAs: scpremote). ] -{ #category : #'tests-ssh' } +{ #category : 'tests-ssh' } IceGitRemoteTest >> testSSHRemoteNotEqualsLocationThanSCPRemote [ | sshremote scpremote | sshremote := IceGitSshRemote new url: 'git://github.com/pharo-vcs/iceberg.git'. diff --git a/Iceberg-Tests/IceGitRepositoryWithSingleRemoteAndBranchWithSlashesTest.class.st b/Iceberg-Tests/IceGitRepositoryWithSingleRemoteAndBranchWithSlashesTest.class.st index ec4245a695..87422e91ab 100644 --- a/Iceberg-Tests/IceGitRepositoryWithSingleRemoteAndBranchWithSlashesTest.class.st +++ b/Iceberg-Tests/IceGitRepositoryWithSingleRemoteAndBranchWithSlashesTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceGitRepositoryWithSingleRemoteAndBranchWithSlashesTest, - #superclass : #IceGitRepositoryWithSingleRemoteTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceGitRepositoryWithSingleRemoteAndBranchWithSlashesTest', + #superclass : 'IceGitRepositoryWithSingleRemoteTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitRepositoryWithSingleRemoteAndBranchWithSlashesTest >> newFixture [ ^ IceWithRemoteFixture inGit remoteBranchName: 'feature/master' diff --git a/Iceberg-Tests/IceGitRepositoryWithSingleRemoteAndMergeConflictTest.class.st b/Iceberg-Tests/IceGitRepositoryWithSingleRemoteAndMergeConflictTest.class.st index 5a23100940..49e55c7c5e 100644 --- a/Iceberg-Tests/IceGitRepositoryWithSingleRemoteAndMergeConflictTest.class.st +++ b/Iceberg-Tests/IceGitRepositoryWithSingleRemoteAndMergeConflictTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceGitRepositoryWithSingleRemoteAndMergeConflictTest, - #superclass : #IceRepositoryWithSingleRemoteAndMergeConflictTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceGitRepositoryWithSingleRemoteAndMergeConflictTest', + #superclass : 'IceRepositoryWithSingleRemoteAndMergeConflictTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitRepositoryWithSingleRemoteAndMergeConflictTest >> newFixture [ ^ IceWithRemoteAndMergeConflictFixture inGit ] diff --git a/Iceberg-Tests/IceGitRepositoryWithSingleRemoteTest.class.st b/Iceberg-Tests/IceGitRepositoryWithSingleRemoteTest.class.st index 4d81d5d0b4..6d122a2c2d 100644 --- a/Iceberg-Tests/IceGitRepositoryWithSingleRemoteTest.class.st +++ b/Iceberg-Tests/IceGitRepositoryWithSingleRemoteTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #IceGitRepositoryWithSingleRemoteTest, - #superclass : #IceRepositoryWithSingleRemoteTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceGitRepositoryWithSingleRemoteTest', + #superclass : 'IceRepositoryWithSingleRemoteTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitRepositoryWithSingleRemoteTest >> newFixture [ ^ IceWithRemoteFixture inGit remoteBranchName: 'newBranch' ] -{ #category : #running } +{ #category : 'running' } IceGitRepositoryWithSingleRemoteTest >> testPushPushesTags [ "We can only push if the repository is bare" diff --git a/Iceberg-Tests/IceGitTestFactory.class.st b/Iceberg-Tests/IceGitTestFactory.class.st index bee23a4f7d..d7af8c424d 100644 --- a/Iceberg-Tests/IceGitTestFactory.class.st +++ b/Iceberg-Tests/IceGitTestFactory.class.st @@ -1,22 +1,24 @@ Class { - #name : #IceGitTestFactory, - #superclass : #IceAbstractTestFactory, - #category : #'Iceberg-Tests-Git' + #name : 'IceGitTestFactory', + #superclass : 'IceAbstractTestFactory', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #initialization } +{ #category : 'initialization' } IceGitTestFactory class >> setUp [ ^ self new setUp ] -{ #category : #initialization } +{ #category : 'initialization' } IceGitTestFactory >> defaultRemoteUrl [ ^ self remoteFileUrl asString ] -{ #category : #initialization } +{ #category : 'initialization' } IceGitTestFactory >> ensureRemoteRepository [ | remoteRepository | remoteRepository := self remoteFileUrl asFileReference exists @@ -31,19 +33,19 @@ IceGitTestFactory >> ensureRemoteRepository [ ^ remoteRepository ] -{ #category : #testing } +{ #category : 'testing' } IceGitTestFactory >> isGit [ ^ true ] -{ #category : #initialization } +{ #category : 'initialization' } IceGitTestFactory >> location [ ^ FileLocator imageDirectory / 'test' ] -{ #category : #initialization } +{ #category : 'initialization' } IceGitTestFactory >> newBareRepositoryNamed: projectName withSubdirectory: aSubdirectory [ | repository | (self location / projectName) ensureDeleteAll. @@ -69,13 +71,13 @@ IceGitTestFactory >> newBareRepositoryNamed: projectName withSubdirectory: aSubd ^ repository ] -{ #category : #initialization } +{ #category : 'initialization' } IceGitTestFactory >> newRemoteNamed: aName toRepository: aRepository [ ^ IceGitRemote name: aName url: aRepository location resolve asUrl asString ] -{ #category : #initialization } +{ #category : 'initialization' } IceGitTestFactory >> newRepositoryNamed: projectName withSubdirectory: aSubdirectory [ | repository | (self location / projectName) ensureDeleteAll. @@ -96,13 +98,13 @@ IceGitTestFactory >> newRepositoryNamed: projectName withSubdirectory: aSubdirec ^ repository ] -{ #category : #initialization } +{ #category : 'initialization' } IceGitTestFactory >> remoteFileUrl [ ^ (IceLibgitRepository repositoriesLocation / 'remote') resolve asUrl. ] -{ #category : #initialization } +{ #category : 'initialization' } IceGitTestFactory >> tearDownWithRepository: aRepository [ aRepository ifNotNil: [ diff --git a/Iceberg-Tests/IceGitUnbornProjectTest.class.st b/Iceberg-Tests/IceGitUnbornProjectTest.class.st index c74eb78c7c..a67a9ed8c5 100644 --- a/Iceberg-Tests/IceGitUnbornProjectTest.class.st +++ b/Iceberg-Tests/IceGitUnbornProjectTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #IceGitUnbornProjectTest, - #superclass : #IceAbstractTestCase, - #category : 'Iceberg-Tests-Git' + #name : 'IceGitUnbornProjectTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitUnbornProjectTest >> newFixture [ ^ IceUnbornProjectFixture inGit ] -{ #category : #tests } +{ #category : 'tests' } IceGitUnbornProjectTest >> testCommitNewProjectCreatesProjectFile [ self repository workingCopy project: (IceBasicProject onRepository: self repository withSourceDirectory: fixture subdirectory). @@ -18,7 +20,7 @@ IceGitUnbornProjectTest >> testCommitNewProjectCreatesProjectFile [ self assert: (self repository headCommit fileSystem / '.project') exists ] -{ #category : #tests } +{ #category : 'tests' } IceGitUnbornProjectTest >> testCommitNewProjectFindsPropertiesFile [ self repository workingCopy project: (IceBasicProject onRepository: self repository withSourceDirectory: fixture subdirectory). @@ -27,7 +29,7 @@ IceGitUnbornProjectTest >> testCommitNewProjectFindsPropertiesFile [ self assert: (self repository headCommit fileSystem resolve: self repository properties propertiesFilePath) exists ] -{ #category : #tests } +{ #category : 'tests' } IceGitUnbornProjectTest >> testDiffContainsNewProject [ | diff | @@ -37,7 +39,7 @@ IceGitUnbornProjectTest >> testDiffContainsNewProject [ self assert: (diff tree / '.project') value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceGitUnbornProjectTest >> testInvalidProjectReturnsSameSourceDirectoryThanCurrentProject [ "Create a new commit" @@ -50,7 +52,7 @@ IceGitUnbornProjectTest >> testInvalidProjectReturnsSameSourceDirectoryThanCurre self assert: self repository headCommit parent project isInvalid ] -{ #category : #tests } +{ #category : 'tests' } IceGitUnbornProjectTest >> testProjectCurrentCommitAfterChangeIsUnborn [ "Create a new commit" @@ -64,13 +66,13 @@ IceGitUnbornProjectTest >> testProjectCurrentCommitAfterChangeIsUnborn [ self assert: self repository headCommit project isInvalid. ] -{ #category : #tests } +{ #category : 'tests' } IceGitUnbornProjectTest >> testProjectIsUnborn [ self assert: self repository project isUnborn ] -{ #category : #tests } +{ #category : 'tests' } IceGitUnbornProjectTest >> testProjectOlderCommitIsInvalid [ "Create a new commit" @@ -84,7 +86,7 @@ IceGitUnbornProjectTest >> testProjectOlderCommitIsInvalid [ self assert: self repository headCommit parent project sourceDirectory equals: 'test' ] -{ #category : #tests } +{ #category : 'tests' } IceGitUnbornProjectTest >> testPropertiesFileIsNotEmpty [ | props | @@ -95,7 +97,7 @@ IceGitUnbornProjectTest >> testPropertiesFileIsNotEmpty [ ] -{ #category : #tests } +{ #category : 'tests' } IceGitUnbornProjectTest >> testRepositoryHasNoProjectFile [ self deny: (self repository location / '.project') exists diff --git a/Iceberg-Tests/IceGitUnknownCommitRepositoryTest.class.st b/Iceberg-Tests/IceGitUnknownCommitRepositoryTest.class.st index 8de925c226..98089cff91 100644 --- a/Iceberg-Tests/IceGitUnknownCommitRepositoryTest.class.st +++ b/Iceberg-Tests/IceGitUnknownCommitRepositoryTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceGitUnknownCommitRepositoryTest, - #superclass : #IceUnknownCommitRepositoryTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceGitUnknownCommitRepositoryTest', + #superclass : 'IceUnknownCommitRepositoryTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitUnknownCommitRepositoryTest >> newFixture [ ^ IceWithRemoteAndUnknownCommitFixture inGit diff --git a/Iceberg-Tests/IceGitWithoutUserNameTest.class.st b/Iceberg-Tests/IceGitWithoutUserNameTest.class.st index 2edd92ae5e..ad23f9bed6 100644 --- a/Iceberg-Tests/IceGitWithoutUserNameTest.class.st +++ b/Iceberg-Tests/IceGitWithoutUserNameTest.class.st @@ -1,19 +1,21 @@ Class { - #name : #IceGitWithoutUserNameTest, - #superclass : #IceAbstractTestCase, + #name : 'IceGitWithoutUserNameTest', + #superclass : 'IceAbstractTestCase', #instVars : [ 'username', 'email' ], - #category : #'Iceberg-Tests-Git' + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceGitWithoutUserNameTest >> newFixture [ ^ IceBasicRepositoryFixture inGit ] -{ #category : #running } +{ #category : 'running' } IceGitWithoutUserNameTest >> setUp [ | global | @@ -30,7 +32,7 @@ IceGitWithoutUserNameTest >> setUp [ email: 'mock mail'. ] -{ #category : #running } +{ #category : 'running' } IceGitWithoutUserNameTest >> tearDown [ | global | @@ -42,7 +44,7 @@ IceGitWithoutUserNameTest >> tearDown [ ] -{ #category : #tests } +{ #category : 'tests' } IceGitWithoutUserNameTest >> testCommitWithEmptyUserMailThrowsException [ (self repository getConfigurationGlobal: false) @@ -54,7 +56,7 @@ IceGitWithoutUserNameTest >> testCommitWithEmptyUserMailThrowsException [ raise: IceGitUsernameOrEmailNotFound ] -{ #category : #tests } +{ #category : 'tests' } IceGitWithoutUserNameTest >> testCommitWithEmptyUserNameThrowsException [ (self repository getConfigurationGlobal: false) @@ -66,7 +68,7 @@ IceGitWithoutUserNameTest >> testCommitWithEmptyUserNameThrowsException [ raise: IceGitUsernameOrEmailNotFound ] -{ #category : #tests } +{ #category : 'tests' } IceGitWithoutUserNameTest >> testCommitWithoutUserMailThrowsException [ (self repository getConfigurationGlobal: false) @@ -78,7 +80,7 @@ IceGitWithoutUserNameTest >> testCommitWithoutUserMailThrowsException [ raise: IceGitUsernameOrEmailNotFound ] -{ #category : #tests } +{ #category : 'tests' } IceGitWithoutUserNameTest >> testCommitWithoutUserNameThrowsException [ (self repository getConfigurationGlobal: false) @@ -90,7 +92,7 @@ IceGitWithoutUserNameTest >> testCommitWithoutUserNameThrowsException [ raise: IceGitUsernameOrEmailNotFound ] -{ #category : #tests } +{ #category : 'tests' } IceGitWithoutUserNameTest >> testFixEmptyUserMailAndResumeDoesCommit [ | before after | (self repository getConfigurationGlobal: false) email: ''. @@ -107,7 +109,7 @@ IceGitWithoutUserNameTest >> testFixEmptyUserMailAndResumeDoesCommit [ self fail ] -{ #category : #tests } +{ #category : 'tests' } IceGitWithoutUserNameTest >> testFixEmptyUserNameAndResumeDoesCommit [ | before after | (self repository getConfigurationGlobal: false) username: ''. @@ -124,7 +126,7 @@ IceGitWithoutUserNameTest >> testFixEmptyUserNameAndResumeDoesCommit [ self fail ] -{ #category : #tests } +{ #category : 'tests' } IceGitWithoutUserNameTest >> testFixUnsetUserMailAndResumeDoesCommit [ | before after | (self repository getConfigurationGlobal: false) unset: 'user.email'. @@ -141,7 +143,7 @@ IceGitWithoutUserNameTest >> testFixUnsetUserMailAndResumeDoesCommit [ self fail ] -{ #category : #tests } +{ #category : 'tests' } IceGitWithoutUserNameTest >> testFixUnsetUserNameAndResumeDoesCommit [ | before after | (self repository getConfigurationGlobal: false) unset: 'user.name'. @@ -158,7 +160,7 @@ IceGitWithoutUserNameTest >> testFixUnsetUserNameAndResumeDoesCommit [ self fail ] -{ #category : #tests } +{ #category : 'tests' } IceGitWithoutUserNameTest >> testUtf8Username [ | after utf8Username | utf8Username := 'Yn-aë éé'. diff --git a/Iceberg-Tests/IceHttpRemoteTest.class.st b/Iceberg-Tests/IceHttpRemoteTest.class.st index d2a351e756..9efcce63e0 100644 --- a/Iceberg-Tests/IceHttpRemoteTest.class.st +++ b/Iceberg-Tests/IceHttpRemoteTest.class.st @@ -2,26 +2,28 @@ Tests for IceHTTPRemote " Class { - #name : #IceHttpRemoteTest, - #superclass : #TestCase, - #category : 'Iceberg-Tests-Core-Remotes' + #name : 'IceHttpRemoteTest', + #superclass : 'TestCase', + #category : 'Iceberg-Tests-Core-Remotes', + #package : 'Iceberg-Tests', + #tag : 'Core-Remotes' } -{ #category : #'private - defaults' } +{ #category : 'private - defaults' } IceHttpRemoteTest >> defaultTestClass [ "Return the default test class" ^IceGitHttpRemote ] -{ #category : #'private - defaults' } +{ #category : 'private - defaults' } IceHttpRemoteTest >> protocolID [ "Return the protocol identifier" ^self defaultTestClass protocolID ] -{ #category : #'private - utilities' } +{ #category : 'private - utilities' } IceHttpRemoteTest >> protocolURLFor: aString [ ^IceGitRemote url: self protocolID, '://', aString @@ -29,7 +31,7 @@ IceHttpRemoteTest >> protocolURLFor: aString [ ] -{ #category : #'tests - providers' } +{ #category : 'tests - providers' } IceHttpRemoteTest >> testBitBucketURL [ |remote| remote := self protocolURLFor: 'bitbucket.org/owner/repo.git'. @@ -40,13 +42,13 @@ IceHttpRemoteTest >> testBitBucketURL [ assert: remote projectName equals: 'repo' ] -{ #category : #tests } +{ #category : 'tests' } IceHttpRemoteTest >> testCanHandleProtocol [ self assert: (self defaultTestClass canHandleUrl: self protocolID ,'://') ] -{ #category : #tests } +{ #category : 'tests' } IceHttpRemoteTest >> testFullURL [ | remote | remote := self protocolURLFor: 'user@hostname.com:1234/subpath1/subpath2/owner/repo.git'. @@ -57,7 +59,7 @@ IceHttpRemoteTest >> testFullURL [ assert: remote projectName equals: 'repo' ] -{ #category : #'tests - providers' } +{ #category : 'tests - providers' } IceHttpRemoteTest >> testGitHubURL [ |remote| remote := self protocolURLFor: 'github.com/owner/repo.git'. @@ -68,7 +70,7 @@ IceHttpRemoteTest >> testGitHubURL [ assert: remote projectName equals: 'repo' ] -{ #category : #tests } +{ #category : 'tests' } IceHttpRemoteTest >> testLocalhostRepo [ |remote| remote := self protocolURLFor: 'hostname/owner/repo.git'. @@ -79,7 +81,7 @@ IceHttpRemoteTest >> testLocalhostRepo [ assert: remote projectName equals: 'repo' ] -{ #category : #tests } +{ #category : 'tests' } IceHttpRemoteTest >> testURLWithDeepPath [ |remote| remote := self protocolURLFor: 'hostname:8080/sub1/sub2/sub3/owner/repo.git'. @@ -90,7 +92,7 @@ IceHttpRemoteTest >> testURLWithDeepPath [ assert: remote path third equals: 'sub3' ] -{ #category : #tests } +{ #category : 'tests' } IceHttpRemoteTest >> testURLWithEmpty [ |remote| remote := self protocolURLFor: 'hostname:8080/owner/repo.git'. @@ -98,7 +100,7 @@ IceHttpRemoteTest >> testURLWithEmpty [ assert: remote path isEmpty ] -{ #category : #tests } +{ #category : 'tests' } IceHttpRemoteTest >> testURLWithSinglePath [ |remote| remote := self protocolURLFor: 'hostname:8080/path/owner/repo.git'. diff --git a/Iceberg-Tests/IceHttpsRemoteTest.class.st b/Iceberg-Tests/IceHttpsRemoteTest.class.st index c11442365b..66947c7ea8 100644 --- a/Iceberg-Tests/IceHttpsRemoteTest.class.st +++ b/Iceberg-Tests/IceHttpsRemoteTest.class.st @@ -2,19 +2,21 @@ Test for IceHttpsRemoteTest " Class { - #name : #IceHttpsRemoteTest, - #superclass : #IceHttpRemoteTest, - #category : 'Iceberg-Tests-Core-Remotes' + #name : 'IceHttpsRemoteTest', + #superclass : 'IceHttpRemoteTest', + #category : 'Iceberg-Tests-Core-Remotes', + #package : 'Iceberg-Tests', + #tag : 'Core-Remotes' } -{ #category : #'private - defaults' } +{ #category : 'private - defaults' } IceHttpsRemoteTest >> defaultTestClass [ "Return the default test class" ^IceGitHttpsRemote ] -{ #category : #tests } +{ #category : 'tests' } IceHttpsRemoteTest >> testSameRemoteReference [ | r1 r2 | @@ -23,7 +25,7 @@ IceHttpsRemoteTest >> testSameRemoteReference [ self assert: (r1 referencesSameRemoteLocationAs: r2) ] -{ #category : #tests } +{ #category : 'tests' } IceHttpsRemoteTest >> testSameRemoteReferenceWithoutGitExtension [ | r1 r2 | diff --git a/Iceberg-Tests/IceInMemoryCleanWorkingCopyTest.class.st b/Iceberg-Tests/IceInMemoryCleanWorkingCopyTest.class.st index 7544b33816..13ff6fe38d 100644 --- a/Iceberg-Tests/IceInMemoryCleanWorkingCopyTest.class.st +++ b/Iceberg-Tests/IceInMemoryCleanWorkingCopyTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceInMemoryCleanWorkingCopyTest, - #superclass : #IceCleanWorkingCopyTest, - #category : 'Iceberg-Tests-Memory' + #name : 'IceInMemoryCleanWorkingCopyTest', + #superclass : 'IceCleanWorkingCopyTest', + #category : 'Iceberg-Tests-Memory', + #package : 'Iceberg-Tests', + #tag : 'Memory' } -{ #category : #running } +{ #category : 'running' } IceInMemoryCleanWorkingCopyTest >> newFixture [ ^ IceCleanWorkingCopyFixture inMemory ] diff --git a/Iceberg-Tests/IceInMemoryTestFactory.class.st b/Iceberg-Tests/IceInMemoryTestFactory.class.st index 2638cdabba..9491041f1b 100644 --- a/Iceberg-Tests/IceInMemoryTestFactory.class.st +++ b/Iceberg-Tests/IceInMemoryTestFactory.class.st @@ -1,28 +1,30 @@ Class { - #name : #IceInMemoryTestFactory, - #superclass : #IceAbstractTestFactory, - #category : 'Iceberg-Tests-Memory' + #name : 'IceInMemoryTestFactory', + #superclass : 'IceAbstractTestFactory', + #category : 'Iceberg-Tests-Memory', + #package : 'Iceberg-Tests', + #tag : 'Memory' } -{ #category : #initialization } +{ #category : 'initialization' } IceInMemoryTestFactory class >> setUp [ ^ self new setUp ] -{ #category : #accessing } +{ #category : 'accessing' } IceInMemoryTestFactory >> ensureRemoteRepository [ ^ self newRepositoryNamed: 'remoteRepo' ] -{ #category : #testing } +{ #category : 'testing' } IceInMemoryTestFactory >> isGit [ ^ false ] -{ #category : #initialization } +{ #category : 'initialization' } IceInMemoryTestFactory >> newRemoteNamed: aName toRepository: remoteRepository [ ^ IceMemoryRemote @@ -31,7 +33,7 @@ IceInMemoryTestFactory >> newRemoteNamed: aName toRepository: remoteRepository [ branchRepository: MCDictionaryRepository new ] -{ #category : #initialization } +{ #category : 'initialization' } IceInMemoryTestFactory >> newRepositoryNamed: projectName withSubdirectory: aSubdirectory [ "Ignore the subdirectory in memory" | repository | @@ -40,7 +42,7 @@ IceInMemoryTestFactory >> newRepositoryNamed: projectName withSubdirectory: aSub ^ repository ] -{ #category : #initialization } +{ #category : 'initialization' } IceInMemoryTestFactory >> tearDownWithRepository: aRepository [ "Nothing" diff --git a/Iceberg-Tests/IceInitialPropertiesFileTestCase.class.st b/Iceberg-Tests/IceInitialPropertiesFileTestCase.class.st index 77e4799f58..dc6cb632f8 100644 --- a/Iceberg-Tests/IceInitialPropertiesFileTestCase.class.st +++ b/Iceberg-Tests/IceInitialPropertiesFileTestCase.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceInitialPropertiesFileTestCase, - #superclass : #IceParameterizedTestCase, - #category : 'Iceberg-Tests-Formats' + #name : 'IceInitialPropertiesFileTestCase', + #superclass : 'IceParameterizedTestCase', + #category : 'Iceberg-Tests-Formats', + #package : 'Iceberg-Tests', + #tag : 'Formats' } -{ #category : #running } +{ #category : 'running' } IceInitialPropertiesFileTestCase >> testNewRepositoryHasPropertiesFileWithFileTreeInIndex [ | format | format := IceLibgitRepository defaultFileFormatType. @@ -19,7 +21,7 @@ IceInitialPropertiesFileTestCase >> testNewRepositoryHasPropertiesFileWithFileTr ensure: [ IceLibgitRepository defaultFileFormatType: format ] ] -{ #category : #running } +{ #category : 'running' } IceInitialPropertiesFileTestCase >> testNewRepositoryHasPropertiesFileWithTonelInIndex [ | format | format := IceLibgitRepository defaultFileFormatType. diff --git a/Iceberg-Tests/IceLibGitIndexTestCase.class.st b/Iceberg-Tests/IceLibGitIndexTestCase.class.st index 772004e5b9..2699e8aae5 100644 --- a/Iceberg-Tests/IceLibGitIndexTestCase.class.st +++ b/Iceberg-Tests/IceLibGitIndexTestCase.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceLibGitIndexTestCase, - #superclass : #IceMergeTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceLibGitIndexTestCase', + #superclass : 'IceMergeTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceLibGitIndexTestCase >> assertIndexIsClean [ | diff | @@ -15,12 +17,12 @@ IceLibGitIndexTestCase >> assertIndexIsClean [ self assert: diff numberOfDeltas equals: 0 ] -{ #category : #running } +{ #category : 'running' } IceLibGitIndexTestCase >> newFixture [ ^ IceBasicRepositoryFixture inGit ] -{ #category : #running } +{ #category : 'running' } IceLibGitIndexTestCase >> testGitIndexIsCleanAfterCheckoutBranch [ "If we checkout a branch, git's index should be clean. @@ -48,56 +50,56 @@ IceLibGitIndexTestCase >> testGitIndexIsCleanAfterCheckoutBranch [ self assertIndexIsClean ] -{ #category : #tests } +{ #category : 'tests' } IceLibGitIndexTestCase >> testImageAndHeadBehindMergeCommitShouldMergeInImageAndAdvanceHead [ super testImageAndHeadBehindMergeCommitShouldMergeInImageAndAdvanceHead. self assertIndexIsClean. ] -{ #category : #tests } +{ #category : 'tests' } IceLibGitIndexTestCase >> testImageAndHeadInverseMergeDivergingCommitShouldCreateMergeCommitAdvanceHeadAndImage [ super testImageAndHeadInverseMergeDivergingCommitShouldCreateMergeCommitAdvanceHeadAndImage. self assertIndexIsClean. ] -{ #category : #tests } +{ #category : 'tests' } IceLibGitIndexTestCase >> testImageAndHeadMergeDivergingCommitShouldCreateMergeCommitAdvanceHeadAndImage [ super testImageAndHeadMergeDivergingCommitShouldCreateMergeCommitAdvanceHeadAndImage. self assertIndexIsClean. ] -{ #category : #tests } +{ #category : 'tests' } IceLibGitIndexTestCase >> testImageBehindHeadShouldOnlyMergeInImage [ super testImageBehindHeadShouldOnlyMergeInImage. self assertIndexIsClean. ] -{ #category : #tests } +{ #category : 'tests' } IceLibGitIndexTestCase >> testMergeAheadImageCommitShouldFastForwardHEAD [ super testMergeAheadImageCommitShouldFastForwardHEAD. self assertIndexIsClean. ] -{ #category : #tests } +{ #category : 'tests' } IceLibGitIndexTestCase >> testMergeCommitInHistoryShouldDoNothing [ super testMergeCommitInHistoryShouldDoNothing. self assertIndexIsClean. ] -{ #category : #tests } +{ #category : 'tests' } IceLibGitIndexTestCase >> testMergeImageReferenceCommitInHistoryShouldDoNothing [ super testMergeImageReferenceCommitInHistoryShouldDoNothing. self assertIndexIsClean. ] -{ #category : #tests } +{ #category : 'tests' } IceLibGitIndexTestCase >> testTrimergeShouldRaiseError [ super testTrimergeShouldRaiseError. diff --git a/Iceberg-Tests/IceLocalRepositoryMissingTest.class.st b/Iceberg-Tests/IceLocalRepositoryMissingTest.class.st index 7eac232243..333a810c01 100644 --- a/Iceberg-Tests/IceLocalRepositoryMissingTest.class.st +++ b/Iceberg-Tests/IceLocalRepositoryMissingTest.class.st @@ -1,22 +1,24 @@ Class { - #name : #IceLocalRepositoryMissingTest, - #superclass : #IceAbstractTestCase, - #category : 'Iceberg-Tests-Git' + #name : 'IceLocalRepositoryMissingTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceLocalRepositoryMissingTest >> newFixture [ ^ IceMissingLocalRepositoryFixture inGit ] -{ #category : #running } +{ #category : 'running' } IceLocalRepositoryMissingTest >> testDeleteDoesNothing [ self shouldnt: [ self repository delete ] raise: Error ] -{ #category : #running } +{ #category : 'running' } IceLocalRepositoryMissingTest >> testRepositoryIsMissing [ self assert: self repository isMissing diff --git a/Iceberg-Tests/IceMemoryRepositoryWithSingleRemoteAndMergeConflictTest.class.st b/Iceberg-Tests/IceMemoryRepositoryWithSingleRemoteAndMergeConflictTest.class.st index 6e4a0beb88..f9251a5dfd 100644 --- a/Iceberg-Tests/IceMemoryRepositoryWithSingleRemoteAndMergeConflictTest.class.st +++ b/Iceberg-Tests/IceMemoryRepositoryWithSingleRemoteAndMergeConflictTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceMemoryRepositoryWithSingleRemoteAndMergeConflictTest, - #superclass : #IceRepositoryWithSingleRemoteAndMergeConflictTest, - #category : 'Iceberg-Tests-Memory' + #name : 'IceMemoryRepositoryWithSingleRemoteAndMergeConflictTest', + #superclass : 'IceRepositoryWithSingleRemoteAndMergeConflictTest', + #category : 'Iceberg-Tests-Memory', + #package : 'Iceberg-Tests', + #tag : 'Memory' } -{ #category : #running } +{ #category : 'running' } IceMemoryRepositoryWithSingleRemoteAndMergeConflictTest >> newFixture [ ^ IceWithRemoteAndMergeConflictFixture inMemory ] diff --git a/Iceberg-Tests/IceMemoryRepositoryWithSingleRemoteTest.class.st b/Iceberg-Tests/IceMemoryRepositoryWithSingleRemoteTest.class.st index 7664074f1c..ecb5cf04a5 100644 --- a/Iceberg-Tests/IceMemoryRepositoryWithSingleRemoteTest.class.st +++ b/Iceberg-Tests/IceMemoryRepositoryWithSingleRemoteTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceMemoryRepositoryWithSingleRemoteTest, - #superclass : #IceRepositoryWithSingleRemoteTest, - #category : 'Iceberg-Tests-Memory' + #name : 'IceMemoryRepositoryWithSingleRemoteTest', + #superclass : 'IceRepositoryWithSingleRemoteTest', + #category : 'Iceberg-Tests-Memory', + #package : 'Iceberg-Tests', + #tag : 'Memory' } -{ #category : #running } +{ #category : 'running' } IceMemoryRepositoryWithSingleRemoteTest >> newFixture [ ^ IceWithRemoteFixture inMemory ] diff --git a/Iceberg-Tests/IceMergeTest.class.st b/Iceberg-Tests/IceMergeTest.class.st index 28e1a5b024..ab96f6b67a 100644 --- a/Iceberg-Tests/IceMergeTest.class.st +++ b/Iceberg-Tests/IceMergeTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #IceMergeTest, - #superclass : #IceAbstractTestCase, - #category : 'Iceberg-Tests-Common' + #name : 'IceMergeTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Common', + #package : 'Iceberg-Tests', + #tag : 'Common' } -{ #category : #testing } +{ #category : 'testing' } IceMergeTest class >> isAbstract [ ^ self == IceMergeTest ] -{ #category : #'merge-conflicts' } +{ #category : 'merge-conflicts' } IceMergeTest >> testFastForwardApplyChangesCorrectly [ "This is a Ring working copy" @@ -36,7 +38,7 @@ IceMergeTest >> testFastForwardApplyChangesCorrectly [ self assert: (self repository workingCopy environment ask includesClassNamed: #IceGeneratedClassForTesting2) ] -{ #category : #'merge-cases' } +{ #category : 'merge-cases' } IceMergeTest >> testImageAndHeadBehindMergeCommitShouldMergeInImageAndAdvanceHead [ "If the image and HEAD are behind the commit to merge, we need to advance HEAD and update the image so they correspond. @@ -80,7 +82,7 @@ IceMergeTest >> testImageAndHeadBehindMergeCommitShouldMergeInImageAndAdvanceHea self assert: self workingCopy isModified not. ] -{ #category : #'merge-cases' } +{ #category : 'merge-cases' } IceMergeTest >> testImageAndHeadInverseMergeDivergingCommitShouldCreateMergeCommitAdvanceHeadAndImage [ "If we want to merge the image into the head commit the usual thing would be to: @@ -142,7 +144,7 @@ IceMergeTest >> testImageAndHeadInverseMergeDivergingCommitShouldCreateMergeComm self assert: self repository workingCopy isModified not. ] -{ #category : #'merge-cases' } +{ #category : 'merge-cases' } IceMergeTest >> testImageAndHeadMergeDivergingCommitShouldCreateMergeCommitAdvanceHeadAndImage [ "If the image and HEAD diverted from the merge commit, we need to create a merge commit and advance both HEAD and the image to it. @@ -200,7 +202,7 @@ IceMergeTest >> testImageAndHeadMergeDivergingCommitShouldCreateMergeCommitAdvan self deny: self repository workingCopy isModified. ] -{ #category : #'merge-cases' } +{ #category : 'merge-cases' } IceMergeTest >> testImageBehindHeadShouldOnlyMergeInImage [ "If the image is behind HEAD and we want to merge HEAD we need to update the image to be in HEAD. @@ -245,7 +247,7 @@ IceMergeTest >> testImageBehindHeadShouldOnlyMergeInImage [ self assert: headCommit equals: self repository workingCopy referenceCommit. ] -{ #category : #'merge-cases' } +{ #category : 'merge-cases' } IceMergeTest >> testMergeAheadImageCommitShouldFastForwardHEAD [ "If the image corresponds to the head commit and the commit we want to merge is in the history of the head commit, the merge should be ignored. @@ -288,7 +290,7 @@ IceMergeTest >> testMergeAheadImageCommitShouldFastForwardHEAD [ self assert: self repository workingCopy isModified not. ] -{ #category : #'merge-conflicts' } +{ #category : 'merge-conflicts' } IceMergeTest >> testMergeChangesInDifferentClassesButSamePackageCausesNoConflicts [ "This is a Ring working copy" @@ -320,7 +322,7 @@ IceMergeTest >> testMergeChangesInDifferentClassesButSamePackageCausesNoConflict self assert: (self repository headCommit ancestors includes: change2Commit). ] -{ #category : #'merge-conflicts' } +{ #category : 'merge-conflicts' } IceMergeTest >> testMergeChangesInDifferentMethodsButSameClassCausesNoConflicts [ "This is a Ring working copy" @@ -353,7 +355,7 @@ IceMergeTest >> testMergeChangesInDifferentMethodsButSameClassCausesNoConflicts self assert: (self repository headCommit ancestors includes: change2Commit). ] -{ #category : #'merge-conflicts' } +{ #category : 'merge-conflicts' } IceMergeTest >> testMergeChangesInDifferentPackagesCausesNoConflicts [ "This is a Ring working copy" @@ -386,7 +388,7 @@ IceMergeTest >> testMergeChangesInDifferentPackagesCausesNoConflicts [ self assert: (self repository headCommit ancestors includes: change2Commit). ] -{ #category : #'merge-conflicts' } +{ #category : 'merge-conflicts' } IceMergeTest >> testMergeChangesInSameClassesSamePackageCausesConflicts [ "This is a Ring working copy" @@ -418,7 +420,7 @@ IceMergeTest >> testMergeChangesInSameClassesSamePackageCausesConflicts [ self should: [self repository workingCopy mergeCommit: change2Commit] raise: IceMergeResolutionRequest ] -{ #category : #'merge-conflicts' } +{ #category : 'merge-conflicts' } IceMergeTest >> testMergeChangesInSameMethodSameClassSamePackageCausesConflicts [ "This is a Ring working copy" @@ -449,7 +451,7 @@ IceMergeTest >> testMergeChangesInSameMethodSameClassSamePackageCausesConflicts self should: [self repository workingCopy mergeCommit: change2Commit] raise: IceMergeResolutionRequest ] -{ #category : #'merge-cases' } +{ #category : 'merge-cases' } IceMergeTest >> testMergeCommitInHistoryShouldDoNothing [ "If the image corresponds to the head commit and the commit we want to merge is in the history of the head commit, the merge should be ignored. @@ -489,7 +491,7 @@ IceMergeTest >> testMergeCommitInHistoryShouldDoNothing [ self assert: self repository workingCopy isModified not. ] -{ #category : #'merge-operations' } +{ #category : 'merge-operations' } IceMergeTest >> testMergeFastForwardClassRemovalIsAppliedToWorkingCopy [ | headCommit mergeCommit | @@ -511,7 +513,7 @@ IceMergeTest >> testMergeFastForwardClassRemovalIsAppliedToWorkingCopy [ self denyClassExists: 'IceGeneratedClassForTesting'. ] -{ #category : #'merge-operations' } +{ #category : 'merge-operations' } IceMergeTest >> testMergeFastForwardMethodRemovalIsAppliedToWorkingCopy [ | headCommit mergeCommit | @@ -537,7 +539,7 @@ IceMergeTest >> testMergeFastForwardMethodRemovalIsAppliedToWorkingCopy [ ] -{ #category : #'merge-cases' } +{ #category : 'merge-cases' } IceMergeTest >> testMergeImageReferenceCommitInHistoryShouldDoNothing [ "If the image corresponds to the merge commit and is in the history of the head commit, the merge should be ignored. @@ -580,7 +582,7 @@ IceMergeTest >> testMergeImageReferenceCommitInHistoryShouldDoNothing [ self assert: self repository workingCopy isModified not. ] -{ #category : #'merge-operations' } +{ #category : 'merge-operations' } IceMergeTest >> testMergeNonFastForwardClassRemovalIsAppliedToWorkingCopy [ | headCommit mergeCommit | @@ -610,7 +612,7 @@ IceMergeTest >> testMergeNonFastForwardClassRemovalIsAppliedToWorkingCopy [ self denyClassExists: 'IceGeneratedClassForTesting'. ] -{ #category : #'merge-operations' } +{ #category : 'merge-operations' } IceMergeTest >> testMergeNonFastForwardLocalMethodAdditionIsNotInMergeTree [ | headCommit mergeCommit mergeTree | @@ -647,7 +649,7 @@ IceMergeTest >> testMergeNonFastForwardLocalMethodAdditionIsNotInMergeTree [ ] -{ #category : #'merge-operations' } +{ #category : 'merge-operations' } IceMergeTest >> testMergeNonFastForwardLocalMethodModificationIsNotInMergeTree [ | headCommit mergeCommit mergeTree | @@ -684,7 +686,7 @@ IceMergeTest >> testMergeNonFastForwardLocalMethodModificationIsNotInMergeTree [ ] -{ #category : #'merge-operations' } +{ #category : 'merge-operations' } IceMergeTest >> testMergeNonFastForwardLocalMethodRemovalIsNotInMergeTree [ | headCommit mergeCommit mergeTree | @@ -721,7 +723,7 @@ IceMergeTest >> testMergeNonFastForwardLocalMethodRemovalIsNotInMergeTree [ ] -{ #category : #'merge-operations' } +{ #category : 'merge-operations' } IceMergeTest >> testMergeNonFastForwardMethodRemovalIsAppliedToWorkingCopy [ | headCommit mergeCommit | @@ -753,7 +755,7 @@ IceMergeTest >> testMergeNonFastForwardMethodRemovalIsAppliedToWorkingCopy [ ] -{ #category : #'merge-cases' } +{ #category : 'merge-cases' } IceMergeTest >> testTrimergeShouldRaiseError [ "If the image, HEAD and merge commit are three different commits, we should avoid merging. diff --git a/Iceberg-Tests/IceMetaClassCherryPickingTest.class.st b/Iceberg-Tests/IceMetaClassCherryPickingTest.class.st index 2aa18ab1ae..674dd33c19 100644 --- a/Iceberg-Tests/IceMetaClassCherryPickingTest.class.st +++ b/Iceberg-Tests/IceMetaClassCherryPickingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceMetaClassCherryPickingTest, - #superclass : #IceCherryPickingTest, - #category : #'Iceberg-Tests-Cherrypicking' + #name : 'IceMetaClassCherryPickingTest', + #superclass : 'IceCherryPickingTest', + #category : 'Iceberg-Tests-Cherrypicking', + #package : 'Iceberg-Tests', + #tag : 'Cherrypicking' } -{ #category : #tests } +{ #category : 'tests' } IceMetaClassCherryPickingTest >> testAddExtensionMethodInMetaSideOfExistingClass [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -34,7 +36,7 @@ IceMetaClassCherryPickingTest >> testAddExtensionMethodInMetaSideOfExistingClass assert: (diff / self packageName2 / 'TestClass class' / 'm1') value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMetaClassCherryPickingTest >> testAddMethodInMetaSideOfExistingClass [ | commitToCherryPick diff mergeTree | @@ -61,7 +63,7 @@ IceMetaClassCherryPickingTest >> testAddMethodInMetaSideOfExistingClass [ assert: (diff / self packageName1 / 'TestClass class' / 'm1') value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMetaClassCherryPickingTest >> testModifyExtensionMethodInMetaSideOfExistingClass [ | commitToCherryPick diff mergeTree | self repository workingCopy addPackageNamed: self packageName2. @@ -104,7 +106,7 @@ IceMetaClassCherryPickingTest >> testModifyExtensionMethodInMetaSideOfExistingCl assert: (diff / self packageName2 / 'TestClass class' / 'm1') value isModification ] -{ #category : #tests } +{ #category : 'tests' } IceMetaClassCherryPickingTest >> testModifyMethodInMetaSideOfExistingClass [ | commitToCherryPick diff mergeTree | self repository workingCopy addPackageNamed: self packageName1. @@ -143,7 +145,7 @@ IceMetaClassCherryPickingTest >> testModifyMethodInMetaSideOfExistingClass [ assert: (diff / self packageName1 / 'TestClass class' / 'm1') value isModification ] -{ #category : #tests } +{ #category : 'tests' } IceMetaClassCherryPickingTest >> testRemoveExtensionMethodInMetaSideOfExistingClass [ | commitToCherryPick diff mergeTree | @@ -182,7 +184,7 @@ IceMetaClassCherryPickingTest >> testRemoveExtensionMethodInMetaSideOfExistingCl assert: (diff / self packageName2 / 'TestClass class' / 'm1') value isRemoval . ] -{ #category : #tests } +{ #category : 'tests' } IceMetaClassCherryPickingTest >> testRemoveMethodInMetaSideOfExistingClass [ | commitToCherryPick diff mergeTree | self repository workingCopy addPackageNamed: self packageName1. diff --git a/Iceberg-Tests/IceMethodCherryPickingTest.class.st b/Iceberg-Tests/IceMethodCherryPickingTest.class.st index c89134e1f5..6f5558717d 100644 --- a/Iceberg-Tests/IceMethodCherryPickingTest.class.st +++ b/Iceberg-Tests/IceMethodCherryPickingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceMethodCherryPickingTest, - #superclass : #IceCherryPickingTest, - #category : #'Iceberg-Tests-Cherrypicking' + #name : 'IceMethodCherryPickingTest', + #superclass : 'IceCherryPickingTest', + #category : 'Iceberg-Tests-Cherrypicking', + #package : 'Iceberg-Tests', + #tag : 'Cherrypicking' } -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodInClassAsDependency [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -47,7 +49,7 @@ IceMethodCherryPickingTest >> testAddMethodInClassAsDependency [ value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodInExistingClass [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -82,7 +84,7 @@ IceMethodCherryPickingTest >> testAddMethodInExistingClass [ value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodInExistingTrait [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -122,7 +124,7 @@ IceMethodCherryPickingTest >> testAddMethodInExistingTrait [ / 'm1') value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodInTraitAsDependency [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -165,7 +167,7 @@ IceMethodCherryPickingTest >> testAddMethodInTraitAsDependency [ value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodReferingAnAddedMethod [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -209,7 +211,7 @@ IceMethodCherryPickingTest >> testAddMethodReferingAnAddedMethod [ value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodThatVariablesThatAreNotDependencies [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -235,7 +237,7 @@ IceMethodCherryPickingTest >> testAddMethodThatVariablesThatAreNotDependencies [ value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodUsingASharedPoolAsDependency [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -293,7 +295,7 @@ IceMethodCherryPickingTest >> testAddMethodUsingASharedPoolAsDependency [ equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodUsingASharedPoolAsDependencyWithClassAlreadyCommited [ | commitToCherryPick diff mergeTree | self repository workingCopy addPackageNamed: self packageName1. @@ -360,7 +362,7 @@ IceMethodCherryPickingTest >> testAddMethodUsingASharedPoolAsDependencyWithClass equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodWithClassAndSuperclassAsDependency [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -423,7 +425,7 @@ IceMethodCherryPickingTest >> testAddMethodWithClassAndSuperclassAsDependency [ value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependency [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -493,7 +495,7 @@ IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependency [ value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependencyWithSuperclassAlreadyCommited [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -557,7 +559,7 @@ IceMethodCherryPickingTest >> testAddMethodWithClassVariableAsDependencyWithSupe value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodWithInstanceVariableAsDependency [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -622,7 +624,7 @@ IceMethodCherryPickingTest >> testAddMethodWithInstanceVariableAsDependency [ value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodWithInstanceVariableAsDependencyWithSuperclassAlreadyCommited [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -681,7 +683,7 @@ IceMethodCherryPickingTest >> testAddMethodWithInstanceVariableAsDependencyWithS value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodWithReferencedClassAsDependency [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -724,7 +726,7 @@ IceMethodCherryPickingTest >> testAddMethodWithReferencedClassAsDependency [ value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodWithReferencedTraitAsDependency [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -767,7 +769,7 @@ IceMethodCherryPickingTest >> testAddMethodWithReferencedTraitAsDependency [ value isAddition ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testAddMethodWithTwoCommits [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -799,7 +801,7 @@ IceMethodCherryPickingTest >> testAddMethodWithTwoCommits [ assert: (diff / self packageName1 / 'TestClass' / 'm1') value definition sourceCode equals: 'm1 ^36'. ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testRemoveClassWithMethods [ | commitToCherryPick diff mergeTree | self repository workingCopy addPackageNamed: self packageName1. @@ -835,7 +837,7 @@ IceMethodCherryPickingTest >> testRemoveClassWithMethods [ assert: (diff / self packageName1 / 'TestClass2' / 'm1') value isRemoval ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testRemoveMethodInExistingClass [ | commitToCherryPick diff mergeTree | @@ -869,7 +871,7 @@ IceMethodCherryPickingTest >> testRemoveMethodInExistingClass [ assert: (diff / self packageName1 / 'TestClass' / 'm1') value isRemoval ] -{ #category : #tests } +{ #category : 'tests' } IceMethodCherryPickingTest >> testRemoveMethodInExistingTrait [ | commitToCherryPick diff mergeTree | self repository workingCopy addPackageNamed: self packageName1. diff --git a/Iceberg-Tests/IceMissingLocalRepositoryFixture.class.st b/Iceberg-Tests/IceMissingLocalRepositoryFixture.class.st index 6435ef07a8..bfa4c2f531 100644 --- a/Iceberg-Tests/IceMissingLocalRepositoryFixture.class.st +++ b/Iceberg-Tests/IceMissingLocalRepositoryFixture.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceMissingLocalRepositoryFixture, - #superclass : #IceCleanWorkingCopyFixture, - #category : 'Iceberg-Tests-Common-Fixtures' + #name : 'IceMissingLocalRepositoryFixture', + #superclass : 'IceCleanWorkingCopyFixture', + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #running } +{ #category : 'running' } IceMissingLocalRepositoryFixture >> setUp [ super setUp. diff --git a/Iceberg-Tests/IceMultiplePackageFixture.class.st b/Iceberg-Tests/IceMultiplePackageFixture.class.st index 34dfe281ab..9058aeb221 100644 --- a/Iceberg-Tests/IceMultiplePackageFixture.class.st +++ b/Iceberg-Tests/IceMultiplePackageFixture.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceMultiplePackageFixture, - #superclass : #IceBasicRepositoryFixture, - #category : 'Iceberg-Tests-Common-Fixtures' + #name : 'IceMultiplePackageFixture', + #superclass : 'IceBasicRepositoryFixture', + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #running } +{ #category : 'running' } IceMultiplePackageFixture >> setUp [ super setUp. diff --git a/Iceberg-Tests/IceMultiplePackageLocalGitRepositoryTest.class.st b/Iceberg-Tests/IceMultiplePackageLocalGitRepositoryTest.class.st index 3f2a39a079..49a6ce1303 100644 --- a/Iceberg-Tests/IceMultiplePackageLocalGitRepositoryTest.class.st +++ b/Iceberg-Tests/IceMultiplePackageLocalGitRepositoryTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceMultiplePackageLocalGitRepositoryTest, - #superclass : #IceMultiplePackageRepositoryTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceMultiplePackageLocalGitRepositoryTest', + #superclass : 'IceMultiplePackageRepositoryTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceMultiplePackageLocalGitRepositoryTest >> newFixture [ ^ IceMultiplePackageFixture inGit ] diff --git a/Iceberg-Tests/IceMultiplePackageLocalMemoryRepositoryTest.class.st b/Iceberg-Tests/IceMultiplePackageLocalMemoryRepositoryTest.class.st index 8ff976bc72..a506ebff4c 100644 --- a/Iceberg-Tests/IceMultiplePackageLocalMemoryRepositoryTest.class.st +++ b/Iceberg-Tests/IceMultiplePackageLocalMemoryRepositoryTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceMultiplePackageLocalMemoryRepositoryTest, - #superclass : #IceMultiplePackageRepositoryTest, - #category : 'Iceberg-Tests-Memory' + #name : 'IceMultiplePackageLocalMemoryRepositoryTest', + #superclass : 'IceMultiplePackageRepositoryTest', + #category : 'Iceberg-Tests-Memory', + #package : 'Iceberg-Tests', + #tag : 'Memory' } -{ #category : #running } +{ #category : 'running' } IceMultiplePackageLocalMemoryRepositoryTest >> newFixture [ ^ IceMultiplePackageFixture inMemory ] diff --git a/Iceberg-Tests/IceMultiplePackageRepositoryTest.class.st b/Iceberg-Tests/IceMultiplePackageRepositoryTest.class.st index 6b171374ff..70329cfddb 100644 --- a/Iceberg-Tests/IceMultiplePackageRepositoryTest.class.st +++ b/Iceberg-Tests/IceMultiplePackageRepositoryTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #IceMultiplePackageRepositoryTest, - #superclass : #IceBornRepositoryTest, - #category : #'Iceberg-Tests-Common' + #name : 'IceMultiplePackageRepositoryTest', + #superclass : 'IceBornRepositoryTest', + #category : 'Iceberg-Tests-Common', + #package : 'Iceberg-Tests', + #tag : 'Common' } -{ #category : #testing } +{ #category : 'testing' } IceMultiplePackageRepositoryTest class >> isAbstract [ ^ self == IceMultiplePackageRepositoryTest ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceMultiplePackageRepositoryTest >> testAdoptCommitChangesWorkingCopyCommit [ | message commitToAdopt | @@ -27,7 +29,7 @@ IceMultiplePackageRepositoryTest >> testAdoptCommitChangesWorkingCopyCommit [ self assert: self repository workingCopy referenceCommit equals: commitToAdopt ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceMultiplePackageRepositoryTest >> testAdoptCommitDoesNotChangeBranchCommit [ | message commitToAdopt branchCommitBeforeAdopt | @@ -45,7 +47,7 @@ IceMultiplePackageRepositoryTest >> testAdoptCommitDoesNotChangeBranchCommit [ self assert: self repository branch commit equals: branchCommitBeforeAdopt ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceMultiplePackageRepositoryTest >> testAdoptCommitDoesNotChangeCheckedOutCodeInImage [ | message commitToAdopt | @@ -62,7 +64,7 @@ IceMultiplePackageRepositoryTest >> testAdoptCommitDoesNotChangeCheckedOutCodeIn self assert: (self repository workingCopy environment ask includesClassNamed: 'IceGeneratedClassForTesting') ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceMultiplePackageRepositoryTest >> testAdoptCommitMarksPackagesAsDirty [ | message commitToAdopt | @@ -79,14 +81,14 @@ IceMultiplePackageRepositoryTest >> testAdoptCommitMarksPackagesAsDirty [ self assert: (self repository workingCopy packageNamed: self packageName1 asSymbol) isDirty ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceMultiplePackageRepositoryTest >> testCheckoutBranchDoesNotLeaveDetachedHead [ self repository branch checkout. self deny: self repository head isDetached ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceMultiplePackageRepositoryTest >> testCheckoutBranchInstallsCodeInImage [ | message | @@ -117,7 +119,7 @@ IceMultiplePackageRepositoryTest >> testCheckoutBranchInstallsCodeInImage [ self assertPackageExists: self packageName2 ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceMultiplePackageRepositoryTest >> testCheckoutBranchInstallsPackageInImage [ self repository branch checkout. @@ -125,7 +127,7 @@ IceMultiplePackageRepositoryTest >> testCheckoutBranchInstallsPackageInImage [ self assertPackageExists: self packageName2. ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceMultiplePackageRepositoryTest >> testCheckoutCodeRepositoryInstallsCodeInImage [ | message | @@ -154,7 +156,7 @@ IceMultiplePackageRepositoryTest >> testCheckoutCodeRepositoryInstallsCodeInImag self assertPackageExists: self packageName2 ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceMultiplePackageRepositoryTest >> testCheckoutCodeRepositoryInstallsPackageInImage [ self repository checkoutAllPackages. @@ -162,7 +164,7 @@ IceMultiplePackageRepositoryTest >> testCheckoutCodeRepositoryInstallsPackageInI self assertPackageExists: self packageName2 ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceMultiplePackageRepositoryTest >> testCheckoutCommitInstallsCodeInImage [ | message | @@ -191,7 +193,7 @@ IceMultiplePackageRepositoryTest >> testCheckoutCommitInstallsCodeInImage [ self assertPackageExists: self packageName2 ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceMultiplePackageRepositoryTest >> testCheckoutCommitInstallsPackageInImage [ self repository branch commit checkout. @@ -199,7 +201,7 @@ IceMultiplePackageRepositoryTest >> testCheckoutCommitInstallsPackageInImage [ self assertPackageExists: self packageName2 ] -{ #category : #'tests-branch' } +{ #category : 'tests-branch' } IceMultiplePackageRepositoryTest >> testCheckoutDoesNotAffectBranchCommit [ | commitAtBranchTime createdBranch message | @@ -221,14 +223,14 @@ IceMultiplePackageRepositoryTest >> testCheckoutDoesNotAffectBranchCommit [ self assert: createdBranch commit equals: commitAtBranchTime ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceMultiplePackageRepositoryTest >> testCheckoutLatestBranchCommitLeavesDetachedHead [ self repository branch commit checkoutAllPackages. self assert: self repository head isDetached. ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceMultiplePackageRepositoryTest >> testCheckoutOlderCommitLeavesRepositoryInDetachedMode [ | message | @@ -250,14 +252,14 @@ IceMultiplePackageRepositoryTest >> testCheckoutOlderCommitLeavesRepositoryInDet self assert: self repository head isDetached ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceMultiplePackageRepositoryTest >> testCheckoutRepositoryDoesNotLeaveDetachedHead [ self repository checkoutAllPackages. self deny: self repository head isDetached ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceMultiplePackageRepositoryTest >> testCommitModificationsCreatesNewCommit [ | message | @@ -272,7 +274,7 @@ IceMultiplePackageRepositoryTest >> testCommitModificationsCreatesNewCommit [ self deny: self repository workingCopy isDetached. ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceMultiplePackageRepositoryTest >> testCommitModificationsDoNotCreateBranch [ | message | @@ -287,7 +289,7 @@ IceMultiplePackageRepositoryTest >> testCommitModificationsDoNotCreateBranch [ self deny: self repository workingCopy isDetached. ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceMultiplePackageRepositoryTest >> testCommitWithDetachedHeadRaisesException [ | message | @@ -303,7 +305,7 @@ IceMultiplePackageRepositoryTest >> testCommitWithDetachedHeadRaisesException [ self should: [self repository commitWithMessage: message] raise: IceWorkingCopyDesyncronized. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceMultiplePackageRepositoryTest >> testCreateClassInImageInNotManagedPackageKeepChangesEmpty [ "This is a Ring working copy" @@ -313,7 +315,7 @@ IceMultiplePackageRepositoryTest >> testCreateClassInImageInNotManagedPackageKee self assert: self repository workingCopyDiff isEmpty ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceMultiplePackageRepositoryTest >> testCreateClassInImageMakesChangesContainClassDefinition [ | diff | @@ -330,7 +332,7 @@ IceMultiplePackageRepositoryTest >> testCreateClassInImageMakesChangesContainCla self assert: (diff tree / self packageName1 / 'IceGeneratedClassForTesting') value definition name equals: #IceGeneratedClassForTesting. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceMultiplePackageRepositoryTest >> testCreateClassInImageMakesChangesNonEmpty [ "This is a Ring working copy" @@ -340,7 +342,7 @@ IceMultiplePackageRepositoryTest >> testCreateClassInImageMakesChangesNonEmpty [ self deny: self repository workingCopyDiff isEmpty ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceMultiplePackageRepositoryTest >> testCreateClassInImageMakesRespositoryModifications [ "This is a Ring working copy" @@ -350,13 +352,13 @@ IceMultiplePackageRepositoryTest >> testCreateClassInImageMakesRespositoryModifi self assert: self repository isModified ] -{ #category : #'tests-queries' } +{ #category : 'tests-queries' } IceMultiplePackageRepositoryTest >> testCurrentBranchIsDefaultMasterBranch [ self assert: self repository branch name equals: 'master' ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceMultiplePackageRepositoryTest >> testDetachedHeadCannotCommit [ self repository branch commit checkout. @@ -364,7 +366,7 @@ IceMultiplePackageRepositoryTest >> testDetachedHeadCannotCommit [ self should: [self repository validateCanCommit] raise: IceWorkingCopyDesyncronized. ] -{ #category : #'tests-queries' } +{ #category : 'tests-queries' } IceMultiplePackageRepositoryTest >> testListBranchCommitsListsCommitsInBranch [ | branches commits | @@ -375,7 +377,7 @@ IceMultiplePackageRepositoryTest >> testListBranchCommitsListsCommitsInBranch [ self assert: commits first comment equals: 'Initial commit'. ] -{ #category : #'tests-queries' } +{ #category : 'tests-queries' } IceMultiplePackageRepositoryTest >> testListPackagesListExistingPackage [ | packages | @@ -385,19 +387,19 @@ IceMultiplePackageRepositoryTest >> testListPackagesListExistingPackage [ self assert: (packages includes: self packageName2). ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceMultiplePackageRepositoryTest >> testNoChangesInImageMakesChangesEmpty [ self assert: self repository workingCopyDiff isEmpty ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceMultiplePackageRepositoryTest >> testNoChangesInImageMakesNoModifications [ self deny: self repository isModified ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceMultiplePackageRepositoryTest >> testResetBranchDoesNotChangeCheckedOutCodeInImage [ | message commitToReset | @@ -415,7 +417,7 @@ IceMultiplePackageRepositoryTest >> testResetBranchDoesNotChangeCheckedOutCodeIn self assert: (self repository workingCopy environment ask includesClassNamed: 'IceGeneratedClassForTesting') ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceMultiplePackageRepositoryTest >> testResetBranchDoesNotChangeCheckedOutCommit [ | message commitToReset workingCopyCommitBeforeReset | @@ -433,7 +435,7 @@ IceMultiplePackageRepositoryTest >> testResetBranchDoesNotChangeCheckedOutCommit self assert: self repository workingCopy referenceCommit equals: workingCopyCommitBeforeReset ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceMultiplePackageRepositoryTest >> testResetBranchRestoresBranchCommit [ | message commitToReset | diff --git a/Iceberg-Tests/IceNewGitRepositoryTest.class.st b/Iceberg-Tests/IceNewGitRepositoryTest.class.st index 5bb748076a..aeaab2d00a 100644 --- a/Iceberg-Tests/IceNewGitRepositoryTest.class.st +++ b/Iceberg-Tests/IceNewGitRepositoryTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceNewGitRepositoryTest, - #superclass : #IceNewRepositoryTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceNewGitRepositoryTest', + #superclass : 'IceNewRepositoryTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceNewGitRepositoryTest >> newFixture [ ^ IceBasicRepositoryFixture inGit ] diff --git a/Iceberg-Tests/IceNewRepositoryTest.class.st b/Iceberg-Tests/IceNewRepositoryTest.class.st index fa9129508a..3e4bd973f5 100644 --- a/Iceberg-Tests/IceNewRepositoryTest.class.st +++ b/Iceberg-Tests/IceNewRepositoryTest.class.st @@ -1,34 +1,36 @@ Class { - #name : #IceNewRepositoryTest, - #superclass : #IceBornRepositoryTest, - #category : 'Iceberg-Tests-Common' + #name : 'IceNewRepositoryTest', + #superclass : 'IceBornRepositoryTest', + #category : 'Iceberg-Tests-Common', + #package : 'Iceberg-Tests', + #tag : 'Common' } -{ #category : #running } +{ #category : 'running' } IceNewRepositoryTest class >> isAbstract [ ^ self == IceNewRepositoryTest ] -{ #category : #tests } +{ #category : 'tests' } IceNewRepositoryTest >> testNewRepositoryBranchIsNamedMaster [ self assert: self repository branch name equals: 'master' ] -{ #category : #tests } +{ #category : 'tests' } IceNewRepositoryTest >> testNewRepositoryHasNoTags [ self assert: self repository tags isEmpty ] -{ #category : #tests } +{ #category : 'tests' } IceNewRepositoryTest >> testNewRepositoryPushDoesNothing [ self shouldnt: [ self repository push ] raise: Error ] -{ #category : #tests } +{ #category : 'tests' } IceNewRepositoryTest >> testNewRepositoryPushToExplicitRemoteDoesNothing [ self shouldnt: [ self repository pushTo: (IceGitRemote url: 'git@github.com:pharo-vcs/testing.git') ] raise: Error diff --git a/Iceberg-Tests/IceNotYetClonedRepositoryFixture.class.st b/Iceberg-Tests/IceNotYetClonedRepositoryFixture.class.st index 057abf06dd..744e62fc7e 100644 --- a/Iceberg-Tests/IceNotYetClonedRepositoryFixture.class.st +++ b/Iceberg-Tests/IceNotYetClonedRepositoryFixture.class.st @@ -1,6 +1,6 @@ Class { - #name : #IceNotYetClonedRepositoryFixture, - #superclass : #Object, + #name : 'IceNotYetClonedRepositoryFixture', + #superclass : 'Object', #instVars : [ 'factory', 'projectName', @@ -10,10 +10,12 @@ Class { 'remoteRepository', 'location' ], - #category : 'Iceberg-Tests-Common-Fixtures' + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #initialization } +{ #category : 'initialization' } IceNotYetClonedRepositoryFixture class >> inGit [ ^ self new @@ -21,7 +23,7 @@ IceNotYetClonedRepositoryFixture class >> inGit [ yourself ] -{ #category : #initialization } +{ #category : 'initialization' } IceNotYetClonedRepositoryFixture class >> inMemory [ ^ self new @@ -29,24 +31,24 @@ IceNotYetClonedRepositoryFixture class >> inMemory [ yourself ] -{ #category : #initialization } +{ #category : 'initialization' } IceNotYetClonedRepositoryFixture >> ensureRemoteRepository [ ^ remoteRepository := factory ensureRemoteRepository ] -{ #category : #accessing } +{ #category : 'accessing' } IceNotYetClonedRepositoryFixture >> factory [ ^ factory ] -{ #category : #accessing } +{ #category : 'accessing' } IceNotYetClonedRepositoryFixture >> factory: aFactory [ factory := aFactory ] -{ #category : #initialization } +{ #category : 'initialization' } IceNotYetClonedRepositoryFixture >> initialize [ super initialize. location := FileLocator imageDirectory / 'test' / UUID new asString. @@ -55,57 +57,57 @@ IceNotYetClonedRepositoryFixture >> initialize [ packageName2 := 'IceMockPackage2'. ] -{ #category : #testing } +{ #category : 'testing' } IceNotYetClonedRepositoryFixture >> isGit [ ^ factory isGit ] -{ #category : #testing } +{ #category : 'testing' } IceNotYetClonedRepositoryFixture >> isUnbornProjectFixture [ ^ false ] -{ #category : #initialization } +{ #category : 'initialization' } IceNotYetClonedRepositoryFixture >> location [ ^ location ] -{ #category : #initialization } +{ #category : 'initialization' } IceNotYetClonedRepositoryFixture >> newRemoteNamed: aName toRepository: aRepository [ ^ factory newRemoteNamed: aName toRepository: aRepository ] -{ #category : #accessing } +{ #category : 'accessing' } IceNotYetClonedRepositoryFixture >> packageName1 [ ^ packageName1 ] -{ #category : #accessing } +{ #category : 'accessing' } IceNotYetClonedRepositoryFixture >> packageName1: anObject [ packageName1 := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } IceNotYetClonedRepositoryFixture >> packageName2 [ ^ packageName2 ] -{ #category : #accessing } +{ #category : 'accessing' } IceNotYetClonedRepositoryFixture >> packageName2: anObject [ packageName2 := anObject ] -{ #category : #running } +{ #category : 'running' } IceNotYetClonedRepositoryFixture >> setUp [ projectName := 'test-project'. ] -{ #category : #running } +{ #category : 'running' } IceNotYetClonedRepositoryFixture >> tearDown [ Smalltalk garbageCollect. diff --git a/Iceberg-Tests/IceParameterizedTestCase.class.st b/Iceberg-Tests/IceParameterizedTestCase.class.st index e2bc3be42a..1bda0f3054 100644 --- a/Iceberg-Tests/IceParameterizedTestCase.class.st +++ b/Iceberg-Tests/IceParameterizedTestCase.class.st @@ -6,17 +6,19 @@ If #parameters method is not overriden, I will be run as a normal test case. To run with the parameterization you have to use Test Runner. If you run tests from Nautilus, they will ignore parameterization and run with current global configuration. For example if you ran IceBranchTest from the test runner it will be run with every Iceberg backend loaded in the image (see #parameters class method in IceBranchTest). But if you run it from Nautilus it will run the test only once with the current backend, as specified by IceRepository class>>defaultBackendType. " Class { - #name : #IceParameterizedTestCase, - #superclass : #TestCase, + #name : 'IceParameterizedTestCase', + #superclass : 'TestCase', #instVars : [ 'testParameters', 'oldShareRepositoriesBetweenImages', 'provider' ], - #category : #'Iceberg-Tests-Base' + #category : 'Iceberg-Tests-Base', + #package : 'Iceberg-Tests', + #tag : 'Base' } -{ #category : #'building suites' } +{ #category : 'building suites' } IceParameterizedTestCase class >> buildSuite [ ^ self buildSuiteNamed: self name asString withGlobals: #() @@ -24,7 +26,7 @@ IceParameterizedTestCase class >> buildSuite [ ] -{ #category : #'building suites' } +{ #category : 'building suites' } IceParameterizedTestCase class >> buildSuiteNamed: suiteName withGlobals: globals andConfigurations: configs [ | suite | configs ifEmpty: [ @@ -48,7 +50,7 @@ IceParameterizedTestCase class >> buildSuiteNamed: suiteName withGlobals: global ] -{ #category : #'building suites' } +{ #category : 'building suites' } IceParameterizedTestCase class >> buildSuiteNamed: suiteName withGlobals: globalParameterValues andSubsuites: moreParameters [ | suite | moreParameters ifEmpty: [ @@ -72,18 +74,18 @@ IceParameterizedTestCase class >> buildSuiteNamed: suiteName withGlobals: global ] -{ #category : #history } +{ #category : 'history' } IceParameterizedTestCase class >> lastStoredRun [ ^ ((Dictionary new) add: (#timeStamp->(DateAndTime basicNew instVarAt: 1 put: 72896; instVarAt: 2 put: (Duration seconds: 3600 nanoSeconds: 0); instVarAt: 3 put: 2457731; instVarAt: 4 put: 823745000; yourself)); add: (#passed->((Set new) add: #testParameters; yourself)); add: (#failures->((Set new))); add: (#errors->((Set new))); yourself) ] -{ #category : #'building suites' } +{ #category : 'building suites' } IceParameterizedTestCase class >> parameters [ "No parameters will make this tests work like a normal TestCase" ^ #() ] -{ #category : #configurations } +{ #category : 'configurations' } IceParameterizedTestCase class >> remoteTypeConfiguration [ ^ IceTestParameter withOptions: { #httpsUrl. #scpUrl } @@ -91,12 +93,12 @@ IceParameterizedTestCase class >> remoteTypeConfiguration [ selector: #remoteTypeSelector ] -{ #category : #configurations } +{ #category : 'configurations' } IceParameterizedTestCase class >> repositoryBackendConfiguration [ ^ IceTestParameter withOptions: {1} ] -{ #category : #private } +{ #category : 'private' } IceParameterizedTestCase >> cleanUpInstanceVariables [ | instanceVariablesNames | instanceVariablesNames := #('testSelector' 'testParameters'). @@ -106,22 +108,22 @@ IceParameterizedTestCase >> cleanUpInstanceVariables [ ifFalse: [ self instVarNamed: name put: nil ] ] ] -{ #category : #running } +{ #category : 'running' } IceParameterizedTestCase >> isCI [ ^ (OSEnvironment current at: 'CI' ifAbsent: [ 'false' ]) asLowercase = 'true' ] -{ #category : #accessing } +{ #category : 'accessing' } IceParameterizedTestCase >> parameters [ ^ testParameters ifNil: [ testParameters := #() ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceParameterizedTestCase >> parameters: anObject [ testParameters := anObject ] -{ #category : #printing } +{ #category : 'printing' } IceParameterizedTestCase >> printOn: aStream [ super printOn: aStream. @@ -133,7 +135,7 @@ IceParameterizedTestCase >> printOn: aStream [ ] -{ #category : #running } +{ #category : 'running' } IceParameterizedTestCase >> setUp [ super setUp. @@ -146,7 +148,7 @@ IceParameterizedTestCase >> setUp [ self parameters do: [ :each | each activate ] ] -{ #category : #running } +{ #category : 'running' } IceParameterizedTestCase >> tearDown [ self parameters do: [ :parameter | diff --git a/Iceberg-Tests/IceProxySettingsTest.class.st b/Iceberg-Tests/IceProxySettingsTest.class.st new file mode 100644 index 0000000000..7a4560f482 --- /dev/null +++ b/Iceberg-Tests/IceProxySettingsTest.class.st @@ -0,0 +1,81 @@ +Class { + #name : 'IceProxySettingsTest', + #superclass : 'TestCase', + #instVars : [ + 'oldNetworkSettingsHost', + 'oldNetworkSettingsPort' + ], + #category : 'Iceberg-Tests-Core-Remotes', + #package : 'Iceberg-Tests', + #tag : 'Core-Remotes' +} + +{ #category : 'asserting' } +IceProxySettingsTest >> assertProxyURLExternalStringHasValue: aString [ + + | value | + value := Iceberg proxyURLExternalString. + + self assert: value isExternalAddress. + self deny: value isNull. + + self assert: value utf8StringFromCString equals: aString +] + +{ #category : 'running' } +IceProxySettingsTest >> setUp [ + + super setUp. + + oldNetworkSettingsHost := NetworkSystemSettings httpProxyServer. + oldNetworkSettingsPort := NetworkSystemSettings httpProxyPort. +] + +{ #category : 'running' } +IceProxySettingsTest >> tearDown [ + + NetworkSystemSettings httpProxyServer: oldNetworkSettingsHost. + NetworkSystemSettings httpProxyPort: oldNetworkSettingsPort. + + super tearDown +] + +{ #category : 'tests' } +IceProxySettingsTest >> testConfigureProxyOptWithCorrectProxyUrl [ + + | proxyOpt | + + NetworkSystemSettings httpProxyServer: 'myproxy.company.com'. + NetworkSystemSettings httpProxyPort: 8080. + + proxyOpt := LGitProxyOptions defaults. + Iceberg configureLGitProxyOpt: proxyOpt. + + self assert: proxyOpt prim_url value equals: Iceberg proxyURLExternalString value. + self assert: proxyOpt prim_url utf8StringFromCString equals: 'https://myproxy.company.com:8080'. +] + +{ #category : 'tests' } +IceProxySettingsTest >> testEmptyHostReturnsNullPointer [ + + NetworkSystemSettings httpProxyServer: ''. + + self assert: Iceberg proxyURLExternalString isNull. +] + +{ #category : 'tests' } +IceProxySettingsTest >> testHostAndDefaultPortHasCorrectAddress [ + + NetworkSystemSettings httpProxyServer: 'myproxy.company.com'. + + self assertProxyURLExternalStringHasValue: 'https://myproxy.company.com:80'. +] + +{ #category : 'tests' } +IceProxySettingsTest >> testHostAndPortHasCorrectAddress [ + + NetworkSystemSettings httpProxyServer: 'myproxy.company.com'. + NetworkSystemSettings httpProxyPort: 8080. + + self assertProxyURLExternalStringHasValue: 'https://myproxy.company.com:8080'. +] diff --git a/Iceberg-Tests/IceRepository.extension.st b/Iceberg-Tests/IceRepository.extension.st index 2688b0acbb..90ab367f8c 100644 --- a/Iceberg-Tests/IceRepository.extension.st +++ b/Iceberg-Tests/IceRepository.extension.st @@ -1,12 +1,12 @@ -Extension { #name : #IceRepository } +Extension { #name : 'IceRepository' } -{ #category : #'*Iceberg-Tests' } +{ #category : '*Iceberg-Tests' } IceRepository >> latestVersion: packageName [ ^ (self packageNamed: packageName) latestVersion ] -{ #category : #'*Iceberg-Tests' } +{ #category : '*Iceberg-Tests' } IceRepository >> loadPackageNamed: packageName [ self workingCopy diff --git a/Iceberg-Tests/IceRepositoryWithSingleRemoteAndMergeConflictTest.class.st b/Iceberg-Tests/IceRepositoryWithSingleRemoteAndMergeConflictTest.class.st index ef88da2467..e43d4b6e2a 100644 --- a/Iceberg-Tests/IceRepositoryWithSingleRemoteAndMergeConflictTest.class.st +++ b/Iceberg-Tests/IceRepositoryWithSingleRemoteAndMergeConflictTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #IceRepositoryWithSingleRemoteAndMergeConflictTest, - #superclass : #IceAbstractTestCase, - #category : 'Iceberg-Tests-Common' + #name : 'IceRepositoryWithSingleRemoteAndMergeConflictTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Common', + #package : 'Iceberg-Tests', + #tag : 'Common' } -{ #category : #testing } +{ #category : 'testing' } IceRepositoryWithSingleRemoteAndMergeConflictTest class >> isAbstract [ ^ self == IceRepositoryWithSingleRemoteAndMergeConflictTest ] -{ #category : #tests } +{ #category : 'tests' } IceRepositoryWithSingleRemoteAndMergeConflictTest >> testRepositoryHasIncomingCommitsAfterFetch [ self repository fetch. @@ -18,19 +20,19 @@ IceRepositoryWithSingleRemoteAndMergeConflictTest >> testRepositoryHasIncomingCo self assert: self repository hasIncomingCommits ] -{ #category : #tests } +{ #category : 'tests' } IceRepositoryWithSingleRemoteAndMergeConflictTest >> testRepositoryHasNoIncomingCommitsIfNoFetch [ self deny: self repository hasIncomingCommits ] -{ #category : #tests } +{ #category : 'tests' } IceRepositoryWithSingleRemoteAndMergeConflictTest >> testRepositoryHasNoOutgoingCommitsIfNoFetch [ self deny: self repository hasOutgoingCommits ] -{ #category : #tests } +{ #category : 'tests' } IceRepositoryWithSingleRemoteAndMergeConflictTest >> testRepositoryHasOutgoingCommitsAfterFetch [ self repository fetch. diff --git a/Iceberg-Tests/IceRepositoryWithSingleRemoteTest.class.st b/Iceberg-Tests/IceRepositoryWithSingleRemoteTest.class.st index 9e3409ebfe..9bd2157083 100644 --- a/Iceberg-Tests/IceRepositoryWithSingleRemoteTest.class.st +++ b/Iceberg-Tests/IceRepositoryWithSingleRemoteTest.class.st @@ -1,29 +1,31 @@ Class { - #name : #IceRepositoryWithSingleRemoteTest, - #superclass : #IceAbstractTestCase, - #category : 'Iceberg-Tests-Common' + #name : 'IceRepositoryWithSingleRemoteTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Common', + #package : 'Iceberg-Tests', + #tag : 'Common' } -{ #category : #testing } +{ #category : 'testing' } IceRepositoryWithSingleRemoteTest class >> isAbstract [ ^ self == IceRepositoryWithSingleRemoteTest ] -{ #category : #'tests-fetch' } +{ #category : 'tests-fetch' } IceRepositoryWithSingleRemoteTest >> testAfterFetchingARepositoryTracksRemoteBranch [ self repository fetch. self assert: self repository remoteTrackedBranches notEmpty ] -{ #category : #'tests-fetch' } +{ #category : 'tests-fetch' } IceRepositoryWithSingleRemoteTest >> testBeforeFetchingARepositoryHasNoRemoteTrackedBranches [ self assert: self repository remoteTrackedBranches isEmpty ] -{ #category : #'tests-fetch' } +{ #category : 'tests-fetch' } IceRepositoryWithSingleRemoteTest >> testFetchUpdatesTrackedRemoteBranch [ | newCommit remoteTrackedBranches | @@ -36,7 +38,7 @@ IceRepositoryWithSingleRemoteTest >> testFetchUpdatesTrackedRemoteBranch [ self assert: self repository remoteTrackedBranches anyOne commit equals: newCommit ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceRepositoryWithSingleRemoteTest >> testLocalBranchDoesNotTrackARemoteBranchBeforeFetching [ "We commit to force the creation of the local branch" @@ -46,7 +48,7 @@ IceRepositoryWithSingleRemoteTest >> testLocalBranchDoesNotTrackARemoteBranchBef self deny: (self repository branchNamed: self remoteBranchName) tracksRemoteBranch. ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceRepositoryWithSingleRemoteTest >> testLocalCheckedOutBranchIsEqualsToHEAD [ "We commit to force the creation of the local branch" @@ -56,7 +58,7 @@ IceRepositoryWithSingleRemoteTest >> testLocalCheckedOutBranchIsEqualsToHEAD [ self assert: (self repository branchNamed: self repository head name) equals: self repository head. ] -{ #category : #'tests-push' } +{ #category : 'tests-push' } IceRepositoryWithSingleRemoteTest >> testPushPushesTags [ (self repository isKindOf: IceMemoryRepository) @@ -71,40 +73,40 @@ IceRepositoryWithSingleRemoteTest >> testPushPushesTags [ self assert: (self remoteRepository tagNames includes: 'exampleTag') ] -{ #category : #'tests-fetch' } +{ #category : 'tests-fetch' } IceRepositoryWithSingleRemoteTest >> testRemoteTrackedBranchHasSameNameAsRemoteBranch [ self repository fetch. self assert: self repository remoteTrackedBranches anyOne shortname equals: self remoteBranchName ] -{ #category : #'tests-push' } +{ #category : 'tests-push' } IceRepositoryWithSingleRemoteTest >> testRepositoryHasIncomingCommits [ self assert: self repository hasIncomingCommits ] -{ #category : #'tests-push' } +{ #category : 'tests-push' } IceRepositoryWithSingleRemoteTest >> testRepositoryHasNoMoreIncomingCommitsAfterPull [ self repository pull. self deny: self repository hasIncomingCommits ] -{ #category : #'tests-push' } +{ #category : 'tests-push' } IceRepositoryWithSingleRemoteTest >> testRepositoryHasNoOutgoingCommits [ self deny: self repository hasOutgoingCommits ] -{ #category : #'tests-pull' } +{ #category : 'tests-pull' } IceRepositoryWithSingleRemoteTest >> testRepositoryPullDoesFetchAndMergeFromOrigin [ self repository pull. self assert: self repository head commit equals: self remoteRepository head commit. ] -{ #category : #'tests-pull' } +{ #category : 'tests-pull' } IceRepositoryWithSingleRemoteTest >> testRepositoryPullFromBranchThatDoesNotHaveACorrespondingRemoteBranchDoesNothing [ | prePullCommit | @@ -117,7 +119,7 @@ IceRepositoryWithSingleRemoteTest >> testRepositoryPullFromBranchThatDoesNotHave self assert: self repository head commit equals: prePullCommit. ] -{ #category : #'tests-pull' } +{ #category : 'tests-pull' } IceRepositoryWithSingleRemoteTest >> testRepositoryPullFromUnbornBranchThatDoesNotHaveACorrespondingRemoteBranchDoesNothing [ | prePullCommit | @@ -129,7 +131,7 @@ IceRepositoryWithSingleRemoteTest >> testRepositoryPullFromUnbornBranchThatDoesN self assert: self repository head commit equals: prePullCommit. ] -{ #category : #'tests-fetch' } +{ #category : 'tests-fetch' } IceRepositoryWithSingleRemoteTest >> testWithoutFetchTrackedRemoteBranchIsNotUpdated [ | newCommit | diff --git a/Iceberg-Tests/IceScpRemoteTest.class.st b/Iceberg-Tests/IceScpRemoteTest.class.st index 7b856a50cc..1ee59c73be 100644 --- a/Iceberg-Tests/IceScpRemoteTest.class.st +++ b/Iceberg-Tests/IceScpRemoteTest.class.st @@ -2,44 +2,46 @@ Unit test for IceScpRemote " Class { - #name : #IceScpRemoteTest, - #superclass : #TestCase, - #category : 'Iceberg-Tests-Core-Remotes' + #name : 'IceScpRemoteTest', + #superclass : 'TestCase', + #category : 'Iceberg-Tests-Core-Remotes', + #package : 'Iceberg-Tests', + #tag : 'Core-Remotes' } -{ #category : #support } +{ #category : 'support' } IceScpRemoteTest >> gitoliteUrl1 [ ^ 'gitolite3@server.bogus.edu:reponame' ] -{ #category : #support } +{ #category : 'support' } IceScpRemoteTest >> gitoliteUrl2 [ ^ 'ssh://gitolite3@server.bogus.edu/reponame' ] -{ #category : #tests } +{ #category : 'tests' } IceScpRemoteTest >> testCanHandleGitProtocol [ self assert: (IceGitScpRemote canHandleUrl: 'git@github.com:owner/repo.git') ] -{ #category : #tests } +{ #category : 'tests' } IceScpRemoteTest >> testCanHandleGitoliteProtocol1 [ self assert: (IceGitScpRemote canHandleUrl: self gitoliteUrl1) ] -{ #category : #tests } +{ #category : 'tests' } IceScpRemoteTest >> testCanHandleGitoliteProtocol2 [ self assert: (IceGitScpRemote canHandleUrl: self gitoliteUrl2) ] -{ #category : #tests } +{ #category : 'tests' } IceScpRemoteTest >> testCanHandleSSHProtocol [ self assert: (IceGitScpRemote canHandleUrl: 'ssh://github.com:owner/repo.git') ] -{ #category : #tests } +{ #category : 'tests' } IceScpRemoteTest >> testGitHubURL [ | remote | remote := IceGitRemote url: 'git@github.com:owner/repo.git'. @@ -50,7 +52,7 @@ IceScpRemoteTest >> testGitHubURL [ assert: remote projectName equals: 'repo'. ] -{ #category : #tests } +{ #category : 'tests' } IceScpRemoteTest >> testGitoliteURL1 [ | remote | remote := IceGitRemote url: self gitoliteUrl1. @@ -61,7 +63,7 @@ IceScpRemoteTest >> testGitoliteURL1 [ assert: remote projectName equals: 'reponame' ] -{ #category : #tests } +{ #category : 'tests' } IceScpRemoteTest >> testGitoliteURL2 [ | remote | remote := IceGitRemote url: self gitoliteUrl2. @@ -72,7 +74,7 @@ IceScpRemoteTest >> testGitoliteURL2 [ assert: remote projectName equals: 'reponame' ] -{ #category : #tests } +{ #category : 'tests' } IceScpRemoteTest >> testSameRemoteReference [ | r1 r2 | @@ -81,7 +83,7 @@ IceScpRemoteTest >> testSameRemoteReference [ self assert: (r1 referencesSameRemoteLocationAs: r2) ] -{ #category : #tests } +{ #category : 'tests' } IceScpRemoteTest >> testSameRemoteReferenceWithoutGitExtension [ | r1 r2 | @@ -90,7 +92,7 @@ IceScpRemoteTest >> testSameRemoteReferenceWithoutGitExtension [ self assert: (r1 referencesSameRemoteLocationAs: r2) ] -{ #category : #tests } +{ #category : 'tests' } IceScpRemoteTest >> testSshUrl [ | remote | remote := IceGitRemote url: 'git@github.com:npasserini/pharo-git.git'. diff --git a/Iceberg-Tests/IceSinglePackageFixture.class.st b/Iceberg-Tests/IceSinglePackageFixture.class.st index a673fefb0b..b835599320 100644 --- a/Iceberg-Tests/IceSinglePackageFixture.class.st +++ b/Iceberg-Tests/IceSinglePackageFixture.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceSinglePackageFixture, - #superclass : #IceBasicRepositoryFixture, - #category : 'Iceberg-Tests-Common-Fixtures' + #name : 'IceSinglePackageFixture', + #superclass : 'IceBasicRepositoryFixture', + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #running } +{ #category : 'running' } IceSinglePackageFixture >> setUp [ super setUp. diff --git a/Iceberg-Tests/IceSinglePackageLocalGitRepositoryTest.class.st b/Iceberg-Tests/IceSinglePackageLocalGitRepositoryTest.class.st index 48b876bbb9..6037b24786 100644 --- a/Iceberg-Tests/IceSinglePackageLocalGitRepositoryTest.class.st +++ b/Iceberg-Tests/IceSinglePackageLocalGitRepositoryTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceSinglePackageLocalGitRepositoryTest, - #superclass : #IceSinglePackageLocalRepositoryTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceSinglePackageLocalGitRepositoryTest', + #superclass : 'IceSinglePackageLocalRepositoryTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceSinglePackageLocalGitRepositoryTest >> newFixture [ ^ IceSinglePackageFixture inGit ] diff --git a/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithComplexSubdirectoryTest.class.st b/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithComplexSubdirectoryTest.class.st index 691212f3f2..ba6b3d3aad 100644 --- a/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithComplexSubdirectoryTest.class.st +++ b/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithComplexSubdirectoryTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceSinglePackageLocalGitRepositoryWithComplexSubdirectoryTest, - #superclass : #IceSinglePackageLocalRepositoryTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceSinglePackageLocalGitRepositoryWithComplexSubdirectoryTest', + #superclass : 'IceSinglePackageLocalRepositoryTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceSinglePackageLocalGitRepositoryWithComplexSubdirectoryTest >> newFixture [ ^ IceSinglePackageFixture inGit diff --git a/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithDotSubdirectoryTest.class.st b/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithDotSubdirectoryTest.class.st index 3ba9702855..c5f2831c8b 100644 --- a/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithDotSubdirectoryTest.class.st +++ b/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithDotSubdirectoryTest.class.st @@ -1,17 +1,19 @@ Class { - #name : #IceSinglePackageLocalGitRepositoryWithDotSubdirectoryTest, - #superclass : #IceSinglePackageLocalRepositoryTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceSinglePackageLocalGitRepositoryWithDotSubdirectoryTest', + #superclass : 'IceSinglePackageLocalRepositoryTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceSinglePackageLocalGitRepositoryWithDotSubdirectoryTest >> newFixture [ ^ IceSinglePackageFixture inGit subdirectory: '.'; yourself ] -{ #category : #running } +{ #category : 'running' } IceSinglePackageLocalGitRepositoryWithDotSubdirectoryTest >> testCodeSubdirectoryIsRoot [ self assert: self repository location equals: self repository subdirectoryReference diff --git a/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithLowerCasePackageTest.class.st b/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithLowerCasePackageTest.class.st index 47d785b5ae..e819bc5278 100644 --- a/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithLowerCasePackageTest.class.st +++ b/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithLowerCasePackageTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceSinglePackageLocalGitRepositoryWithLowerCasePackageTest, - #superclass : #IceSinglePackageLocalRepositoryTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceSinglePackageLocalGitRepositoryWithLowerCasePackageTest', + #superclass : 'IceSinglePackageLocalRepositoryTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceSinglePackageLocalGitRepositoryWithLowerCasePackageTest >> newFixture [ ^ IceSinglePackageFixture inGit diff --git a/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithSubdirectoryTest.class.st b/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithSubdirectoryTest.class.st index c1602ee15d..5d33056cc3 100644 --- a/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithSubdirectoryTest.class.st +++ b/Iceberg-Tests/IceSinglePackageLocalGitRepositoryWithSubdirectoryTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceSinglePackageLocalGitRepositoryWithSubdirectoryTest, - #superclass : #IceSinglePackageLocalRepositoryTest, - #category : 'Iceberg-Tests-Git' + #name : 'IceSinglePackageLocalGitRepositoryWithSubdirectoryTest', + #superclass : 'IceSinglePackageLocalRepositoryTest', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #running } +{ #category : 'running' } IceSinglePackageLocalGitRepositoryWithSubdirectoryTest >> newFixture [ ^ IceSinglePackageFixture inGit diff --git a/Iceberg-Tests/IceSinglePackageLocalMemoryRepositoryTest.class.st b/Iceberg-Tests/IceSinglePackageLocalMemoryRepositoryTest.class.st index 5c2dc91d44..27046034e5 100644 --- a/Iceberg-Tests/IceSinglePackageLocalMemoryRepositoryTest.class.st +++ b/Iceberg-Tests/IceSinglePackageLocalMemoryRepositoryTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceSinglePackageLocalMemoryRepositoryTest, - #superclass : #IceSinglePackageLocalRepositoryTest, - #category : 'Iceberg-Tests-Memory' + #name : 'IceSinglePackageLocalMemoryRepositoryTest', + #superclass : 'IceSinglePackageLocalRepositoryTest', + #category : 'Iceberg-Tests-Memory', + #package : 'Iceberg-Tests', + #tag : 'Memory' } -{ #category : #running } +{ #category : 'running' } IceSinglePackageLocalMemoryRepositoryTest >> newFixture [ ^ IceSinglePackageFixture inMemory ] diff --git a/Iceberg-Tests/IceSinglePackageLocalRepositoryTest.class.st b/Iceberg-Tests/IceSinglePackageLocalRepositoryTest.class.st index a85b82fc31..15e4c35637 100644 --- a/Iceberg-Tests/IceSinglePackageLocalRepositoryTest.class.st +++ b/Iceberg-Tests/IceSinglePackageLocalRepositoryTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #IceSinglePackageLocalRepositoryTest, - #superclass : #IceBornRepositoryTest, - #category : #'Iceberg-Tests-Common' + #name : 'IceSinglePackageLocalRepositoryTest', + #superclass : 'IceBornRepositoryTest', + #category : 'Iceberg-Tests-Common', + #package : 'Iceberg-Tests', + #tag : 'Common' } -{ #category : #testing } +{ #category : 'testing' } IceSinglePackageLocalRepositoryTest class >> isAbstract [ ^ self == IceSinglePackageLocalRepositoryTest ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testAddClassInstanceVariableIsExportedInCommit [ | diff | @@ -36,7 +38,7 @@ IceSinglePackageLocalRepositoryTest >> testAddClassInstanceVariableIsExportedInC self assert: (diff codeSubdirectoryNode / self packageName1 / 'IceGeneratedClassForTesting class') value definition name equals: #'IceGeneratedClassForTesting class'. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testAddClassInstanceVariableIsExportedInCommitSecondVariable [ | diff | @@ -69,7 +71,7 @@ IceSinglePackageLocalRepositoryTest >> testAddClassInstanceVariableIsExportedInC self assert: (diff codeSubdirectoryNode / self packageName1 / 'IceGeneratedClassForTesting class') value definition name equals: #'IceGeneratedClassForTesting class'. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testChangeClassSideMakesChangesContainClassDefinition [ | diff | @@ -93,7 +95,7 @@ IceSinglePackageLocalRepositoryTest >> testChangeClassSideMakesChangesContainCla self assert: (diff codeSubdirectoryNode / self packageName1 / 'IceGeneratedClassForTesting class') value definition name equals: #'IceGeneratedClassForTesting class'. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testChangeClassSideMakesIsExportedInCommit [ | diff | @@ -119,7 +121,7 @@ IceSinglePackageLocalRepositoryTest >> testChangeClassSideMakesIsExportedInCommi self assert: (diff codeSubdirectoryNode / self packageName1 / 'IceGeneratedClassForTesting class') value definition name equals: #'IceGeneratedClassForTesting class'. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testChangeClassSideMakesIsExportedInCommitSecondVariable [ | diff | @@ -152,7 +154,7 @@ IceSinglePackageLocalRepositoryTest >> testChangeClassSideMakesIsExportedInCommi self assert: (diff codeSubdirectoryNode / self packageName1 / 'IceGeneratedClassForTesting class') value definition name equals: #'IceGeneratedClassForTesting class'. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testChangeClassWithClassSideTraitsCompositionIsExported [ | diff | @@ -190,7 +192,7 @@ IceSinglePackageLocalRepositoryTest >> testChangeClassWithClassSideTraitsComposi ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testChangeClassWithClassSideTraitsCompositionIsExportedInSecondCommit [ | diff | @@ -247,7 +249,7 @@ IceSinglePackageLocalRepositoryTest >> testChangeClassWithClassSideTraitsComposi ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testChangeClassWithTraitsSideMakesIsExportedInCommit [ | diff | @@ -282,7 +284,7 @@ IceSinglePackageLocalRepositoryTest >> testChangeClassWithTraitsSideMakesIsExpor self assert: (diff codeSubdirectoryNode / self packageName1 / 'IceGeneratedClassForTesting class') value definition name equals: #'IceGeneratedClassForTesting class'. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testChangeClassWithTraitsSideMakesIsExportedInCommitSecondVariable [ | diff | @@ -324,7 +326,7 @@ IceSinglePackageLocalRepositoryTest >> testChangeClassWithTraitsSideMakesIsExpor self assert: (diff codeSubdirectoryNode / self packageName1 / 'IceGeneratedClassForTesting class') value definition name equals: #'IceGeneratedClassForTesting class'. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testChangeTraitWithClassSideTraitsCompositionIsExportedInSecondCommit [ | diff | @@ -379,14 +381,14 @@ IceSinglePackageLocalRepositoryTest >> testChangeTraitWithClassSideTraitsComposi ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceSinglePackageLocalRepositoryTest >> testCheckoutBranchDoesNotLeaveDetachedHead [ self repository branch checkout. self deny: self repository head isDetached ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceSinglePackageLocalRepositoryTest >> testCheckoutBranchInstallsCodeInImage [ | message | @@ -407,14 +409,14 @@ IceSinglePackageLocalRepositoryTest >> testCheckoutBranchInstallsCodeInImage [ self assertPackageExists: self packageName1. ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceSinglePackageLocalRepositoryTest >> testCheckoutBranchInstallsPackageInImage [ self repository branch checkout. self assertPackageExists: self packageName1 ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceSinglePackageLocalRepositoryTest >> testCheckoutCodeRepositoryInstallsCodeInImage [ | message | @@ -435,14 +437,14 @@ IceSinglePackageLocalRepositoryTest >> testCheckoutCodeRepositoryInstallsCodeInI self assertPackageExists: self packageName1. ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceSinglePackageLocalRepositoryTest >> testCheckoutCodeRepositoryInstallsPackageInImage [ self repository checkoutAllPackages. self assertPackageExists: self packageName1 ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceSinglePackageLocalRepositoryTest >> testCheckoutCommitInstallsCodeInImage [ | message | @@ -463,21 +465,21 @@ IceSinglePackageLocalRepositoryTest >> testCheckoutCommitInstallsCodeInImage [ self assertPackageExists: self packageName1. ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceSinglePackageLocalRepositoryTest >> testCheckoutCommitInstallsPackageInImage [ self repository branch commit checkout. self assertPackageExists: self packageName1. ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceSinglePackageLocalRepositoryTest >> testCheckoutLatestBranchCommitLeavesDetachedHead [ self repository branch commit checkout. self assert: self repository head isDetached. ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceSinglePackageLocalRepositoryTest >> testCheckoutOlderCommitLeavesRepositoryInDetachedMode [ | message | @@ -502,14 +504,14 @@ IceSinglePackageLocalRepositoryTest >> testCheckoutOlderCommitLeavesRepositoryIn self assert: self repository head isDetached ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceSinglePackageLocalRepositoryTest >> testCheckoutRepositoryDoesNotLeaveDetachedHead [ self repository checkoutAllPackages. self deny: self repository head isDetached ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceSinglePackageLocalRepositoryTest >> testCommitModificationsCreatesNewCommit [ | message | @@ -526,7 +528,7 @@ IceSinglePackageLocalRepositoryTest >> testCommitModificationsCreatesNewCommit [ self deny: self repository workingCopy isDetached. ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceSinglePackageLocalRepositoryTest >> testCommitModificationsDoNotCreateBranch [ | message | @@ -543,7 +545,7 @@ IceSinglePackageLocalRepositoryTest >> testCommitModificationsDoNotCreateBranch self deny: self repository workingCopy isDetached. ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceSinglePackageLocalRepositoryTest >> testCommitWithDetachedHeadRaisesException [ | message | @@ -559,7 +561,7 @@ IceSinglePackageLocalRepositoryTest >> testCommitWithDetachedHeadRaisesException self should: [self repository commitWithMessage: message] raise: IceWorkingCopyDesyncronized. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testCreateClassInImageMakesChangesContainClassDefinition [ | diff | @@ -576,7 +578,7 @@ IceSinglePackageLocalRepositoryTest >> testCreateClassInImageMakesChangesContain self assert: (diff codeSubdirectoryNode / self packageName1 / 'IceGeneratedClassForTesting') value definition name equals: #IceGeneratedClassForTesting. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testCreateClassInImageMakesChangesNonEmpty [ "This is a Ring working copy" @@ -586,7 +588,7 @@ IceSinglePackageLocalRepositoryTest >> testCreateClassInImageMakesChangesNonEmpt self deny: self repository workingCopyDiff isEmpty ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testCreateClassInImageMakesRespositoryModifications [ "This is a Ring working copy" @@ -596,7 +598,7 @@ IceSinglePackageLocalRepositoryTest >> testCreateClassInImageMakesRespositoryMod self assert: self repository isModified ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testCreateClassWithClassInstanceVariableInImageMakesChangesContainClassAndMetaclassDefinition [ | diff | @@ -614,7 +616,7 @@ IceSinglePackageLocalRepositoryTest >> testCreateClassWithClassInstanceVariableI self assert: (diff codeSubdirectoryNode / self packageName1 / 'IceGeneratedClassForTesting') value definition name equals: #IceGeneratedClassForTesting. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testCreateExtensionMethodMakesExtensionMethodAsAddition [ | diff | @@ -634,13 +636,13 @@ IceSinglePackageLocalRepositoryTest >> testCreateExtensionMethodMakesExtensionMe self assert: (diff codeSubdirectoryNode / self packageName1 / 'ToBeExtended' / 'method') value definition isMethodDefinition. ] -{ #category : #'tests-queries' } +{ #category : 'tests-queries' } IceSinglePackageLocalRepositoryTest >> testCurrentBranchIsDefaultMasterBranch [ self assert: self repository branch name equals: 'master' ] -{ #category : #'tests-commit' } +{ #category : 'tests-commit' } IceSinglePackageLocalRepositoryTest >> testDetachedHeadCannotCommit [ self repository branch commit checkout. @@ -648,7 +650,7 @@ IceSinglePackageLocalRepositoryTest >> testDetachedHeadCannotCommit [ self should: [self repository validateCanCommit] raise: IceWorkingCopyDesyncronized. ] -{ #category : #'tests-queries' } +{ #category : 'tests-queries' } IceSinglePackageLocalRepositoryTest >> testListBranchCommitsListsCommitsInBranch [ | branches commits | @@ -659,7 +661,7 @@ IceSinglePackageLocalRepositoryTest >> testListBranchCommitsListsCommitsInBranch self assert: commits first comment equals: 'Initial commit'. ] -{ #category : #'tests-queries' } +{ #category : 'tests-queries' } IceSinglePackageLocalRepositoryTest >> testListBranchesListsExistingBranches [ | branches | @@ -668,7 +670,7 @@ IceSinglePackageLocalRepositoryTest >> testListBranchesListsExistingBranches [ self assert: branches first name equals: 'master' ] -{ #category : #'tests-queries' } +{ #category : 'tests-queries' } IceSinglePackageLocalRepositoryTest >> testListPackagesListExistingPackage [ | packages | @@ -677,19 +679,19 @@ IceSinglePackageLocalRepositoryTest >> testListPackagesListExistingPackage [ self assert: packages first equals: self packageName1 ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testNoChangesInImageMakesChangesEmpty [ self assert: self repository workingCopyDiff isEmpty ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testNoChangesInImageMakesNoModifications [ self deny: self repository isModified ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testRemoveClassInstanceVariableIsExportedInCommit [ | diff | @@ -722,7 +724,7 @@ IceSinglePackageLocalRepositoryTest >> testRemoveClassInstanceVariableIsExported self assert: (diff codeSubdirectoryNode / self packageName1 / 'IceGeneratedClassForTesting class') value definition name equals: #'IceGeneratedClassForTesting class'. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testRemoveClassWithClassMethodIsExportedInCommit [ | diff | @@ -749,7 +751,7 @@ IceSinglePackageLocalRepositoryTest >> testRemoveClassWithClassMethodIsExportedI self assert: (diff codeSubdirectoryNode / self packageName1 / 'IceGeneratedClassForTesting class' / 'foo') value isRemoval. ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testRemoveExtensionMethodDoesNotRemoveExtendedClass [ | commitWithExtension commitWithoutExtension | @@ -777,7 +779,7 @@ IceSinglePackageLocalRepositoryTest >> testRemoveExtensionMethodDoesNotRemoveExt self assertClassExists: #ToBeExtended ] -{ #category : #'tests-changes' } +{ #category : 'tests-changes' } IceSinglePackageLocalRepositoryTest >> testRemoveExtensionMethodMakesExtensionRemoval [ | diff | @@ -805,7 +807,7 @@ IceSinglePackageLocalRepositoryTest >> testRemoveExtensionMethodMakesExtensionRe self assert: (diff codeSubdirectoryNode / self packageName1 / 'ToBeExtended' / 'method') value definition isMethodDefinition. ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceSinglePackageLocalRepositoryTest >> testRemovePackageRemovesIt [ | package | @@ -815,7 +817,7 @@ IceSinglePackageLocalRepositoryTest >> testRemovePackageRemovesIt [ self assert: (self repository workingCopyDiff codeSubdirectoryNode / self packageName1) value isRemoval ] -{ #category : #'tests-revert' } +{ #category : 'tests-revert' } IceSinglePackageLocalRepositoryTest >> testRevertAllRevertsClassAddition [ | className | @@ -831,7 +833,7 @@ IceSinglePackageLocalRepositoryTest >> testRevertAllRevertsClassAddition [ self denyClassExists: className. ] -{ #category : #'tests-revert' } +{ #category : 'tests-revert' } IceSinglePackageLocalRepositoryTest >> testRevertAllRevertsClassRemoval [ | className | @@ -852,7 +854,7 @@ IceSinglePackageLocalRepositoryTest >> testRevertAllRevertsClassRemoval [ self assertClassExists: className. ] -{ #category : #'tests-revert' } +{ #category : 'tests-revert' } IceSinglePackageLocalRepositoryTest >> testRevertAllRevertsClassSlotModification [ | className class | @@ -878,7 +880,7 @@ IceSinglePackageLocalRepositoryTest >> testRevertAllRevertsClassSlotModification environment ask behaviorNamed: className) instVarNames includes: #slot). ] -{ #category : #'tests-revert' } +{ #category : 'tests-revert' } IceSinglePackageLocalRepositoryTest >> testRevertAllRevertsMethodAddition [ | className | @@ -899,7 +901,7 @@ IceSinglePackageLocalRepositoryTest >> testRevertAllRevertsMethodAddition [ self denyMethodExists: 'method' inClass: className. ] -{ #category : #'tests-revert' } +{ #category : 'tests-revert' } IceSinglePackageLocalRepositoryTest >> testRevertAllRevertsMethodModification [ | className | @@ -929,7 +931,7 @@ IceSinglePackageLocalRepositoryTest >> testRevertAllRevertsMethodModification [ equals: 'method' ] -{ #category : #'tests-revert' } +{ #category : 'tests-revert' } IceSinglePackageLocalRepositoryTest >> testRevertAllRevertsMethodRemoval [ | className | @@ -953,7 +955,7 @@ IceSinglePackageLocalRepositoryTest >> testRevertAllRevertsMethodRemoval [ self assertMethodExists: 'method' inClass: className. ] -{ #category : #'tests-revert' } +{ #category : 'tests-revert' } IceSinglePackageLocalRepositoryTest >> testRevertSingleDefinitionRevertsClassAddition [ | className | @@ -969,7 +971,7 @@ IceSinglePackageLocalRepositoryTest >> testRevertSingleDefinitionRevertsClassAdd self denyClassExists: className. ] -{ #category : #'tests-revert' } +{ #category : 'tests-revert' } IceSinglePackageLocalRepositoryTest >> testRevertSingleDefinitionRevertsClassRemoval [ | className | @@ -990,7 +992,7 @@ IceSinglePackageLocalRepositoryTest >> testRevertSingleDefinitionRevertsClassRem self assertClassExists: className. ] -{ #category : #'tests-revert' } +{ #category : 'tests-revert' } IceSinglePackageLocalRepositoryTest >> testRevertSingleDefinitionRevertsClassSlotModification [ | className class | @@ -1016,7 +1018,7 @@ IceSinglePackageLocalRepositoryTest >> testRevertSingleDefinitionRevertsClassSlo environment ask behaviorNamed: className) instVarNames includes: #slot). ] -{ #category : #'tests-revert' } +{ #category : 'tests-revert' } IceSinglePackageLocalRepositoryTest >> testRevertSingleDefinitionRevertsMethodAddition [ | className | @@ -1037,7 +1039,7 @@ IceSinglePackageLocalRepositoryTest >> testRevertSingleDefinitionRevertsMethodAd self denyMethodExists: 'method' inClass: className. ] -{ #category : #'tests-revert' } +{ #category : 'tests-revert' } IceSinglePackageLocalRepositoryTest >> testRevertSingleDefinitionRevertsMethodModification [ | className | @@ -1067,7 +1069,7 @@ IceSinglePackageLocalRepositoryTest >> testRevertSingleDefinitionRevertsMethodMo equals: 'method' ] -{ #category : #'tests-revert' } +{ #category : 'tests-revert' } IceSinglePackageLocalRepositoryTest >> testRevertSingleDefinitionRevertsMethodRemoval [ | className | @@ -1091,7 +1093,7 @@ IceSinglePackageLocalRepositoryTest >> testRevertSingleDefinitionRevertsMethodRe self assertMethodExists: 'method' inClass: className. ] -{ #category : #'tests-checkout' } +{ #category : 'tests-checkout' } IceSinglePackageLocalRepositoryTest >> testUnloadDoesNotRemovePackage [ | package | diff --git a/Iceberg-Tests/IceTestDefinition.class.st b/Iceberg-Tests/IceTestDefinition.class.st index b34bce7170..2228369635 100644 --- a/Iceberg-Tests/IceTestDefinition.class.st +++ b/Iceberg-Tests/IceTestDefinition.class.st @@ -1,13 +1,15 @@ Class { - #name : #IceTestDefinition, - #superclass : #IceDefinition, + #name : 'IceTestDefinition', + #superclass : 'IceDefinition', #instVars : [ 'contents' ], - #category : 'Iceberg-Tests-Changes' + #category : 'Iceberg-Tests-Changes', + #package : 'Iceberg-Tests', + #tag : 'Changes' } -{ #category : #'as yet unclassified' } +{ #category : 'as yet unclassified' } IceTestDefinition class >> named: aString contents: aContensts [ ^ self new @@ -16,32 +18,32 @@ IceTestDefinition class >> named: aString contents: aContensts [ yourself ] -{ #category : #comparing } +{ #category : 'comparing' } IceTestDefinition >> = aTestDefinition [ ^ super = aTestDefinition and: [ contents = aTestDefinition contents ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceTestDefinition >> contents [ ^ contents ] -{ #category : #accessing } +{ #category : 'accessing' } IceTestDefinition >> contents: aString [ contents := aString ] -{ #category : #comparing } +{ #category : 'comparing' } IceTestDefinition >> hash [ ^ super hash + contents hash ] -{ #category : #initialization } +{ #category : 'initialization' } IceTestDefinition >> initialize [ super initialize. name := 'test' diff --git a/Iceberg-Tests/IceTestParameter.class.st b/Iceberg-Tests/IceTestParameter.class.st index 8829feb960..bb435b5cdd 100644 --- a/Iceberg-Tests/IceTestParameter.class.st +++ b/Iceberg-Tests/IceTestParameter.class.st @@ -2,20 +2,22 @@ I represent a test parameter, including a set of possible values for each parameter. See ParameterizedTest for more information about usage. " Class { - #name : #IceTestParameter, - #superclass : #Object, + #name : 'IceTestParameter', + #superclass : 'Object', #instVars : [ 'options' ], - #category : 'Iceberg-Tests-Base' + #category : 'Iceberg-Tests-Base', + #package : 'Iceberg-Tests', + #tag : 'Base' } -{ #category : #'instance creation' } +{ #category : 'instance creation' } IceTestParameter class >> withOptions: aCollection [ ^ self new options: (aCollection collect: #asTestParameterValue); yourself ] -{ #category : #'instance creation' } +{ #category : 'instance creation' } IceTestParameter class >> withOptions: aCollection on: target selector: selector [ ^ self new options: (aCollection collect: [:value | @@ -26,17 +28,17 @@ IceTestParameter class >> withOptions: aCollection on: target selector: selector yourself ] -{ #category : #accessing } +{ #category : 'accessing' } IceTestParameter >> options [ ^ options ] -{ #category : #accessing } +{ #category : 'accessing' } IceTestParameter >> options: anObject [ options := anObject ] -{ #category : #printing } +{ #category : 'printing' } IceTestParameter >> printOn: aStream [ aStream print: self class; diff --git a/Iceberg-Tests/IceTestParameterValue.class.st b/Iceberg-Tests/IceTestParameterValue.class.st index 3ef6462909..5dc23d9550 100644 --- a/Iceberg-Tests/IceTestParameterValue.class.st +++ b/Iceberg-Tests/IceTestParameterValue.class.st @@ -18,44 +18,46 @@ Internal Representation and Key Implementation Points. " Class { - #name : #IceTestParameterValue, - #superclass : #Object, + #name : 'IceTestParameterValue', + #superclass : 'Object', #instVars : [ 'value', 'target', 'selector', 'previousValue' ], - #category : 'Iceberg-Tests-Base' + #category : 'Iceberg-Tests-Base', + #package : 'Iceberg-Tests', + #tag : 'Base' } -{ #category : #activating } +{ #category : 'activating' } IceTestParameterValue >> activate [ self previousValue: self getValue. self setValue: self value ] -{ #category : #activating } +{ #category : 'activating' } IceTestParameterValue >> deactivate [ self setValue: self previousValue ] -{ #category : #activating } +{ #category : 'activating' } IceTestParameterValue >> getValue [ ^ self target perform: self selector ] -{ #category : #accessing } +{ #category : 'accessing' } IceTestParameterValue >> previousValue [ ^ previousValue ] -{ #category : #accessing } +{ #category : 'accessing' } IceTestParameterValue >> previousValue: anObject [ previousValue := anObject ] -{ #category : #printing } +{ #category : 'printing' } IceTestParameterValue >> printOn: aStream [ aStream print: self class; @@ -64,44 +66,44 @@ IceTestParameterValue >> printOn: aStream [ nextPut: $) ] -{ #category : #accessing } +{ #category : 'accessing' } IceTestParameterValue >> selector [ ^ selector ] -{ #category : #accessing } +{ #category : 'accessing' } IceTestParameterValue >> selector: anObject [ selector := anObject ] -{ #category : #activating } +{ #category : 'activating' } IceTestParameterValue >> setValue: newValue [ ^ self target perform: self selector asMutator with: newValue ] -{ #category : #printing } +{ #category : 'printing' } IceTestParameterValue >> shortName [ ^ (self value respondsTo: #shortName) ifTrue: [ self value shortName ] ifFalse: [ self value printString ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceTestParameterValue >> target [ ^ target ] -{ #category : #accessing } +{ #category : 'accessing' } IceTestParameterValue >> target: anObject [ target := anObject ] -{ #category : #accessing } +{ #category : 'accessing' } IceTestParameterValue >> value [ ^ value ] -{ #category : #accessing } +{ #category : 'accessing' } IceTestParameterValue >> value: anObject [ value := anObject ] diff --git a/Iceberg-Tests/IceTraitsCherryPickingTest.class.st b/Iceberg-Tests/IceTraitsCherryPickingTest.class.st index 7cf8ca36e1..aae53d3007 100644 --- a/Iceberg-Tests/IceTraitsCherryPickingTest.class.st +++ b/Iceberg-Tests/IceTraitsCherryPickingTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceTraitsCherryPickingTest, - #superclass : #IceCherryPickingTest, - #category : #'Iceberg-Tests-Cherrypicking' + #name : 'IceTraitsCherryPickingTest', + #superclass : 'IceCherryPickingTest', + #category : 'Iceberg-Tests-Cherrypicking', + #package : 'Iceberg-Tests', + #tag : 'Cherrypicking' } -{ #category : #tests } +{ #category : 'tests' } IceTraitsCherryPickingTest >> testAddTraitDependingInATrait [ | commitToCherryPick diff mergeTree | self repository createBranch: 'b2'. @@ -62,7 +64,7 @@ IceTraitsCherryPickingTest >> testAddTraitDependingInATrait [ equals: 0 ] -{ #category : #tests } +{ #category : 'tests' } IceTraitsCherryPickingTest >> testRemoveTraitUsedByAClass [ | commitToCherryPick diff mergeTree | self repository workingCopy @@ -102,7 +104,7 @@ IceTraitsCherryPickingTest >> testRemoveTraitUsedByAClass [ assert: (diff / self packageName1 / 'TestClassUsingTrait') value isRemoval ] -{ #category : #tests } +{ #category : 'tests' } IceTraitsCherryPickingTest >> testRemoveTraitUsedByATrait [ | commitToCherryPick diff mergeTree | self repository workingCopy diff --git a/Iceberg-Tests/IceTreeConstructionTests.class.st b/Iceberg-Tests/IceTreeConstructionTests.class.st index 43e59570d8..3816f38482 100644 --- a/Iceberg-Tests/IceTreeConstructionTests.class.st +++ b/Iceberg-Tests/IceTreeConstructionTests.class.st @@ -1,22 +1,24 @@ Class { - #name : #IceTreeConstructionTests, - #superclass : #TestCase, - #category : 'Iceberg-Tests-Changes' + #name : 'IceTreeConstructionTests', + #superclass : 'TestCase', + #category : 'Iceberg-Tests-Changes', + #package : 'Iceberg-Tests', + #tag : 'Changes' } -{ #category : #helpers } +{ #category : 'helpers' } IceTreeConstructionTests >> includesPackageNamed: aString [ ^ aString = 'MonticelloMocks' ] -{ #category : #helpers } +{ #category : 'helpers' } IceTreeConstructionTests >> snapshotForPackage: anIcePackage [ ^ anIcePackage name asPackage mcWorkingCopy snapshot ] -{ #category : #tests } +{ #category : 'tests' } IceTreeConstructionTests >> testCreateDirectoryWithDirectory [ | tree child | @@ -27,7 +29,7 @@ IceTreeConstructionTests >> testCreateDirectoryWithDirectory [ self assert: (tree / 'src' / 'tmp') value isDirectoryDefinition ] -{ #category : #tests } +{ #category : 'tests' } IceTreeConstructionTests >> testCreateDirectoryWithFile [ | tree child | @@ -38,7 +40,7 @@ IceTreeConstructionTests >> testCreateDirectoryWithFile [ self assert: (tree / 'src' / 'tmp') value isFileDefinition ] -{ #category : #tests } +{ #category : 'tests' } IceTreeConstructionTests >> testCreateDirectoryWithPackage [ | tree importer child | @@ -63,7 +65,7 @@ IceTreeConstructionTests >> testCreateDirectoryWithPackage [ self assert: (tree / 'src' / 'MonticelloMocks' / 'MCSnapshotTest' / 'mockClassExtension') value isMethodDefinition. ] -{ #category : #tests } +{ #category : 'tests' } IceTreeConstructionTests >> testCreateTreeWithDirectory [ | tree | @@ -73,7 +75,7 @@ IceTreeConstructionTests >> testCreateTreeWithDirectory [ self assert: (tree / 'src') value isDirectoryDefinition ] -{ #category : #tests } +{ #category : 'tests' } IceTreeConstructionTests >> testCreateTreeWithFile [ | tree | @@ -83,7 +85,7 @@ IceTreeConstructionTests >> testCreateTreeWithFile [ self assert: (tree / 'Readme.md') value isFileDefinition ] -{ #category : #tests } +{ #category : 'tests' } IceTreeConstructionTests >> testCreateTreeWithPackage [ | tree importer | @@ -107,7 +109,7 @@ IceTreeConstructionTests >> testCreateTreeWithPackage [ self assert: (tree / 'MonticelloMocks' / 'MCSnapshotTest' / 'mockClassExtension') value isMethodDefinition. ] -{ #category : #tests } +{ #category : 'tests' } IceTreeConstructionTests >> testEmptyTreeIsRootNode [ | tree | diff --git a/Iceberg-Tests/IceTreeMergeTests.class.st b/Iceberg-Tests/IceTreeMergeTests.class.st index 23821a149e..530b765c89 100644 --- a/Iceberg-Tests/IceTreeMergeTests.class.st +++ b/Iceberg-Tests/IceTreeMergeTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceTreeMergeTests, - #superclass : #TestCase, - #category : 'Iceberg-Tests-Changes' + #name : 'IceTreeMergeTests', + #superclass : 'TestCase', + #category : 'Iceberg-Tests-Changes', + #package : 'Iceberg-Tests', + #tag : 'Changes' } -{ #category : #'test-removals' } +{ #category : 'test-removals' } IceTreeMergeTests >> buildTestTreeWithOperation: anOperation [ ^ (IceNode value: (IceNoModification definition: IceRootDefinition new)) @@ -12,7 +14,7 @@ IceTreeMergeTests >> buildTestTreeWithOperation: anOperation [ yourself ] -{ #category : #'test-removals' } +{ #category : 'test-removals' } IceTreeMergeTests >> testConflictingModificationWithRemoval [ | rightTree leftTree mergedTree conflictOperation | @@ -31,7 +33,7 @@ IceTreeMergeTests >> testConflictingModificationWithRemoval [ self assert: conflictOperation rightContents equals: ''. ] -{ #category : #'test-removals' } +{ #category : 'test-removals' } IceTreeMergeTests >> testConflictingNoModificationWithRemoval [ | rightTree leftTree mergedTree conflictOperation | @@ -48,7 +50,7 @@ IceTreeMergeTests >> testConflictingNoModificationWithRemoval [ self assert: conflictOperation rightContents equals: ''. ] -{ #category : #'test-removals' } +{ #category : 'test-removals' } IceTreeMergeTests >> testConflictingRemovalWithModification [ | rightTree leftTree mergedTree conflictOperation | @@ -68,7 +70,7 @@ IceTreeMergeTests >> testConflictingRemovalWithModification [ self assert: conflictOperation rightContents equals: 'new'. ] -{ #category : #'test-removals' } +{ #category : 'test-removals' } IceTreeMergeTests >> testConflictingRemovalWithNoModification [ | rightTree leftTree mergedTree conflictOperation | @@ -85,7 +87,7 @@ IceTreeMergeTests >> testConflictingRemovalWithNoModification [ self assert: conflictOperation rightContents equals: 'old'. ] -{ #category : #'test-additions' } +{ #category : 'test-additions' } IceTreeMergeTests >> testMergeConflictingAdditions [ | rightTree leftTree mergedTree conflictOperation | @@ -102,7 +104,7 @@ IceTreeMergeTests >> testMergeConflictingAdditions [ self assert: conflictOperation rightContents equals: 'new2'. ] -{ #category : #'tests-basic' } +{ #category : 'tests-basic' } IceTreeMergeTests >> testMergeEmptyRootNodesReturnsNewEmptyRootNode [ | rightTree leftTree mergedTree | @@ -112,7 +114,7 @@ IceTreeMergeTests >> testMergeEmptyRootNodesReturnsNewEmptyRootNode [ self assert: mergedTree isEmpty. ] -{ #category : #'test-removals' } +{ #category : 'test-removals' } IceTreeMergeTests >> testMergeTwoEqualAdditionsIsNoModification [ | rightTree leftTree mergedTree operation | @@ -126,7 +128,7 @@ IceTreeMergeTests >> testMergeTwoEqualAdditionsIsNoModification [ self deny: operation chosenOperation isModification. ] -{ #category : #'test-removals' } +{ #category : 'test-removals' } IceTreeMergeTests >> testMergeTwoEqualRemovalsIsNoModification [ | rightTree leftTree mergedTree operation | @@ -140,7 +142,7 @@ IceTreeMergeTests >> testMergeTwoEqualRemovalsIsNoModification [ self deny: operation chosenOperation isModification. ] -{ #category : #'test-modifications' } +{ #category : 'test-modifications' } IceTreeMergeTests >> testMergeTwoModificationsToDifferentDefinitionsInverseIsConflict [ | rightTree leftTree mergedTree conflictOperation | @@ -159,7 +161,7 @@ IceTreeMergeTests >> testMergeTwoModificationsToDifferentDefinitionsInverseIsCon self assert: conflictOperation leftContents equals: 'new'. ] -{ #category : #'test-modifications' } +{ #category : 'test-modifications' } IceTreeMergeTests >> testMergeTwoModificationsToDifferentDefinitionsIsConflict [ | rightTree leftTree mergedTree conflictOperation | @@ -179,7 +181,7 @@ IceTreeMergeTests >> testMergeTwoModificationsToDifferentDefinitionsIsConflict [ self assert: conflictOperation rightContents equals: 'old'. ] -{ #category : #'test-modifications' } +{ #category : 'test-modifications' } IceTreeMergeTests >> testMergeTwoModificationsToTheSameDefinitionIsNoModification [ | rightTree leftTree mergedTree operation | diff --git a/Iceberg-Tests/IceTreeTests.class.st b/Iceberg-Tests/IceTreeTests.class.st index 7343ccd4ef..78e0a488de 100644 --- a/Iceberg-Tests/IceTreeTests.class.st +++ b/Iceberg-Tests/IceTreeTests.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceTreeTests, - #superclass : #TestCase, - #category : 'Iceberg-Tests-Changes' + #name : 'IceTreeTests', + #superclass : 'TestCase', + #category : 'Iceberg-Tests-Changes', + #package : 'Iceberg-Tests', + #tag : 'Changes' } -{ #category : #tests } +{ #category : 'tests' } IceTreeTests >> testDetectFoundElement [ | selected | @@ -13,12 +15,12 @@ IceTreeTests >> testDetectFoundElement [ self assert: selected equals: 2 ] -{ #category : #tests } +{ #category : 'tests' } IceTreeTests >> testDetectNotFoundElement [ self should: [ (IceNode value: 1) detect: [ :e | e value even ] ] raise: NotFound ] -{ #category : #tests } +{ #category : 'tests' } IceTreeTests >> testSelect [ | selected | diff --git a/Iceberg-Tests/IceUnbornProjectFixture.class.st b/Iceberg-Tests/IceUnbornProjectFixture.class.st index b3d5bd58ed..ba5d2ec21e 100644 --- a/Iceberg-Tests/IceUnbornProjectFixture.class.st +++ b/Iceberg-Tests/IceUnbornProjectFixture.class.st @@ -1,16 +1,18 @@ Class { - #name : #IceUnbornProjectFixture, - #superclass : #IceSinglePackageFixture, - #category : 'Iceberg-Tests-Common-Fixtures' + #name : 'IceUnbornProjectFixture', + #superclass : 'IceSinglePackageFixture', + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #running } +{ #category : 'running' } IceUnbornProjectFixture >> isUnbornProjectFixture [ ^ true ] -{ #category : #running } +{ #category : 'running' } IceUnbornProjectFixture >> setUp [ super setUp. diff --git a/Iceberg-Tests/IceUnknownCommitRepositoryTest.class.st b/Iceberg-Tests/IceUnknownCommitRepositoryTest.class.st index 1c7fed5678..9e550e0b05 100644 --- a/Iceberg-Tests/IceUnknownCommitRepositoryTest.class.st +++ b/Iceberg-Tests/IceUnknownCommitRepositoryTest.class.st @@ -1,16 +1,18 @@ Class { - #name : #IceUnknownCommitRepositoryTest, - #superclass : #IceAbstractTestCase, - #category : 'Iceberg-Tests-Common' + #name : 'IceUnknownCommitRepositoryTest', + #superclass : 'IceAbstractTestCase', + #category : 'Iceberg-Tests-Common', + #package : 'Iceberg-Tests', + #tag : 'Common' } -{ #category : #testing } +{ #category : 'testing' } IceUnknownCommitRepositoryTest class >> isAbstract [ ^ self == IceUnknownCommitRepositoryTest ] -{ #category : #running } +{ #category : 'running' } IceUnknownCommitRepositoryTest >> testFetchFixesUnknownCommit [ self repository fetch. @@ -18,13 +20,13 @@ IceUnknownCommitRepositoryTest >> testFetchFixesUnknownCommit [ self assert: self repository workingCopy workingCopyState isSingleCommitState ] -{ #category : #running } +{ #category : 'running' } IceUnknownCommitRepositoryTest >> testReferenceCommitIsUnknown [ self assert: self repository workingCopy referenceCommit isUnknownCommit ] -{ #category : #running } +{ #category : 'running' } IceUnknownCommitRepositoryTest >> testWorkingCopyIsUnknownVersionWorkingCopy [ self assert: self repository workingCopy workingCopyState isUnknownCommitState diff --git a/Iceberg-Tests/IceUrlBuilderTest.class.st b/Iceberg-Tests/IceUrlBuilderTest.class.st index 8c8cf0e95b..6798ad9769 100644 --- a/Iceberg-Tests/IceUrlBuilderTest.class.st +++ b/Iceberg-Tests/IceUrlBuilderTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceUrlBuilderTest, - #superclass : #TestCase, - #category : 'Iceberg-Tests-Git' + #name : 'IceUrlBuilderTest', + #superclass : 'TestCase', + #category : 'Iceberg-Tests-Git', + #package : 'Iceberg-Tests', + #tag : 'Git' } -{ #category : #tests } +{ #category : 'tests' } IceUrlBuilderTest >> testArbitraryHttpsUrl [ | url | @@ -17,7 +19,7 @@ IceUrlBuilderTest >> testArbitraryHttpsUrl [ self assert: url equals: 'https://localhost/repo.git' ] -{ #category : #tests } +{ #category : 'tests' } IceUrlBuilderTest >> testArbitrarySSHUrl [ | url | @@ -30,7 +32,7 @@ IceUrlBuilderTest >> testArbitrarySSHUrl [ self assert: url equals: 'git@localhost:repo.git' ] -{ #category : #tests } +{ #category : 'tests' } IceUrlBuilderTest >> testBitbucketHttpsUrl [ | url | @@ -43,7 +45,7 @@ IceUrlBuilderTest >> testBitbucketHttpsUrl [ self assert: url equals: 'https://bitbucket.org/username/project.git' ] -{ #category : #tests } +{ #category : 'tests' } IceUrlBuilderTest >> testBitbucketSSHUrl [ | url | @@ -56,7 +58,7 @@ IceUrlBuilderTest >> testBitbucketSSHUrl [ self assert: url equals: 'git@bitbucket.org:username/project.git' ] -{ #category : #tests } +{ #category : 'tests' } IceUrlBuilderTest >> testExplicitHttpsProtocolUrl [ | url | @@ -69,7 +71,7 @@ IceUrlBuilderTest >> testExplicitHttpsProtocolUrl [ self assert: url equals: 'https://localhost/repo.git' ] -{ #category : #tests } +{ #category : 'tests' } IceUrlBuilderTest >> testExplicitSSHProtocolUrl [ | url | @@ -82,7 +84,7 @@ IceUrlBuilderTest >> testExplicitSSHProtocolUrl [ self assert: url equals: 'git@localhost:repo.git' ] -{ #category : #tests } +{ #category : 'tests' } IceUrlBuilderTest >> testGitHubHttpsUrl [ | url | @@ -95,7 +97,7 @@ IceUrlBuilderTest >> testGitHubHttpsUrl [ self assert: url equals: 'https://github.com/username/project.git' ] -{ #category : #tests } +{ #category : 'tests' } IceUrlBuilderTest >> testGitHubSSHUrl [ | url | @@ -108,7 +110,7 @@ IceUrlBuilderTest >> testGitHubSSHUrl [ self assert: url equals: 'git@github.com:username/project.git' ] -{ #category : #tests } +{ #category : 'tests' } IceUrlBuilderTest >> testGitLabHttpsUrl [ | url | @@ -121,7 +123,7 @@ IceUrlBuilderTest >> testGitLabHttpsUrl [ self assert: url equals: 'https://gitlab.com/username/project.git' ] -{ #category : #tests } +{ #category : 'tests' } IceUrlBuilderTest >> testGitLabSSHUrl [ | url | diff --git a/Iceberg-Tests/IceWithRemoteAndLocalCommitAndUpstreamFixture.class.st b/Iceberg-Tests/IceWithRemoteAndLocalCommitAndUpstreamFixture.class.st index c71e632103..6af7c7a28c 100644 --- a/Iceberg-Tests/IceWithRemoteAndLocalCommitAndUpstreamFixture.class.st +++ b/Iceberg-Tests/IceWithRemoteAndLocalCommitAndUpstreamFixture.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceWithRemoteAndLocalCommitAndUpstreamFixture, - #superclass : #IceWithRemoteAndLocalCommitFixture, - #category : #'Iceberg-Tests-Common-Fixtures' + #name : 'IceWithRemoteAndLocalCommitAndUpstreamFixture', + #superclass : 'IceWithRemoteAndLocalCommitFixture', + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #running } +{ #category : 'running' } IceWithRemoteAndLocalCommitAndUpstreamFixture >> setUp [ super setUp. repository branch setUpstream: remoteRepository branch. diff --git a/Iceberg-Tests/IceWithRemoteAndLocalCommitFixture.class.st b/Iceberg-Tests/IceWithRemoteAndLocalCommitFixture.class.st index 74f79571f9..d6ed37a2ab 100644 --- a/Iceberg-Tests/IceWithRemoteAndLocalCommitFixture.class.st +++ b/Iceberg-Tests/IceWithRemoteAndLocalCommitFixture.class.st @@ -1,35 +1,37 @@ Class { - #name : #IceWithRemoteAndLocalCommitFixture, - #superclass : #IceBasicRepositoryFixture, + #name : 'IceWithRemoteAndLocalCommitFixture', + #superclass : 'IceBasicRepositoryFixture', #instVars : [ 'remote', 'remoteBranchName' ], - #category : #'Iceberg-Tests-Common-Fixtures' + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #accessing } +{ #category : 'accessing' } IceWithRemoteAndLocalCommitFixture >> remote [ ^ remote ] -{ #category : #accessing } +{ #category : 'accessing' } IceWithRemoteAndLocalCommitFixture >> remoteBranchName [ ^ remoteBranchName ifNil: [ remoteBranchName := 'master' ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceWithRemoteAndLocalCommitFixture >> remoteBranchName: aBranchName [ remoteBranchName := aBranchName ] -{ #category : #accessing } +{ #category : 'accessing' } IceWithRemoteAndLocalCommitFixture >> remoteRepository [ ^ remoteRepository ] -{ #category : #running } +{ #category : 'running' } IceWithRemoteAndLocalCommitFixture >> setUp [ super setUp. remoteRepository := self ensureRemoteRepository. diff --git a/Iceberg-Tests/IceWithRemoteAndMergeConflictFixture.class.st b/Iceberg-Tests/IceWithRemoteAndMergeConflictFixture.class.st index 0fa00a3299..79c3f1d4ff 100644 --- a/Iceberg-Tests/IceWithRemoteAndMergeConflictFixture.class.st +++ b/Iceberg-Tests/IceWithRemoteAndMergeConflictFixture.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceWithRemoteAndMergeConflictFixture, - #superclass : #IceWithRemoteFixture, - #category : 'Iceberg-Tests-Common-Fixtures' + #name : 'IceWithRemoteAndMergeConflictFixture', + #superclass : 'IceWithRemoteFixture', + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #running } +{ #category : 'running' } IceWithRemoteAndMergeConflictFixture >> setUp [ super setUp. diff --git a/Iceberg-Tests/IceWithRemoteAndUnknownCommitFixture.class.st b/Iceberg-Tests/IceWithRemoteAndUnknownCommitFixture.class.st index a024bd2fdc..1ade452c5d 100644 --- a/Iceberg-Tests/IceWithRemoteAndUnknownCommitFixture.class.st +++ b/Iceberg-Tests/IceWithRemoteAndUnknownCommitFixture.class.st @@ -1,10 +1,12 @@ Class { - #name : #IceWithRemoteAndUnknownCommitFixture, - #superclass : #IceWithRemoteFixture, - #category : 'Iceberg-Tests-Common-Fixtures' + #name : 'IceWithRemoteAndUnknownCommitFixture', + #superclass : 'IceWithRemoteFixture', + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #running } +{ #category : 'running' } IceWithRemoteAndUnknownCommitFixture >> setUp [ super setUp. diff --git a/Iceberg-Tests/IceWithRemoteFixture.class.st b/Iceberg-Tests/IceWithRemoteFixture.class.st index 2dafc0be23..ac084576af 100644 --- a/Iceberg-Tests/IceWithRemoteFixture.class.st +++ b/Iceberg-Tests/IceWithRemoteFixture.class.st @@ -1,35 +1,37 @@ Class { - #name : #IceWithRemoteFixture, - #superclass : #IceBasicRepositoryFixture, + #name : 'IceWithRemoteFixture', + #superclass : 'IceBasicRepositoryFixture', #instVars : [ 'remote', 'remoteBranchName' ], - #category : 'Iceberg-Tests-Common-Fixtures' + #category : 'Iceberg-Tests-Common-Fixtures', + #package : 'Iceberg-Tests', + #tag : 'Common-Fixtures' } -{ #category : #accessing } +{ #category : 'accessing' } IceWithRemoteFixture >> remote [ ^ remote ] -{ #category : #accessing } +{ #category : 'accessing' } IceWithRemoteFixture >> remoteBranchName [ ^ remoteBranchName ifNil: [ remoteBranchName := 'master' ] ] -{ #category : #accessing } +{ #category : 'accessing' } IceWithRemoteFixture >> remoteBranchName: aBranchName [ remoteBranchName := aBranchName ] -{ #category : #accessing } +{ #category : 'accessing' } IceWithRemoteFixture >> remoteRepository [ ^ remoteRepository ] -{ #category : #running } +{ #category : 'running' } IceWithRemoteFixture >> setUp [ super setUp. remoteRepository := self ensureRemoteRepository. diff --git a/Iceberg-Tests/MCClassDefinition.extension.st b/Iceberg-Tests/MCClassDefinition.extension.st index 90e54c3283..a8f54d3426 100644 --- a/Iceberg-Tests/MCClassDefinition.extension.st +++ b/Iceberg-Tests/MCClassDefinition.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #MCClassDefinition } +Extension { #name : 'MCClassDefinition' } -{ #category : #'*Iceberg-Tests' } +{ #category : '*Iceberg-Tests' } MCClassDefinition >> ensureRing2DefinitionIn: aRG2Environment package: aRG2PackageDefinition [ | def | diff --git a/Iceberg-Tests/MCGitlabRepositoryIcebergExtensionsTest.class.st b/Iceberg-Tests/MCGitlabRepositoryIcebergExtensionsTest.class.st index 2bccddd0c0..643bf2468b 100644 --- a/Iceberg-Tests/MCGitlabRepositoryIcebergExtensionsTest.class.st +++ b/Iceberg-Tests/MCGitlabRepositoryIcebergExtensionsTest.class.st @@ -1,10 +1,12 @@ Class { - #name : #MCGitlabRepositoryIcebergExtensionsTest, - #superclass : #TestCase, - #category : 'Iceberg-Tests-Core-Remotes' + #name : 'MCGitlabRepositoryIcebergExtensionsTest', + #superclass : 'TestCase', + #category : 'Iceberg-Tests-Core-Remotes', + #package : 'Iceberg-Tests', + #tag : 'Core-Remotes' } -{ #category : #running } +{ #category : 'running' } MCGitlabRepositoryIcebergExtensionsTest >> testHttpsUrl [ | repository | @@ -13,7 +15,7 @@ MCGitlabRepositoryIcebergExtensionsTest >> testHttpsUrl [ self assert: repository httpsUrl equals: 'https://gitlab.com/pharo-project/pharo.git' ] -{ #category : #running } +{ #category : 'running' } MCGitlabRepositoryIcebergExtensionsTest >> testHttpsUrlForSelfHostedGitlab [ | repository | @@ -24,7 +26,7 @@ MCGitlabRepositoryIcebergExtensionsTest >> testHttpsUrlForSelfHostedGitlab [ ] -{ #category : #running } +{ #category : 'running' } MCGitlabRepositoryIcebergExtensionsTest >> testScpUrl [ | repository | @@ -33,7 +35,7 @@ MCGitlabRepositoryIcebergExtensionsTest >> testScpUrl [ self assert: repository scpUrl equals: 'git@gitlab.com:pharo-project/pharo.git' ] -{ #category : #running } +{ #category : 'running' } MCGitlabRepositoryIcebergExtensionsTest >> testScpUrlForSelfHostedGitlab [ | repository | @@ -44,7 +46,7 @@ MCGitlabRepositoryIcebergExtensionsTest >> testScpUrlForSelfHostedGitlab [ ] -{ #category : #running } +{ #category : 'running' } MCGitlabRepositoryIcebergExtensionsTest >> testScpUrlForSelfHostedGitlabWithNonDefaultSSHPort [ | repository | SystemVersion current major <= 6 ifTrue: [ self skip ]. diff --git a/Iceberg-Tests/RG2MetaclassTraitDefinition.extension.st b/Iceberg-Tests/RG2MetaclassTraitDefinition.extension.st index 3a75af1456..3254182648 100644 --- a/Iceberg-Tests/RG2MetaclassTraitDefinition.extension.st +++ b/Iceberg-Tests/RG2MetaclassTraitDefinition.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RG2MetaclassTraitDefinition } +Extension { #name : 'RG2MetaclassTraitDefinition' } -{ #category : #'*Iceberg-Tests' } +{ #category : '*Iceberg-Tests' } RG2MetaclassTraitDefinition >> asMCDefinition [ ^ MCClassTraitDefinition diff --git a/Iceberg-Tests/RG2PackageDefinition.extension.st b/Iceberg-Tests/RG2PackageDefinition.extension.st index 93d826948c..7abc8170d7 100644 --- a/Iceberg-Tests/RG2PackageDefinition.extension.st +++ b/Iceberg-Tests/RG2PackageDefinition.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RG2PackageDefinition } +Extension { #name : 'RG2PackageDefinition' } -{ #category : #'*Iceberg-Tests' } +{ #category : '*Iceberg-Tests' } RG2PackageDefinition >> asMCSnapshot [ | definitions | diff --git a/Iceberg-Tests/RG2TraitDefinition.extension.st b/Iceberg-Tests/RG2TraitDefinition.extension.st index f70ff20dc1..0e3c62a7e5 100644 --- a/Iceberg-Tests/RG2TraitDefinition.extension.st +++ b/Iceberg-Tests/RG2TraitDefinition.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RG2TraitDefinition } +Extension { #name : 'RG2TraitDefinition' } -{ #category : #'*Iceberg-Tests' } +{ #category : '*Iceberg-Tests' } RG2TraitDefinition >> asMCDefinition [ ^ MCTraitDefinition diff --git a/Iceberg-Tests/RG2UnresolvedValue.extension.st b/Iceberg-Tests/RG2UnresolvedValue.extension.st index 790070f126..5cf171826e 100644 --- a/Iceberg-Tests/RG2UnresolvedValue.extension.st +++ b/Iceberg-Tests/RG2UnresolvedValue.extension.st @@ -1,6 +1,6 @@ -Extension { #name : #RG2UnresolvedValue } +Extension { #name : 'RG2UnresolvedValue' } -{ #category : #'*Iceberg-Tests' } +{ #category : '*Iceberg-Tests' } RG2UnresolvedValue >> remove: aRG2MethodDefinition [ "I am undefined, removing something is futil" diff --git a/Iceberg-Tests/package.st b/Iceberg-Tests/package.st index 5ce11db7f6..cd00971291 100644 --- a/Iceberg-Tests/package.st +++ b/Iceberg-Tests/package.st @@ -1 +1 @@ -Package { #name : #'Iceberg-Tests' } +Package { #name : 'Iceberg-Tests' } diff --git a/Iceberg/Iceberg.class.st b/Iceberg/Iceberg.class.st index 4bce23fd51..3227b7b320 100644 --- a/Iceberg/Iceberg.class.st +++ b/Iceberg/Iceberg.class.st @@ -19,6 +19,7 @@ Class { #superclass : 'Object', #classVars : [ 'EnableMetacelloIntegration', + 'ProxyURLExternalString', 'RemoteTypeSelector', 'ShowSystemRepositories' ], @@ -66,6 +67,27 @@ Iceberg class >> bootstrapWithCommitId: commitId packageList: packageNameList [ repository register ] +{ #category : 'proxy' } +Iceberg class >> configureLGitProxyOpt: aLGitProxyOptions [ + + | proxyURL | + proxyURL := self proxyURLExternalString. + + "If there is not configured proxy, let's return" + proxyURL isNull ifTrue: [ ^ self ]. + + aLGitProxyOptions prim_url: proxyURL +] + +{ #category : 'proxy' } +Iceberg class >> createProxyURLExternalString [ + + NetworkSystemSettings httpProxyServer isEmpty + ifTrue: [ ^ ProxyURLExternalString := ExternalAddress null ]. + + ProxyURLExternalString := ExternalAddress fromString: self formatNetworkSettingsProxyServer. +] + { #category : 'settings' } Iceberg class >> enableMetacelloIntegration [ ^ EnableMetacelloIntegration ifNil: [ EnableMetacelloIntegration := true ] @@ -76,6 +98,31 @@ Iceberg class >> enableMetacelloIntegration: anObject [ EnableMetacelloIntegration := anObject ] +{ #category : 'proxy' } +Iceberg class >> ensureProxyURLExternalString [ + + + "If we have a valid string in the external memory, we check its value" + (ProxyURLExternalString isNotNil and: [ ProxyURLExternalString isNull not ]) ifTrue: [ + + "If it is the same that we want, let's just continue. If it is different, we need to free it so, we can allocate a new one" + ProxyURLExternalString utf8StringFromCString = self formatNetworkSettingsProxyServer + ifTrue: [ ^ self ] + ifFalse: [ ProxyURLExternalString free ] ]. + + ^ self createProxyURLExternalString +] + +{ #category : 'proxy' } +Iceberg class >> formatNetworkSettingsProxyServer [ + + ^ String streamContents: [ :s | + s nextPutAll: 'https://'. + s nextPutAll: NetworkSystemSettings httpProxyServer. + s nextPutAll: ':'. + s nextPutAll: NetworkSystemSettings httpProxyPort printString ] +] + { #category : 'accessing' } Iceberg class >> icebergRepositoriesURLs [ ^ { @@ -105,6 +152,13 @@ Iceberg class >> mcRepositoryFor: aLocationString [ ^ (IceMetacelloRepositoryType for: aLocationString) mcRepository ] +{ #category : 'proxy' } +Iceberg class >> proxyURLExternalString [ + + self ensureProxyURLExternalString. + ^ ProxyURLExternalString +] + { #category : 'accessing' } Iceberg class >> remoteTypeSelector [ "Should be #scpURL or #httpsURL"