Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to set tonel writer version to use for export #1798

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Iceberg-Libgit-Tonel/IceLibgitTonelWriter.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ IceLibgitTonelWriter class >> forInternalStore [

{ #category : 'writing' }
IceLibgitTonelWriter class >> forInternalStoreFileOut: aMCVersion on: aRepository [
self forInternalStore
fileOut: aMCVersion
on: aRepository subdirectoryReference

(self forInternalStore forVersion: (aRepository properties tonelVersion ifNil: [ self forInternalStore defaultVersion ])) new
directoryReference: aRepository subdirectoryReference;
writeVersion: aMCVersion
]

{ #category : 'accessing' }
Expand Down
11 changes: 8 additions & 3 deletions Iceberg-Libgit/IceRepositoryProperties.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ IceRepositoryProperties class >> propertiesFileName [

{ #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') ]

^ aFileReference readStreamDo: [ :stream | STON fromStream: stream ]
]

{ #category : 'comparing' }
Expand Down Expand Up @@ -210,6 +209,12 @@ IceRepositoryProperties >> storeOnFileReference: aFileReference [
nextPut: self properties ]
]

{ #category : 'private' }
IceRepositoryProperties >> tonelVersion [

^ self properties at: #version ifAbsent: [ nil ]
]

{ #category : 'accessing' }
IceRepositoryProperties >> writerClass [
^ self properties
Expand Down
Loading