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').
fileStream isNil ifTrue: [ ^nil ].
localRepository := fileStream name asFileReference.
mainTree localRepository: 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.'].
'exec ', fossil, ' open ', localRepository fullName].
self inform: 'Repositorio local abierto.'.
self inform: (mainTree localRepository asString).
]
{ #category : #persistence }

View File

@ -23,7 +23,9 @@ Class {
'node',
'level',
'nodesInPreorder',
'cacheNode'
'cacheNode',
'localRepository',
'remoteRepository'
],
#category : #'Grafoscopio-Model'
}
@ -307,6 +309,16 @@ GrafoscopioNode >> level: anInteger [
level := anInteger
]
{ #category : #accessing }
GrafoscopioNode >> localRepository [
^ localRepository
]
{ #category : #accessing }
GrafoscopioNode >> localRepository: anObject [
localRepository := anObject
]
{ #category : #exporting }
GrafoscopioNode >> markdownContent [
"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'
]
{ #category : #accessing }
GrafoscopioNode >> remoteRepository [
^ remoteRepository
]
{ #category : #accessing }
GrafoscopioNode >> remoteRepository: anObject [
remoteRepository := anObject
]
{ #category : #'add/remove nodes' }
GrafoscopioNode >> removeLastNode [
"Adds the given node to the receivers collection of children, and sets this object as the parent