Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Extend commits to get properties from them
- `IceRepositoryProperties new` should be correctly (lazily) initialized
- make Filetree migration condition more robust
  • Loading branch information
guillep committed May 29, 2018
1 parent eb0e5ef commit f34a103
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
at: aKey

^ properties at: aKey
^ self properties at: aKey
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
at: aKey put: aValue

properties at: aKey put: aValue
self properties at: aKey put: aValue
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
private
properties
^ properties
^ properties ifNil: [ properties := Dictionary new ]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accessing
readerClass
^ properties
^ self properties
at: 'format'
ifPresent: [ :v | TIceRepositoryReader users detect: [ :each | each id = v ] ]
ifAbsent: [ TIceRepositoryReader users detect: #isLegacyDefault ]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
accessing
writerClass
^ properties
^ self properties
at: 'format'
ifPresent: [ :v | TIceRepositoryWriter users detect: [ :each | each id = v ] ]
ifAbsent: [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
testing
canBeExecutedInContext: aToolContext
self flag: #todo. "Demeters law"
^ aToolContext repositoryModel entity writerClass id = #filetree

| repository |
repository := aToolContext repositoryModel entity.
^ repository isMissing not
and: [ repository workingCopy isDetached not
and: [ repository workingCopy writerClass id = #filetree ] ]
4 changes: 4 additions & 0 deletions Iceberg.package/IceCommitish.class/instance/properties.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
API-properties
properties

^ IceRepositoryProperties new
5 changes: 3 additions & 2 deletions Iceberg.package/IceCommitish.class/instance/writerClass.st
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
accessing
API-properties
writerClass
^ self commit writerClass

^ self properties writerClass
3 changes: 3 additions & 0 deletions Iceberg.package/IceUnknownCommit.class/instance/commit.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
commit
self shouldBeImplemented.
4 changes: 4 additions & 0 deletions Iceberg.package/IceWorkingCopy.class/instance/writerClass.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
API-properties
writerClass

^ self referenceCommit writerClass

0 comments on commit f34a103

Please sign in to comment.