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

View File

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