Skip to content

Commit

Permalink
Add progress bars for change set creation, materialization and serial…
Browse files Browse the repository at this point in the history
…ization
  • Loading branch information
MariusDoe committed Apr 29, 2024
1 parent 86f625a commit 08520fb
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
changes-operations
materializeChangeSets: aCollection
aCollection do: [:each | each materializeIn: self].
aCollection do: [:each | each materializeIn: self] displayingProgress: 'Loading changes'.
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ changes-operations
serializeChangeSets: aCollection onCommit: aCommitOrNil
| filesystem |
filesystem := self filesystemOn: aCommitOrNil.
aCollection do: [:each | each serializeInto: filesystem].
aCollection do: [:each | each serializeInto: filesystem] displayingProgress: 'Saving changes'.
^ filesystem
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@
"mappers:" : "mad 3/19/2024 21:25",
"mappersMapper" : "mad 9/20/2023 12:47",
"mappersOfKind:" : "mad 9/20/2023 17:29",
"materializeChangeSets:" : "mad 9/6/2023 19:27",
"materializeChangeSets:" : "mad 4/29/2024 23:00",
"materializeCommit:" : "mad 9/6/2023 19:27",
"materializeHead" : "mad 8/24/2023 23:49",
"materialized" : "mad 4/28/2023 21:20",
Expand Down Expand Up @@ -152,7 +152,7 @@
"requestRemoteNameAndRefFor:" : "mad 12/13/2023 18:59",
"requestSarFileName" : "mad 1/9/2024 20:24",
"requestUnmappedPathWithTitle:initialAnswer:" : "mad 11/21/2023 14:31",
"serializeChangeSets:onCommit:" : "mad 9/20/2023 12:45",
"serializeChangeSets:onCommit:" : "mad 4/29/2024 23:00",
"serializerFromSquotContents:in:fallback:" : "mad 4/29/2024 21:34",
"serializerNameFromSquotContents:in:" : "mad 4/29/2024 21:35",
"setUpstreamRemoteName:andRef:for:" : "mad 12/13/2023 18:28",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,18 @@ in: aWorkingCopy
emptyCommit := aWorkingCopy emptyCommit.
mapperChangeSets := Dictionary new.
potentiallyRemovedMappers := fromMappersCollection difference: toMappersCollection.
potentiallyRemovedMappers do: [:old |
mapperChangeSets at: old put: (oldBlock value: old value: emptyCommit)].
(toMappersCollection intersection: fromMappersCollection) do: [:common |
mapperChangeSets at: common put: (commonBlock value: common)].
(toMappersCollection difference: fromMappersCollection) do: [:new |
mapperChangeSets at: new put: (newBlock value: new value: emptyCommit)].
'Gathering changes'
displayProgressFrom: 1
to: potentiallyRemovedMappers size + toMappersCollection size
during: [:bar | | index next |
index := 1.
next := [bar value: index. index := index + 1].
potentiallyRemovedMappers do: [:old |
mapperChangeSets at: old put: (oldBlock value: old value: emptyCommit). next value].
(toMappersCollection intersection: fromMappersCollection) do: [:common |
mapperChangeSets at: common put: (commonBlock value: common). next value].
(toMappersCollection difference: fromMappersCollection) do: [:new |
mapperChangeSets at: new put: (newBlock value: new value: emptyCommit). next value]].
mappersChangeSet := self
changeSetFromMappers: fromMappersCollection
removing: potentiallyRemovedMappers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"changeSetsFromFSCommit:toFSCommit:in:" : "mad 9/20/2023 12:50",
"changeSetsFromFSCommit:toImage:" : "mad 9/20/2023 12:51",
"changeSetsFromImage:toFSCommit:" : "mad 9/20/2023 12:51",
"changeSetsFromMappers:toMappers:old:common:new:in:" : "mad 2/20/2024 15:19",
"changeSetsFromMappers:toMappers:old:common:new:in:" : "mad 4/29/2024 23:15",
"hasMappersFile:" : "mad 4/18/2024 18:33",
"loadMappersFromFSCommit:" : "mad 9/20/2023 12:05",
"loadMappersFromFileSystem:" : "mad 9/20/2023 12:05",
Expand Down

0 comments on commit 08520fb

Please sign in to comment.