Preliminar support for fossil commits.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2015-07-11 10:41:04 +00:00
parent c1cbff2ccf
commit fe63393f70
2 changed files with 16 additions and 6 deletions

View File

@ -418,7 +418,7 @@ GrafoscopioBrowser >> addFileToRepository [
fileStream isNil ifTrue: [ ^nil ].
fileToAdd := fileStream fullName.
OSProcess command:
'cd ', localRepository parent fullName, '; ',
'cd ', (mainTree metadata at: 'localRepository') asFileReference parent fullName, '; ',
fossil, ' add ', fileToAdd, '; ',
'echo "Added file to enabled repository"'.
self inform: 'Archivo adicionado al repositorio'
@ -775,14 +775,15 @@ GrafoscopioBrowser >> enableLocalRepository [
extensions: #('fossil').
fileStream isNil ifTrue: [ ^nil ].
localRepository := fileStream name asFileReference.
mainTree localRepository: fileStream name.
mainTree metadata ifNil: [mainTree metadata: Dictionary new].
mainTree metadata at: 'localRepository' put: fileStream name.
(Smalltalk platform name = 'unix') | (Smalltalk platform name = 'Mac OS')
ifTrue: [
OSProcess command:
'cd ', localRepository parent fullName,';',
'exec ', fossil, ' open ', localRepository fullName].
self inform: 'Repositorio local abierto.'.
self inform: (mainTree localRepository asString).
self inform: 'Repositorio local activado: ', Character cr,
(mainTree metadata at: 'localRepository')
]
{ #category : #persistence }

View File

@ -24,8 +24,7 @@ Class {
'level',
'nodesInPreorder',
'cacheNode',
'localRepository',
'remoteRepository'
'metadata'
],
#category : #'Grafoscopio-Model'
}
@ -375,6 +374,16 @@ GrafoscopioNode >> markdownContent [
^markdown contents
]
{ #category : #accessing }
GrafoscopioNode >> metadata [
^ metadata
]
{ #category : #accessing }
GrafoscopioNode >> metadata: anObject [
metadata := anObject
]
{ #category : #movement }
GrafoscopioNode >> moveAfter [
"Moves the current node a place before in the children collection where is located"