From d691dae34af49ec865fc86d4822d735cc0050c46 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Mon, 25 Jun 2018 17:38:21 +0200 Subject: [PATCH 1/5] Adding progress bars to Fetch and Checkout. --- .../IceGitClone.class/instance/execute.st | 11 +++++++++-- .../IceGitRemote.class/instance/fetch.st | 3 ++- .../instance/setHead..st | 5 +++++ Iceberg.package/IceExternalJob.class/README.md | 0 .../IceExternalJob.class/instance/changed.st | 5 +++++ .../IceExternalJob.class/instance/current..st | 3 +++ .../IceExternalJob.class/instance/end.st | 3 +++ .../instance/ensureStarted.st | 3 +++ .../IceExternalJob.class/instance/initialize.st | 4 ++++ .../IceExternalJob.class/instance/max..st | 3 +++ .../IceExternalJob.class/instance/min..st | 3 +++ .../IceExternalJob.class/instance/owner.st | 3 +++ .../IceExternalJob.class/instance/progress.st | 3 +++ .../IceExternalJob.class/instance/start.st | 5 +++++ .../IceExternalJob.class/instance/title..st | 3 +++ .../IceExternalJob.class/instance/title.st | 3 +++ .../IceExternalJob.class/properties.json | 17 +++++++++++++++++ .../IceGitCheckoutProgress.class/README.md | 0 .../instance/block.st | 12 ++++++++++++ .../instance/initialize.st | 9 +++++++++ .../instance/initializeBlock.st | 3 +++ .../properties.json | 13 +++++++++++++ .../IceGitTransferProgress.class/README.md | 0 .../instance/block.st | 16 ++++++++++++++++ .../instance/initialize.st | 9 +++++++++ .../instance/initializeBlock.st | 3 +++ .../properties.json | 13 +++++++++++++ .../IceRepository.class/instance/fetch.st | 4 +++- Iceberg.package/monticello.meta/categories.st | 1 + 29 files changed, 156 insertions(+), 4 deletions(-) create mode 100644 Iceberg.package/IceExternalJob.class/README.md create mode 100644 Iceberg.package/IceExternalJob.class/instance/changed.st create mode 100644 Iceberg.package/IceExternalJob.class/instance/current..st create mode 100644 Iceberg.package/IceExternalJob.class/instance/end.st create mode 100644 Iceberg.package/IceExternalJob.class/instance/ensureStarted.st create mode 100644 Iceberg.package/IceExternalJob.class/instance/initialize.st create mode 100644 Iceberg.package/IceExternalJob.class/instance/max..st create mode 100644 Iceberg.package/IceExternalJob.class/instance/min..st create mode 100644 Iceberg.package/IceExternalJob.class/instance/owner.st create mode 100644 Iceberg.package/IceExternalJob.class/instance/progress.st create mode 100644 Iceberg.package/IceExternalJob.class/instance/start.st create mode 100644 Iceberg.package/IceExternalJob.class/instance/title..st create mode 100644 Iceberg.package/IceExternalJob.class/instance/title.st create mode 100644 Iceberg.package/IceExternalJob.class/properties.json create mode 100644 Iceberg.package/IceGitCheckoutProgress.class/README.md create mode 100644 Iceberg.package/IceGitCheckoutProgress.class/instance/block.st create mode 100644 Iceberg.package/IceGitCheckoutProgress.class/instance/initialize.st create mode 100644 Iceberg.package/IceGitCheckoutProgress.class/instance/initializeBlock.st create mode 100644 Iceberg.package/IceGitCheckoutProgress.class/properties.json create mode 100644 Iceberg.package/IceGitTransferProgress.class/README.md create mode 100644 Iceberg.package/IceGitTransferProgress.class/instance/block.st create mode 100644 Iceberg.package/IceGitTransferProgress.class/instance/initialize.st create mode 100644 Iceberg.package/IceGitTransferProgress.class/instance/initializeBlock.st create mode 100644 Iceberg.package/IceGitTransferProgress.class/properties.json diff --git a/Iceberg-Libgit.package/IceGitClone.class/instance/execute.st b/Iceberg-Libgit.package/IceGitClone.class/instance/execute.st index 4d18ee8c4b..f6b252a6c0 100644 --- a/Iceberg-Libgit.package/IceGitClone.class/instance/execute.st +++ b/Iceberg-Libgit.package/IceGitClone.class/instance/execute.st @@ -1,7 +1,7 @@ actions execute - | repo cloneOptions | + | repo cloneOptions checkoutOptions callbacks | location exists ifTrue: [ IceCloneLocationAlreadyExists signalFor: location ]. @@ -9,7 +9,14 @@ execute repo := LGitRepository on: location. cloneOptions := LGitCloneOptions withCredentialsProvider: (IceCredentialsProvider defaultForRemoteUrl: url). - cloneOptions checkoutOptions checkoutStrategy: LGitCheckoutStrategyEnum git_checkout_force. + + "Keeping references, because if not the GC take them." + checkoutOptions := cloneOptions checkoutOptions. + callbacks := cloneOptions fetchOptions callbacks. + callbacks transferProgress: IceGitTransferProgress new. + + checkoutOptions checkoutStrategy: LGitCheckoutStrategyEnum git_checkout_force. + checkoutOptions progressCallback: IceGitCheckoutProgress new. repo clone: url options: cloneOptions. diff --git a/Iceberg-Libgit.package/IceGitRemote.class/instance/fetch.st b/Iceberg-Libgit.package/IceGitRemote.class/instance/fetch.st index 56c0b1a5c5..d49a8e27ac 100644 --- a/Iceberg-Libgit.package/IceGitRemote.class/instance/fetch.st +++ b/Iceberg-Libgit.package/IceGitRemote.class/instance/fetch.st @@ -4,7 +4,8 @@ fetch localRepository handleLibgitError: [ [ (LGitRemote of: self repositoryHandle named: self name) lookup; - fetchWithCredentials: (IceCredentialsProvider defaultForRemote: self) ] + fetchWithCredentials: (IceCredentialsProvider defaultForRemote: self) + andProgressCallback: IceGitTransferProgress new ] on: LGitAbstractError do: [ :e | e acceptError: (IceLibgitErrorVisitor onContext: self) ]. diff --git a/Iceberg-Libgit.package/IceLibgitRepository.class/instance/setHead..st b/Iceberg-Libgit.package/IceLibgitRepository.class/instance/setHead..st index 59523ded83..e2ca939691 100644 --- a/Iceberg-Libgit.package/IceLibgitRepository.class/instance/setHead..st +++ b/Iceberg-Libgit.package/IceLibgitRepository.class/instance/setHead..st @@ -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) ] \ No newline at end of file diff --git a/Iceberg.package/IceExternalJob.class/README.md b/Iceberg.package/IceExternalJob.class/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Iceberg.package/IceExternalJob.class/instance/changed.st b/Iceberg.package/IceExternalJob.class/instance/changed.st new file mode 100644 index 0000000000..6792adb204 --- /dev/null +++ b/Iceberg.package/IceExternalJob.class/instance/changed.st @@ -0,0 +1,5 @@ +events +changed + + current >= max ifTrue: [ ^ Job jobAnnouncer announce: (JobEnd on: self) ]. + Job jobAnnouncer announce: (JobChange on: self) \ No newline at end of file diff --git a/Iceberg.package/IceExternalJob.class/instance/current..st b/Iceberg.package/IceExternalJob.class/instance/current..st new file mode 100644 index 0000000000..3477c5a958 --- /dev/null +++ b/Iceberg.package/IceExternalJob.class/instance/current..st @@ -0,0 +1,3 @@ +accessing +current: anInteger + current := anInteger \ No newline at end of file diff --git a/Iceberg.package/IceExternalJob.class/instance/end.st b/Iceberg.package/IceExternalJob.class/instance/end.st new file mode 100644 index 0000000000..e78ab80473 --- /dev/null +++ b/Iceberg.package/IceExternalJob.class/instance/end.st @@ -0,0 +1,3 @@ +events +end + Job jobAnnouncer announce: (JobEnd on: self) \ No newline at end of file diff --git a/Iceberg.package/IceExternalJob.class/instance/ensureStarted.st b/Iceberg.package/IceExternalJob.class/instance/ensureStarted.st new file mode 100644 index 0000000000..6b19275f0b --- /dev/null +++ b/Iceberg.package/IceExternalJob.class/instance/ensureStarted.st @@ -0,0 +1,3 @@ +events +ensureStarted + started ifFalse: [ self start ] \ No newline at end of file diff --git a/Iceberg.package/IceExternalJob.class/instance/initialize.st b/Iceberg.package/IceExternalJob.class/instance/initialize.st new file mode 100644 index 0000000000..7bf0fc22a3 --- /dev/null +++ b/Iceberg.package/IceExternalJob.class/instance/initialize.st @@ -0,0 +1,4 @@ +initialization +initialize + super initialize. + started := false \ No newline at end of file diff --git a/Iceberg.package/IceExternalJob.class/instance/max..st b/Iceberg.package/IceExternalJob.class/instance/max..st new file mode 100644 index 0000000000..95db8d84f2 --- /dev/null +++ b/Iceberg.package/IceExternalJob.class/instance/max..st @@ -0,0 +1,3 @@ +accessing +max: anInteger + max := anInteger \ No newline at end of file diff --git a/Iceberg.package/IceExternalJob.class/instance/min..st b/Iceberg.package/IceExternalJob.class/instance/min..st new file mode 100644 index 0000000000..72f1e4536b --- /dev/null +++ b/Iceberg.package/IceExternalJob.class/instance/min..st @@ -0,0 +1,3 @@ +accessing +min: anInteger + min := anInteger \ No newline at end of file diff --git a/Iceberg.package/IceExternalJob.class/instance/owner.st b/Iceberg.package/IceExternalJob.class/instance/owner.st new file mode 100644 index 0000000000..a4fdfffe4b --- /dev/null +++ b/Iceberg.package/IceExternalJob.class/instance/owner.st @@ -0,0 +1,3 @@ +accessing +owner + ^ nil \ No newline at end of file diff --git a/Iceberg.package/IceExternalJob.class/instance/progress.st b/Iceberg.package/IceExternalJob.class/instance/progress.st new file mode 100644 index 0000000000..182da53b60 --- /dev/null +++ b/Iceberg.package/IceExternalJob.class/instance/progress.st @@ -0,0 +1,3 @@ +accessing +progress + ^ min >= max ifTrue: [ 1 ] ifFalse: [ (current - min) / (max - min) ] \ No newline at end of file diff --git a/Iceberg.package/IceExternalJob.class/instance/start.st b/Iceberg.package/IceExternalJob.class/instance/start.st new file mode 100644 index 0000000000..fd40b7d06a --- /dev/null +++ b/Iceberg.package/IceExternalJob.class/instance/start.st @@ -0,0 +1,5 @@ +events +start + started := true. + + Job jobAnnouncer announce: (JobStart on: self) \ No newline at end of file diff --git a/Iceberg.package/IceExternalJob.class/instance/title..st b/Iceberg.package/IceExternalJob.class/instance/title..st new file mode 100644 index 0000000000..2ec3467fcc --- /dev/null +++ b/Iceberg.package/IceExternalJob.class/instance/title..st @@ -0,0 +1,3 @@ +accessing +title: aString + title := aString \ No newline at end of file diff --git a/Iceberg.package/IceExternalJob.class/instance/title.st b/Iceberg.package/IceExternalJob.class/instance/title.st new file mode 100644 index 0000000000..fc1a896a1d --- /dev/null +++ b/Iceberg.package/IceExternalJob.class/instance/title.st @@ -0,0 +1,3 @@ +accessing +title + ^ title \ No newline at end of file diff --git a/Iceberg.package/IceExternalJob.class/properties.json b/Iceberg.package/IceExternalJob.class/properties.json new file mode 100644 index 0000000000..83dd46937a --- /dev/null +++ b/Iceberg.package/IceExternalJob.class/properties.json @@ -0,0 +1,17 @@ +{ + "commentStamp" : "", + "super" : "Object", + "category" : "Iceberg-Progress", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "title", + "started", + "min", + "max", + "current" + ], + "name" : "IceExternalJob", + "type" : "normal" +} \ No newline at end of file diff --git a/Iceberg.package/IceGitCheckoutProgress.class/README.md b/Iceberg.package/IceGitCheckoutProgress.class/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Iceberg.package/IceGitCheckoutProgress.class/instance/block.st b/Iceberg.package/IceGitCheckoutProgress.class/instance/block.st new file mode 100644 index 0000000000..4e740840eb --- /dev/null +++ b/Iceberg.package/IceGitCheckoutProgress.class/instance/block.st @@ -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. + ] \ No newline at end of file diff --git a/Iceberg.package/IceGitCheckoutProgress.class/instance/initialize.st b/Iceberg.package/IceGitCheckoutProgress.class/instance/initialize.st new file mode 100644 index 0000000000..f0f70710c5 --- /dev/null +++ b/Iceberg.package/IceGitCheckoutProgress.class/instance/initialize.st @@ -0,0 +1,9 @@ +initialization +initialize + super initialize. + + job := IceExternalJob new + title: 'Checking out...'; + yourself. + + self initializeBlock. \ No newline at end of file diff --git a/Iceberg.package/IceGitCheckoutProgress.class/instance/initializeBlock.st b/Iceberg.package/IceGitCheckoutProgress.class/instance/initializeBlock.st new file mode 100644 index 0000000000..937a98ee55 --- /dev/null +++ b/Iceberg.package/IceGitCheckoutProgress.class/instance/initializeBlock.st @@ -0,0 +1,3 @@ +initialization +initializeBlock + self signature: self class fnSpec block: self block. \ No newline at end of file diff --git a/Iceberg.package/IceGitCheckoutProgress.class/properties.json b/Iceberg.package/IceGitCheckoutProgress.class/properties.json new file mode 100644 index 0000000000..d7bf93fa33 --- /dev/null +++ b/Iceberg.package/IceGitCheckoutProgress.class/properties.json @@ -0,0 +1,13 @@ +{ + "commentStamp" : "", + "super" : "LGitCheckoutProgressCallback", + "category" : "Iceberg-Progress", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "job" + ], + "name" : "IceGitCheckoutProgress", + "type" : "normal" +} \ No newline at end of file diff --git a/Iceberg.package/IceGitTransferProgress.class/README.md b/Iceberg.package/IceGitTransferProgress.class/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Iceberg.package/IceGitTransferProgress.class/instance/block.st b/Iceberg.package/IceGitTransferProgress.class/instance/block.st new file mode 100644 index 0000000000..dd323a17d8 --- /dev/null +++ b/Iceberg.package/IceGitTransferProgress.class/instance/block.st @@ -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 + ] \ No newline at end of file diff --git a/Iceberg.package/IceGitTransferProgress.class/instance/initialize.st b/Iceberg.package/IceGitTransferProgress.class/instance/initialize.st new file mode 100644 index 0000000000..21e835b457 --- /dev/null +++ b/Iceberg.package/IceGitTransferProgress.class/instance/initialize.st @@ -0,0 +1,9 @@ +accessing +initialize + super initialize. + + job := IceExternalJob new + title: 'Fetching Git objects...'; + yourself. + + self initializeBlock. \ No newline at end of file diff --git a/Iceberg.package/IceGitTransferProgress.class/instance/initializeBlock.st b/Iceberg.package/IceGitTransferProgress.class/instance/initializeBlock.st new file mode 100644 index 0000000000..694f87e092 --- /dev/null +++ b/Iceberg.package/IceGitTransferProgress.class/instance/initializeBlock.st @@ -0,0 +1,3 @@ +initialize - release +initializeBlock + self signature: self class fnSpec block: self block. \ No newline at end of file diff --git a/Iceberg.package/IceGitTransferProgress.class/properties.json b/Iceberg.package/IceGitTransferProgress.class/properties.json new file mode 100644 index 0000000000..b241be648a --- /dev/null +++ b/Iceberg.package/IceGitTransferProgress.class/properties.json @@ -0,0 +1,13 @@ +{ + "commentStamp" : "", + "super" : "LGitTransferProgressCallback", + "category" : "Iceberg-Progress", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "job" + ], + "name" : "IceGitTransferProgress", + "type" : "normal" +} \ No newline at end of file diff --git a/Iceberg.package/IceRepository.class/instance/fetch.st b/Iceberg.package/IceRepository.class/instance/fetch.st index 7377825716..a00092fd86 100644 --- a/Iceberg.package/IceRepository.class/instance/fetch.st +++ b/Iceberg.package/IceRepository.class/instance/fetch.st @@ -1,4 +1,6 @@ API-remotes fetch "Fetch all commits and branches from all remotes" - self remotes do: [ :each | each fetch ] \ No newline at end of file + + self remotes do: [ :each | each fetch ] + displayingProgress: [ :each | 'Remote: ' , each name asString ] \ No newline at end of file diff --git a/Iceberg.package/monticello.meta/categories.st b/Iceberg.package/monticello.meta/categories.st index aded11e9b4..024b32d047 100644 --- a/Iceberg.package/monticello.meta/categories.st +++ b/Iceberg.package/monticello.meta/categories.st @@ -4,6 +4,7 @@ SystemOrganization addCategory: #'Iceberg-Announcements'! SystemOrganization addCategory: #'Iceberg-Changes'! SystemOrganization addCategory: #'Iceberg-Core'! SystemOrganization addCategory: #'Iceberg-Errors'! +SystemOrganization addCategory: #'Iceberg-Progress'! SystemOrganization addCategory: #'Iceberg-Project'! SystemOrganization addCategory: #'Iceberg-Security'! SystemOrganization addCategory: #'Iceberg-Url'! From 5a45eaf9c0e853c008de2600d2e8cdfa5663f349 Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Mon, 25 Jun 2018 17:40:26 +0200 Subject: [PATCH 2/5] Fix the could not locate repository action. --- .../instance/basicExecute.st | 5 +---- .../{updateLocation.subdirectory..st => updateLocation..st} | 6 ++---- 2 files changed, 3 insertions(+), 8 deletions(-) rename Iceberg-TipUI.package/IceTipRepositoryModel.class/instance/{updateLocation.subdirectory..st => updateLocation..st} (61%) diff --git a/Iceberg-TipUI.package/IceTipRepairLocateRepository.class/instance/basicExecute.st b/Iceberg-TipUI.package/IceTipRepairLocateRepository.class/instance/basicExecute.st index 4364ce2d94..dc82bcfd72 100644 --- a/Iceberg-TipUI.package/IceTipRepairLocateRepository.class/instance/basicExecute.st +++ b/Iceberg-TipUI.package/IceTipRepairLocateRepository.class/instance/basicExecute.st @@ -3,15 +3,12 @@ basicExecute | dialog | dialog := IceTipLocalRepositoryPanel new location: (self repository location ifNil: [ self defaultLocation ]); - subdirectory: (self repository subdirectory ifNil: [ self defaultSubdirectory ]); yourself. dialog openDialogWithSpec okAction: [ [ dialog validate. - self repositoryModel - updateLocation: dialog location - subdirectory: dialog subdirectory. + self repositoryModel updateLocation: dialog location. true ] on: AssertionFailure do: [ :e | diff --git a/Iceberg-TipUI.package/IceTipRepositoryModel.class/instance/updateLocation.subdirectory..st b/Iceberg-TipUI.package/IceTipRepositoryModel.class/instance/updateLocation..st similarity index 61% rename from Iceberg-TipUI.package/IceTipRepositoryModel.class/instance/updateLocation.subdirectory..st rename to Iceberg-TipUI.package/IceTipRepositoryModel.class/instance/updateLocation..st index ac75bee61f..1c8d1b2a01 100644 --- a/Iceberg-TipUI.package/IceTipRepositoryModel.class/instance/updateLocation.subdirectory..st +++ b/Iceberg-TipUI.package/IceTipRepositoryModel.class/instance/updateLocation..st @@ -1,10 +1,8 @@ actions -updateLocation: aReference subdirectory: aString +updateLocation: aReference "change location" - self entity - location: aReference; - subdirectory: aString. + self entity location: aReference. "force refresh packages" self entity workingCopy project: self entity project. From 64c60843124b0cf0513b6e1f351a37ec197a977c Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Mon, 25 Jun 2018 22:42:33 +0200 Subject: [PATCH 3/5] Push Tranfer progress --- .../IceGitLocalBranch.class/instance/pushTo..st | 17 +++++++++++++---- .../IcePushTransferProgress.class/README.md | 0 .../instance/block.st | 14 ++++++++++++++ .../instance/initialize.st | 9 +++++++++ .../instance/initializeBlock.st | 3 +++ .../instance/title.st | 3 +++ .../properties.json | 13 +++++++++++++ 7 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 Iceberg.package/IcePushTransferProgress.class/README.md create mode 100644 Iceberg.package/IcePushTransferProgress.class/instance/block.st create mode 100644 Iceberg.package/IcePushTransferProgress.class/instance/initialize.st create mode 100644 Iceberg.package/IcePushTransferProgress.class/instance/initializeBlock.st create mode 100644 Iceberg.package/IcePushTransferProgress.class/instance/title.st create mode 100644 Iceberg.package/IcePushTransferProgress.class/properties.json diff --git a/Iceberg-Libgit.package/IceGitLocalBranch.class/instance/pushTo..st b/Iceberg-Libgit.package/IceGitLocalBranch.class/instance/pushTo..st index 2721eb092e..370057442a 100644 --- a/Iceberg-Libgit.package/IceGitLocalBranch.class/instance/pushTo..st +++ b/Iceberg-Libgit.package/IceGitLocalBranch.class/instance/pushTo..st @@ -1,9 +1,13 @@ API-remotes pushTo: aRemote + repository handleLibgitError: [ | gitRemote | gitRemote := (LGitRemote of: self repositoryHandle named: aRemote name) lookup. - [ gitRemote + [ + | pushProgress | + pushProgress := IcePushTransferProgress new. + gitRemote pushWithRefSpec: (LGitRefSpec new source: self fullname; @@ -11,12 +15,15 @@ pushTo: aRemote yourself) pushOptions: (LGitPushOptions defaults - callbacks: (LGitRemoteCallbacks withProvider: (IceCredentialsProvider defaultForRemote: aRemote)); + callbacks: ((LGitRemoteCallbacks withProvider: (IceCredentialsProvider defaultForRemote: aRemote)) + pushTransferProgress: pushProgress; + yourself ); yourself). "Push tags!" self tags - do: [ :tag | + do: [ :tag | + | tagProgress | gitRemote pushWithRefSpec: (LGitRefSpec new @@ -25,7 +32,9 @@ pushTo: aRemote yourself) pushOptions: (LGitPushOptions defaults - callbacks: (LGitRemoteCallbacks withProvider: (IceCredentialsProvider defaultForRemote: aRemote)); + callbacks: ((LGitRemoteCallbacks withProvider: (IceCredentialsProvider defaultForRemote: aRemote)) + pushTransferProgress: pushProgress; + yourself); yourself) ] ] on: LGit_GIT_ENONFASTFORWARD do: [ :e | diff --git a/Iceberg.package/IcePushTransferProgress.class/README.md b/Iceberg.package/IcePushTransferProgress.class/README.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Iceberg.package/IcePushTransferProgress.class/instance/block.st b/Iceberg.package/IcePushTransferProgress.class/instance/block.st new file mode 100644 index 0000000000..997862dd51 --- /dev/null +++ b/Iceberg.package/IcePushTransferProgress.class/instance/block.st @@ -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 + ] \ No newline at end of file diff --git a/Iceberg.package/IcePushTransferProgress.class/instance/initialize.st b/Iceberg.package/IcePushTransferProgress.class/instance/initialize.st new file mode 100644 index 0000000000..7561bdca83 --- /dev/null +++ b/Iceberg.package/IcePushTransferProgress.class/instance/initialize.st @@ -0,0 +1,9 @@ +accessing +initialize + super initialize. + + job := IceExternalJob new + title: self title; + yourself. + + self initializeBlock. \ No newline at end of file diff --git a/Iceberg.package/IcePushTransferProgress.class/instance/initializeBlock.st b/Iceberg.package/IcePushTransferProgress.class/instance/initializeBlock.st new file mode 100644 index 0000000000..937a98ee55 --- /dev/null +++ b/Iceberg.package/IcePushTransferProgress.class/instance/initializeBlock.st @@ -0,0 +1,3 @@ +initialization +initializeBlock + self signature: self class fnSpec block: self block. \ No newline at end of file diff --git a/Iceberg.package/IcePushTransferProgress.class/instance/title.st b/Iceberg.package/IcePushTransferProgress.class/instance/title.st new file mode 100644 index 0000000000..73b4d71da3 --- /dev/null +++ b/Iceberg.package/IcePushTransferProgress.class/instance/title.st @@ -0,0 +1,3 @@ +accessing +title + ^ 'Pushing...' \ No newline at end of file diff --git a/Iceberg.package/IcePushTransferProgress.class/properties.json b/Iceberg.package/IcePushTransferProgress.class/properties.json new file mode 100644 index 0000000000..4701fc6e89 --- /dev/null +++ b/Iceberg.package/IcePushTransferProgress.class/properties.json @@ -0,0 +1,13 @@ +{ + "commentStamp" : "", + "super" : "LGitPushTransferProgressCallback", + "category" : "Iceberg-Progress", + "classinstvars" : [ ], + "pools" : [ ], + "classvars" : [ ], + "instvars" : [ + "job" + ], + "name" : "IcePushTransferProgress", + "type" : "normal" +} \ No newline at end of file From 4b88735d943f5aa1f5cf72607ff165c38a92796f Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Tue, 26 Jun 2018 10:19:58 +0200 Subject: [PATCH 4/5] Updating the version of libgit2 --- .../BaselineOfIceberg.class/instance/libGit..st | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BaselineOfIceberg.package/BaselineOfIceberg.class/instance/libGit..st b/BaselineOfIceberg.package/BaselineOfIceberg.class/instance/libGit..st index ddadea45c9..627b999df1 100644 --- a/BaselineOfIceberg.package/BaselineOfIceberg.class/instance/libGit..st +++ b/BaselineOfIceberg.package/BaselineOfIceberg.class/instance/libGit..st @@ -4,7 +4,7 @@ libgit: spec baseline: 'LibGit' with: [ spec - repository: 'github://pharo-vcs/libgit2-pharo-bindings:v1.4.0'; + repository: 'github://pharo-vcs/libgit2-pharo-bindings:v1.5.0'; loads: 'default' ]. spec project: 'LibGit-Tests' From d39f32b01eb31ff670bda508a64ec88b0a95e47f Mon Sep 17 00:00:00 2001 From: Pablo Tesone Date: Tue, 26 Jun 2018 10:50:13 +0200 Subject: [PATCH 5/5] Fixing problem with the lazy initialization. --- .../instance/refreshProjectFromRepository.st | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Iceberg.package/IceWorkingCopy.class/instance/refreshProjectFromRepository.st b/Iceberg.package/IceWorkingCopy.class/instance/refreshProjectFromRepository.st index daa07e7dc2..8baeee843c 100644 --- a/Iceberg.package/IceWorkingCopy.class/instance/refreshProjectFromRepository.st +++ b/Iceberg.package/IceWorkingCopy.class/instance/refreshProjectFromRepository.st @@ -4,4 +4,6 @@ refreshProjectFromRepository project := (referenceCommit isCollection ifTrue: [ referenceCommit first ] ifFalse: [ referenceCommit ]) project. - self refreshProject \ No newline at end of file + self refreshProject. + + ^ project \ No newline at end of file