-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #891 from tesonep/feature/progressBars
Adding progress bar to long Git operations
- Loading branch information
Showing
40 changed files
with
227 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 9 additions & 2 deletions
11
Iceberg-Libgit.package/IceGitClone.class/instance/execute.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
Iceberg-Libgit.package/IceLibgitRepository.class/instance/setHead..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
API-accessing | ||
setHead: anIceGitCommitish | ||
|
||
"Need to keep the reference, if not it is garbage collected. As the options are only passed to a FFI call" | ||
| progress | | ||
progress := IceGitCheckoutProgress new. | ||
|
||
self handleLibgitError: [ | ||
self repositoryHandle | ||
checkout: anIceGitCommitish gitRef | ||
options: | ||
(LGitCheckoutOptions defaults | ||
checkoutStrategy: LGitCheckoutStrategyEnum git_checkout_force; | ||
progressCallback: progress; | ||
yourself) ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
.../instance/updateLocation.subdirectory..st → ...ryModel.class/instance/updateLocation..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
events | ||
changed | ||
|
||
current >= max ifTrue: [ ^ Job jobAnnouncer announce: (JobEnd on: self) ]. | ||
Job jobAnnouncer announce: (JobChange on: self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
current: anInteger | ||
current := anInteger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
events | ||
end | ||
Job jobAnnouncer announce: (JobEnd on: self) |
3 changes: 3 additions & 0 deletions
3
Iceberg.package/IceExternalJob.class/instance/ensureStarted.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
events | ||
ensureStarted | ||
started ifFalse: [ self start ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
initialization | ||
initialize | ||
super initialize. | ||
started := false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
max: anInteger | ||
max := anInteger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
min: anInteger | ||
min := anInteger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
owner | ||
^ nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
progress | ||
^ min >= max ifTrue: [ 1 ] ifFalse: [ (current - min) / (max - min) ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
events | ||
start | ||
started := true. | ||
|
||
Job jobAnnouncer announce: (JobStart on: self) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
title: aString | ||
title := aString |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
title | ||
^ title |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "Object", | ||
"category" : "Iceberg-Progress", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ | ||
"title", | ||
"started", | ||
"min", | ||
"max", | ||
"current" | ||
], | ||
"name" : "IceExternalJob", | ||
"type" : "normal" | ||
} |
Empty file.
12 changes: 12 additions & 0 deletions
12
Iceberg.package/IceGitCheckoutProgress.class/instance/block.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
accessing | ||
block | ||
^ [ :path :completed :total :payload | | ||
job ensureStarted. | ||
|
||
job min: 0. | ||
job max: total. | ||
job current: completed. | ||
job title: ('Checking out... ({1}/{2})' format: { completed. total}). | ||
|
||
job changed. | ||
] |
9 changes: 9 additions & 0 deletions
9
Iceberg.package/IceGitCheckoutProgress.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
initialization | ||
initialize | ||
super initialize. | ||
|
||
job := IceExternalJob new | ||
title: 'Checking out...'; | ||
yourself. | ||
|
||
self initializeBlock. |
3 changes: 3 additions & 0 deletions
3
Iceberg.package/IceGitCheckoutProgress.class/instance/initializeBlock.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
initialization | ||
initializeBlock | ||
self signature: self class fnSpec block: self block. |
13 changes: 13 additions & 0 deletions
13
Iceberg.package/IceGitCheckoutProgress.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "LGitCheckoutProgressCallback", | ||
"category" : "Iceberg-Progress", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ | ||
"job" | ||
], | ||
"name" : "IceGitCheckoutProgress", | ||
"type" : "normal" | ||
} |
Empty file.
16 changes: 16 additions & 0 deletions
16
Iceberg.package/IceGitTransferProgress.class/instance/block.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
accessing | ||
block | ||
^ [ :stats :payload | | ||
| gitStats | | ||
gitStats := LGitTransferProgress fromHandle: stats. | ||
job ensureStarted. | ||
|
||
job min: 0. | ||
job max: gitStats prim_total_objects. | ||
job current: gitStats prim_received_objects. | ||
job title: ('Fetching Git objects... ({1}/{2})' format: { gitStats prim_received_objects. gitStats prim_total_objects}). | ||
|
||
job changed. | ||
|
||
0 | ||
] |
9 changes: 9 additions & 0 deletions
9
Iceberg.package/IceGitTransferProgress.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
accessing | ||
initialize | ||
super initialize. | ||
|
||
job := IceExternalJob new | ||
title: 'Fetching Git objects...'; | ||
yourself. | ||
|
||
self initializeBlock. |
3 changes: 3 additions & 0 deletions
3
Iceberg.package/IceGitTransferProgress.class/instance/initializeBlock.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
initialize - release | ||
initializeBlock | ||
self signature: self class fnSpec block: self block. |
13 changes: 13 additions & 0 deletions
13
Iceberg.package/IceGitTransferProgress.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "LGitTransferProgressCallback", | ||
"category" : "Iceberg-Progress", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ | ||
"job" | ||
], | ||
"name" : "IceGitTransferProgress", | ||
"type" : "normal" | ||
} |
Empty file.
14 changes: 14 additions & 0 deletions
14
Iceberg.package/IcePushTransferProgress.class/instance/block.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
accessing | ||
block | ||
^ [ :current :total :bytes :payload | | ||
job ensureStarted. | ||
|
||
job min: 0. | ||
job max: total. | ||
job current: current. | ||
job title: ((self title, ' ({1}/{2})') format: { current. total}). | ||
|
||
job changed. | ||
|
||
0 | ||
] |
9 changes: 9 additions & 0 deletions
9
Iceberg.package/IcePushTransferProgress.class/instance/initialize.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
accessing | ||
initialize | ||
super initialize. | ||
|
||
job := IceExternalJob new | ||
title: self title; | ||
yourself. | ||
|
||
self initializeBlock. |
3 changes: 3 additions & 0 deletions
3
Iceberg.package/IcePushTransferProgress.class/instance/initializeBlock.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
initialization | ||
initializeBlock | ||
self signature: self class fnSpec block: self block. |
3 changes: 3 additions & 0 deletions
3
Iceberg.package/IcePushTransferProgress.class/instance/title.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
accessing | ||
title | ||
^ 'Pushing...' |
13 changes: 13 additions & 0 deletions
13
Iceberg.package/IcePushTransferProgress.class/properties.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"commentStamp" : "", | ||
"super" : "LGitPushTransferProgressCallback", | ||
"category" : "Iceberg-Progress", | ||
"classinstvars" : [ ], | ||
"pools" : [ ], | ||
"classvars" : [ ], | ||
"instvars" : [ | ||
"job" | ||
], | ||
"name" : "IcePushTransferProgress", | ||
"type" : "normal" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
API-remotes | ||
fetch | ||
"Fetch all commits and branches from all remotes" | ||
self remotes do: [ :each | each fetch ] | ||
|
||
self remotes do: [ :each | each fetch ] | ||
displayingProgress: [ :each | 'Remote: ' , each name asString ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.