Commit before updating prerrequisites.
This commit is contained in:
parent
9a33592587
commit
0d26189c5f
|
@ -38,7 +38,7 @@ FossilTimeline >> commits: anObject [
|
||||||
FossilTimeline >> importFromUrl: aJsonFileUrl [
|
FossilTimeline >> importFromUrl: aJsonFileUrl [
|
||||||
"Imports all commits stored in aJsonFileUrl and converts them in a collection of FossilCommit objects"
|
"Imports all commits stored in aJsonFileUrl and converts them in a collection of FossilCommit objects"
|
||||||
|
|
||||||
| commitsDict parentsUuid |
|
| commitsDict |
|
||||||
|
|
||||||
"Extracting data"
|
"Extracting data"
|
||||||
commitsDict := ((NeoJSONReader fromString: (aJsonFileUrl asUrl retrieveContents asString)) at: 'payload') at: 'timeline'.
|
commitsDict := ((NeoJSONReader fromString: (aJsonFileUrl asUrl retrieveContents asString)) at: 'payload') at: 'timeline'.
|
||||||
|
@ -52,8 +52,8 @@ FossilTimeline >> importFromUrl: aJsonFileUrl [
|
||||||
user: (commit at: 'user');
|
user: (commit at: 'user');
|
||||||
comment: (commit at: 'comment');
|
comment: (commit at: 'comment');
|
||||||
tags: (commit at: 'tags')]).
|
tags: (commit at: 'tags')]).
|
||||||
"Colecting all parents uuid for easier manipulation"
|
"Detecting which commits are on refered in the dictionary as parents and adding them as such
|
||||||
parentsUuid := commitsDict allButLast collect: [:each | (each at: 'parents') at: 1 ].
|
for the respective commit"
|
||||||
commitsDict allButLastDo: [:each |
|
commitsDict allButLastDo: [:each |
|
||||||
(self commits detect: [:commit | commit uuid = (each at: 'uuid') ])
|
(self commits detect: [:commit | commit uuid = (each at: 'uuid') ])
|
||||||
parents: (self commits detect: [:c | c uuid = ((each at: 'parents') at: 1) ])].
|
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)]
|
^ 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.
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in New Issue