Commit before updating prerrequisites.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2015-07-03 08:26:20 +00:00 committed by SantiagoBragagnolo
parent 9a33592587
commit 0d26189c5f
1 changed files with 20 additions and 3 deletions

View File

@ -38,7 +38,7 @@ FossilTimeline >> commits: anObject [
FossilTimeline >> importFromUrl: aJsonFileUrl [
"Imports all commits stored in aJsonFileUrl and converts them in a collection of FossilCommit objects"
| commitsDict parentsUuid |
| commitsDict |
"Extracting data"
commitsDict := ((NeoJSONReader fromString: (aJsonFileUrl asUrl retrieveContents asString)) at: 'payload') at: 'timeline'.
@ -52,8 +52,8 @@ FossilTimeline >> importFromUrl: aJsonFileUrl [
user: (commit at: 'user');
comment: (commit at: 'comment');
tags: (commit at: 'tags')]).
"Colecting all parents uuid for easier manipulation"
parentsUuid := commitsDict allButLast collect: [:each | (each at: 'parents') at: 1 ].
"Detecting which commits are on refered in the dictionary as parents and adding them as such
for the respective commit"
commitsDict allButLastDo: [:each |
(self commits detect: [:commit | commit uuid = (each at: 'uuid') ])
parents: (self commits detect: [:c | c uuid = ((each at: 'parents') at: 1) ])].
@ -72,3 +72,20 @@ FossilTimeline >> parentsFor: aCommit [
^ self commits select: [:commit | commit uuid = (aCommit parents at: 1)]
]
{ #category : #'as yet unclassified' }
FossilTimeline >> show [
"Shows a draft of the timeline history. Tree topologies are preserved but still needs to be group timelines by date and author of the commit"
| view |
"Visualization"
view := RTMondrian new.
view nodes: self commits.
"view nodes do: [:each | each color: Color blue]."
view edges
connectTo: #parents.
view layout tree.
^ view.
]