Skip to content

Commit

Permalink
Merging with c03e07e
Browse files Browse the repository at this point in the history
  • Loading branch information
estebanlm committed Aug 24, 2017
2 parents 4ab614b + c03e07e commit 1407d94
Show file tree
Hide file tree
Showing 23 changed files with 81 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ cloneRepositoryFrom: aRemote branch: aBranchName
| repo cloneOptions |
repo := LGitRepository on: self location.
cloneOptions := LGitCloneOptions withCredentialsProvider: IceCredentialsProvider default.

cloneOptions checkoutOptions checkoutStrategy: LGitCheckoutStrategyEnum git_checkout_none.
repo clone: url options: cloneOptions.
aBranchName ifNotNil: [
repo checkout: aBranchName ].
repo checkout: (aBranchName ifNil: [
self branch
ifNotNil: [ :b | b name ]
ifNil: [ 'master' ] ]).

(LGitRemote of: repo named: 'origin')
lookup;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
initialization
invalidateOn: announcementType from: announcer
announcer subscribe: announcementType send: #reset to: self
announcer when: announcementType send: #reset to: self
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
private
configureRepository: aRepository
aRepository register
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ createRepository
location: self location;
subdirectory: subdirectory text;
createRepository.
repository register.
self configureRepository: repository.

self window delete.
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
actions
guessSubDirectory
"If a '.filetree' file, there is a high chance that this is a smalltalk code directory. In that case, the directory containing it is probably the subdirectory of the repository."

| location |
location := localDirectoryLocation location.
location files
detect: [ :file | file basename = '.filetree' ]
ifFound: [ :dir | subdirectory text: '' ]
ifNone: [ location directories do: [ :directory | directory files detect: [ :file | file basename = '.filetree' ] ifFound: [ :file | subdirectory text: directory basename ] ] ]
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ initialization
initializeWidgets
localDirectoryLocation := self instantiate: IceDirectoryModel.
localDirectoryLocation
onChoose: [ self guessSubDirectory ];
label: 'Local directory';
chooseTitle: 'Choose local repository';
location: self defaultLocation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ buildOn: aPresenter
onChangeOfPort: #entity act: [ :presentation |
self diff ifNotNil: [
self diff announcer
subscribe: IceChangeSetChanged
when: IceChangeSetChanged
send: #execute:
to: (IceChangesTreeResetSelectionHelper for: presentation) ] ];
yourself
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ buildOn: aPresenter
onChangeOfPort: #entity act: [ :presentation |
self diff ifNotNil: [
self diff announcer
subscribe: IceChangeSetChanged
when: IceChangeSetChanged
send: #execute:
to: (IceChangesTreeResetSelectionHelper for: presentation) ] ];
yourself
3 changes: 2 additions & 1 deletion Iceberg-UI.package/IceLocationModel.class/instance/choose.st
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ actions
choose
self chooseReference ifNotNil: [ :reference |
self location: reference.
self locationInput text: reference pathString ]
self locationInput text: reference pathString.
self onChoose ifNotNil: #value ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
hook
onChoose: aBlockClosure
"I allow to set a hook to execute when the user select a location."

chooseBlock := aBlockClosure
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
hook
onChoose
^ chooseBlock
3 changes: 2 additions & 1 deletion Iceberg-UI.package/IceLocationModel.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
"locationInput",
"chooseButton",
"label",
"chooseTitle"
"chooseTitle",
"chooseBlock"
],
"name" : "IceLocationModel",
"type" : "normal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ composeRepositories: repositories in: composite
table updateOn: MCPackageModified from: MCPackageManager announcer.

Iceberg announcer weak
subscribe: IceRepositoryCreated
when: IceRepositoryCreated
send: #execute:
to: (IceRepositoryUpdateHelper for: table).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ composeRepositoriesIn: composite
table updateOn: MCPackageModified from: MCPackageManager announcer.

Iceberg announcer weak
subscribe: IceRepositoryCreated
when: IceRepositoryCreated
send: #execute:
to: (IceRepositoryUpdateHelper for: table).

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
actions
restore
self repository backend cloneRepository.
self repository refresh.
(IceRestoreRepositoryModel repository: self repository) openWithSpec
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
instance creation
new
self error: 'Use #repository:'
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
instance creation
repository: aRepository
^ self basicNew
initializeRepository: aRepository;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
private
configureRepository: aRepository
repository location = aRepository location
ifFalse: [ repository location: aRepository location ].
repository subdirectory = aRepository subdirectory
ifFalse: [ repository subdirectory: aRepository subdirectory ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
initialization
initializeRepository: aRepository
repository := aRepository.
self initialize.
repository location ifNotNil: [
remoteUrl text: repository origin url.
localDirectoryLocation location: repository location ].
subdirectory text: repository subdirectory
13 changes: 13 additions & 0 deletions Iceberg-UI.package/IceRestoreRepositoryModel.class/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"commentStamp" : "",
"super" : "IceCloneRepositoryModel",
"category" : "Iceberg-UI-View",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"repository"
],
"name" : "IceRestoreRepositoryModel",
"type" : "normal"
}
2 changes: 1 addition & 1 deletion Iceberg.package/IceDiff.class/instance/repository..st
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ accessing
repository: anObject
repository := anObject.
repository announcer weak
subscribe: IceCommited send: #refresh to: self
when: IceCommited send: #refresh to: self
14 changes: 7 additions & 7 deletions Iceberg.package/monticello.meta/categories.st
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
SystemOrganization addCategory: #Iceberg!
SystemOrganization addCategory: 'Iceberg-Adapters'!
SystemOrganization addCategory: 'Iceberg-Announcements'!
SystemOrganization addCategory: 'Iceberg-Changes'!
SystemOrganization addCategory: 'Iceberg-Core'!
SystemOrganization addCategory: 'Iceberg-Core-Remotes'!
SystemOrganization addCategory: 'Iceberg-Errors'!
SystemOrganization addCategory: 'Iceberg-Security'!
SystemOrganization addCategory: #'Iceberg-Adapters'!
SystemOrganization addCategory: #'Iceberg-Announcements'!
SystemOrganization addCategory: #'Iceberg-Changes'!
SystemOrganization addCategory: #'Iceberg-Core'!
SystemOrganization addCategory: #'Iceberg-Core-Remotes'!
SystemOrganization addCategory: #'Iceberg-Errors'!
SystemOrganization addCategory: #'Iceberg-Security'!

0 comments on commit 1407d94

Please sign in to comment.