Merging changes from 226 and improving detection of hashes for last version of files.
Should the warning be more visible?
This commit is contained in:
parent
052d8523c7
commit
5272b45710
@ -17,6 +17,14 @@ Class {
|
|||||||
#category : #'Grafoscopio-Model'
|
#category : #'Grafoscopio-Model'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{ #category : #installation }
|
||||||
|
ExternalApp class >> compareHashFor: aFileName with: aSHAString [
|
||||||
|
|
||||||
|
aSHAString = (SHA1 new hashMessage: aFileName asFileReference binaryReadStream contents) hex
|
||||||
|
ifFalse: [ ^ false ]
|
||||||
|
ifTrue: [ ^ true ].
|
||||||
|
]
|
||||||
|
|
||||||
{ #category : #configuration }
|
{ #category : #configuration }
|
||||||
ExternalApp class >> configureFossil [
|
ExternalApp class >> configureFossil [
|
||||||
"Stablish where is located pandoc according to the operative system and/or the input of the user"
|
"Stablish where is located pandoc according to the operative system and/or the input of the user"
|
||||||
@ -41,14 +49,6 @@ ExternalApp class >> configurePandoc [
|
|||||||
|
|
||||||
]
|
]
|
||||||
|
|
||||||
{ #category : #installation }
|
|
||||||
ExternalApp class >> file: aFileName hasHash: aSHAString [
|
|
||||||
|
|
||||||
aSHAString = (SHA1 new hashMessage: aFileName asFileReference binaryReadStream contents) hex
|
|
||||||
ifFalse: [ ^ false ]
|
|
||||||
ifTrue: [ ^ true ].
|
|
||||||
]
|
|
||||||
|
|
||||||
{ #category : #installation }
|
{ #category : #installation }
|
||||||
ExternalApp class >> installSQLite32Bits [
|
ExternalApp class >> installSQLite32Bits [
|
||||||
"I dowload the SQLite binary for the hosting platform, uncompress it and made it available as with the name
|
"I dowload the SQLite binary for the hosting platform, uncompress it and made it available as with the name
|
||||||
|
42
repository/Grafoscopio/FossilRepo.class.st
Normal file
42
repository/Grafoscopio/FossilRepo.class.st
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
"
|
||||||
|
I model a fossil repository. For details about fossil see:
|
||||||
|
|
||||||
|
http://fossil-scm.org/
|
||||||
|
"
|
||||||
|
Class {
|
||||||
|
#name : #FossilRepo,
|
||||||
|
#superclass : #Object,
|
||||||
|
#instVars : [
|
||||||
|
'url'
|
||||||
|
],
|
||||||
|
#category : #'Grafoscopio-Model'
|
||||||
|
}
|
||||||
|
|
||||||
|
{ #category : #'as yet unclassified' }
|
||||||
|
FossilRepo >> jsonDataFor: aFileName [
|
||||||
|
^ NeoJSONReader fromString: (self jsonStringFor: aFileName)
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'as yet unclassified' }
|
||||||
|
FossilRepo >> jsonStringFor: aFileName [
|
||||||
|
| queryForJSONData |
|
||||||
|
queryForJSONData := self url addPathSegments: #('json' 'finfo').
|
||||||
|
queryForJSONData queryAt: 'name' put: aFileName.
|
||||||
|
^ (ZnEasy get: queryForJSONData) contents.
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #'as yet unclassified' }
|
||||||
|
FossilRepo >> lastHashNumberFor: aFileName [
|
||||||
|
(self jsonDataFor: aFileName) at: 'payload' ifAbsent: [ self inform: 'Key not found, verify the file name you are looking in this repository'. ^ self ].
|
||||||
|
^ (((self jsonDataFor: aFileName) at: 'payload') at: 'checkins') first at: 'uuid'
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
FossilRepo >> url [
|
||||||
|
^ url
|
||||||
|
]
|
||||||
|
|
||||||
|
{ #category : #accessing }
|
||||||
|
FossilRepo >> url: aString [
|
||||||
|
url := aString asUrl
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user