From c1cbff2ccfd6a9d8eb816b7bf7cc5fc25147c63d Mon Sep 17 00:00:00 2001 From: Offray Luna Date: Fri, 10 Jul 2015 19:19:41 +0000 Subject: [PATCH] Now repository information is stored in the root of the tree. --- .../Grafoscopio/GrafoscopioBrowser.class.st | 6 +++-- .../Grafoscopio/GrafoscopioNode.class.st | 24 ++++++++++++++++++- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index ded274f..0ca8d0b 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -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 } diff --git a/repository/Grafoscopio/GrafoscopioNode.class.st b/repository/Grafoscopio/GrafoscopioNode.class.st index f412e69..057470e 100644 --- a/repository/Grafoscopio/GrafoscopioNode.class.st +++ b/repository/Grafoscopio/GrafoscopioNode.class.st @@ -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