Now repository information is stored in the root of the tree.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2015-07-10 19:19:41 +00:00
parent 8e4b697ced
commit c1cbff2ccf
2 changed files with 27 additions and 3 deletions

View File

@ -775,12 +775,14 @@ 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.
(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 abierto.'.
self inform: (mainTree localRepository asString).
] ]
{ #category : #persistence } { #category : #persistence }

View File

@ -23,7 +23,9 @@ Class {
'node', 'node',
'level', 'level',
'nodesInPreorder', 'nodesInPreorder',
'cacheNode' 'cacheNode',
'localRepository',
'remoteRepository'
], ],
#category : #'Grafoscopio-Model' #category : #'Grafoscopio-Model'
} }
@ -307,6 +309,16 @@ GrafoscopioNode >> level: anInteger [
level := anInteger level := anInteger
] ]
{ #category : #accessing }
GrafoscopioNode >> localRepository [
^ localRepository
]
{ #category : #accessing }
GrafoscopioNode >> localRepository: anObject [
localRepository := anObject
]
{ #category : #exporting } { #category : #exporting }
GrafoscopioNode >> markdownContent [ GrafoscopioNode >> markdownContent [
"Extracts the markdown of a node using body as content, header as title and level as hierarchical level of the title. "Extracts the markdown of a node using body as content, header as title and level as hierarchical level of the title.
@ -446,6 +458,16 @@ GrafoscopioNode >> publish [
self inform: publishedUrl , ' was published and the url was copied to clipboard' self inform: publishedUrl , ' was published and the url was copied to clipboard'
] ]
{ #category : #accessing }
GrafoscopioNode >> remoteRepository [
^ remoteRepository
]
{ #category : #accessing }
GrafoscopioNode >> remoteRepository: anObject [
remoteRepository := anObject
]
{ #category : #'add/remove nodes' } { #category : #'add/remove nodes' }
GrafoscopioNode >> removeLastNode [ GrafoscopioNode >> removeLastNode [
"Adds the given node to the receivers collection of children, and sets this object as the parent "Adds the given node to the receivers collection of children, and sets this object as the parent