diff --git a/repository/Grafoscopio/GrafoscopioBrowser.class.st b/repository/Grafoscopio/GrafoscopioBrowser.class.st index 741f6aa..ffaa70c 100644 --- a/repository/Grafoscopio/GrafoscopioBrowser.class.st +++ b/repository/Grafoscopio/GrafoscopioBrowser.class.st @@ -711,7 +711,9 @@ browser { #category : #'persistance / repositories' } GrafoscopioBrowser >> commitToRepository [ - "Commits to the associated repository for the current document tree" + "Commits to the associated repository for the current document tree. + REFACTORING NOTE: A more interactive use of external OS process, using pipeable os process should be done + allowing to capture console message." | commitMessage | commitMessage := UIManager default textEntry: 'Ingrese el mensaje asociado a este envío al historial' @@ -726,23 +728,6 @@ GrafoscopioBrowser >> commitToRepository [ self inform: 'Histórico del proyecto sincronizado'] ] -{ #category : #'persistance / repositories' } -GrafoscopioBrowser >> commitToRepositoryDebug [ - "Commits to the associated repository for the current document tree" - | commitMessage | - commitMessage := UIManager default - textEntry: 'Ingrese el mensaje asociado a este envío al historial' - title: 'Mensaje para el historial'. - commitMessage isNil ifTrue: [ ^nil ]. - (mainTree metadata at: 'localRepository') notNil - ifTrue: [ - OSProcess command: - 'cd ', (mainTree metadata at: 'localRepository') asFileReference parent fullName, '; ', - fossil, ' commit -m "', commitMessage, '"; ', - 'echo "commit sended to the repository"'. - self inform: fossil] -] - { #category : #'system-support' } GrafoscopioBrowser >> configureInitialTags [ "Configures a list of predefined tags available to use. More tags should be added from a repository. @@ -794,8 +779,19 @@ GrafoscopioBrowser >> customKeys [ GrafoscopioBrowser >> defineRemoteRepository [ "Defines a remote fossil repository from an url" - "| temporary variable names | - statements" + | remoteRepoUrl localRepoDirectory | + "remoteRepoUrl := UIManager default + textEntry: 'Ingrese la dirección web del repositorio remoto' + title: 'Dirección web del repositorio'." + remoteRepoUrl := 'http://hackbo.co/deltas/repos.fossil/reco2/'. + localRepoDirectory := FileLocator documents asFileReference / 'ReCo2'. + localRepoDirectory ensureCreateDirectory. + OS2Process command: + 'cd ', localRepoDirectory asFileReference fullName, '; ', + fossil, ' clone ', remoteRepoUrl, ' reco2.fossil; ', + fossil, ' open reco2.fossil'. + 'echo "commit sended to the repository"'. + self inform: 'Repositorio remoto definido y activado'. ] { #category : #'persistance / repositories' } @@ -1421,6 +1417,7 @@ GrafoscopioBrowser >> treeOn: constructor [ act: [self addToTagsAvailable] entitled: 'Agregar a disponibles' categorized: 'Etiquetas'; "For projects" + act: [self defineRemoteRepository] entitled: 'Activar repositorio remoto...' categorized: 'Proyecto'; act: [self enableLocalRepository] entitled: 'Activar repositorio local...' categorized: 'Proyecto'; act: [self addFileToRepository] entitled: 'Agregar archivo...' categorized: 'Proyecto'; act: [self messageNotImplementedYet] entitled: 'Eliminar archivo...' categorized: 'Proyecto';