Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge last changes #410

Merged
merged 20 commits into from
Jul 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
bd937b7
safer check of empty selection of packages
pavel-krivanek Apr 11, 2017
d9aa549
This group the branches by remotes in the branches view.
jecisc Jul 9, 2017
137af72
Put the local group as bold.
jecisc Jul 9, 2017
2434301
It is #allExpanded and not #shouldExpandAll
jecisc Jul 9, 2017
6bc5bfb
Do not display remote name in the branch view since they are now grou…
jecisc Jul 12, 2017
51e5861
This add a filter to the package tab. It will filter if the package n…
jecisc Jul 12, 2017
d721d27
Use #diffFromSource and #diffToSource to ensure the metadata are both…
jecisc Jul 13, 2017
0d54121
Move Iceberg to most used tools in the world menu since it is the def…
jecisc Jul 14, 2017
c0e3d6c
Remove unused variables.
jecisc Jul 14, 2017
07d0491
Merge pull request #407 from jecisc/cf_removeUnusedVariables
estebanlm Jul 14, 2017
7106e9f
Merge pull request #406 from jecisc/cf_moveIcebergToMostUsedToolsInWo…
estebanlm Jul 14, 2017
6058332
Merge pull request #405 from jecisc/cf_ensureDiffViewHasSameMetadata
estebanlm Jul 14, 2017
a77d0d3
Merge pull request #392 from jecisc/cf_groupBranchesByRemote
estebanlm Jul 14, 2017
625ed7f
Merge pull request #394 from jecisc/cf_addFilterToPackageView
estebanlm Jul 14, 2017
c4c8276
Merge pull request #330 from pavel-krivanek/issue329
estebanlm Jul 14, 2017
c6a889b
Define #packageName instead of `package name`
jecisc Jul 14, 2017
09e9449
Merge pull request #408 from jecisc/cf_addFilterToPackageView
estebanlm Jul 14, 2017
5745335
remove unused (and conflicting) methods
estebanlm Jul 17, 2017
b330b89
method not needed anymore
estebanlm Jul 17, 2017
f96928e
Merge branch 'master' into dev-0.5
estebanlm Jul 17, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

This file was deleted.

13 changes: 13 additions & 0 deletions Iceberg-UI.package/IceAbstractBranchModel.class/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Description
--------------------

I am an abstract class to define a common API for my subclasses that will manage some actions for some branch view of Iceberg. My subclasses will encapsulate a branch or a remote.

I am use in the branch view of the main browser of Iceberg.

Public API and Key Messages
--------------------

- #children It should return the children of my element. It will probably return the branches of a remote for the remotes and nothing for the branches.
- #nameToDisplay String to show to the user.
- #status Status to show to the user about incomming/unpublished commits.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
children
"It should return the children of my element. It will probably return the branches of a remote for the remotes and nothing for the branches."

^ self subclassResponsibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testing
isBranchModel
^ false
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
nameToDisplay
^ self subclassResponsibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
repository
^ self subclassResponsibility
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
status
^ self subclassResponsibility
11 changes: 11 additions & 0 deletions Iceberg-UI.package/IceAbstractBranchModel.class/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "CyrilFerlicot 7/9/2017 03:25",
"super" : "Object",
"category" : "Iceberg-UI-Utils",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "IceAbstractBranchModel",
"type" : "normal"
}
24 changes: 24 additions & 0 deletions Iceberg-UI.package/IceBranchGroupModel.class/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Description
--------------------

I represent a group of branches. I am used in two principal cases.

1) We want to group the branches of a remote
2) We want to group the local branches

Examples
--------------------

"For a remote"
IceBranchGroupModel repository: anIceRepository remote: anIceRemote.

"For local branches"
IceBranchGroupModel localFromRepository: anIceRepository

Internal Representation and Key Implementation Points.
--------------------

Instance Variables
branches: <aBlockOrSymbol> This block takes the repository as parameter and should return the branches of the group
groupName: <aString> Name of the group. In case I represent a remote it will be the remote name, else it will probably be "Local"
repository: <anIceRepository> The repository where to get the branches
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
instance creation
localFromRepository: aRepository
^ self
repository: aRepository
branches: #localBranches
groupName:
('Local' asText
allBold;
yourself)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
instance creation
repository: aRepository branches: aCollection groupName: aString
^ self new
repository: aRepository;
branches: aCollection;
groupName: aString;
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
instance creation
repository: aRepository remote: aRemote
^ self repository: aRepository branches: [ :repository | aRemote branchesFrom: repository ] groupName: aRemote asString
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
branches: aBlockOrSymbol
branches := aBlockOrSymbol
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
branches
^ branches cull: self repository
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
children
^ self branches collect: [ :branch | IceBranchModel parent: self branch: branch ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
groupName: aString
groupName := aString
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
groupName
^ groupName
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
nameToDisplay
^ self groupName
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
repository: anIceRepository
repository := anIceRepository
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
repository
^ repository
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
status
^ self branches size asString , ' branches'
15 changes: 15 additions & 0 deletions Iceberg-UI.package/IceBranchGroupModel.class/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"commentStamp" : "CyrilFerlicot 7/9/2017 03:35",
"super" : "IceAbstractBranchModel",
"category" : "Iceberg-UI-Utils",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"repository",
"branches",
"groupName"
],
"name" : "IceBranchGroupModel",
"type" : "normal"
}
16 changes: 16 additions & 0 deletions Iceberg-UI.package/IceBranchModel.class/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Description
--------------------

I represent an unique branch. I should be contained in an IceBranchGroupModel.

Examples
--------------------

IceBranchModel parent: anIceBranchGroupModel branch: anIceBranch

Internal Representation and Key Implementation Points.
--------------------

Instance Variables
branch: <anIceBranch> The branch I should display info for.
parentGroup: <anIceBranchGroupModel> The branch group inside of which I am.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
instance creation
parent: anIceBranchGroupModel branch: anIceBranch
^ self new
parentGroup: anIceBranchGroupModel;
branch: anIceBranch;
yourself
3 changes: 3 additions & 0 deletions Iceberg-UI.package/IceBranchModel.class/instance/branch..st
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
branch: anIceBranch
branch := anIceBranch
3 changes: 3 additions & 0 deletions Iceberg-UI.package/IceBranchModel.class/instance/branch.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
branch
^ branch
3 changes: 3 additions & 0 deletions Iceberg-UI.package/IceBranchModel.class/instance/children.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
children
^ #()
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
action
compareCurrentToMe
self repository compareCurrentBranchWithBranch: self branch
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testing
isBranchModel
^ true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
nameToDisplay
^ self repository descriptionTextForBranch: self branch
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
parentGroup: anIceBranchGroupModel
parentGroup := anIceBranchGroupModel
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
parentGroup
^ parentGroup
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
repository
^ self parentGroup repository
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
accessing
statusForBranch: aBranch
status
| incoming outgoing allStatus |

incoming := aBranch incomingCommits size.
outgoing := aBranch outgoingCommits size.
incoming := self branch incomingCommits size.
outgoing := self branch outgoingCommits size.

allStatus := OrderedCollection new.
(incoming = 0 and: [ outgoing = 0 ]) ifTrue: [ allStatus add: 'Up to date' ].
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
action
switchToMe
self repository switchBranchTo: self branch
14 changes: 14 additions & 0 deletions Iceberg-UI.package/IceBranchModel.class/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"commentStamp" : "CyrilFerlicot 7/9/2017 03:36",
"super" : "IceAbstractBranchModel",
"category" : "Iceberg-UI-Utils",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [
"parentGroup",
"branch"
],
"name" : "IceBranchModel",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
acessing
nameText
^ self highlight: self package name
^ self highlight: self packageName
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
acessing
packageName
^ self package name
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*Iceberg-UI
branchesFrom: aRepository
"I return all the branches of my remote from a repository"

^ aRepository branches
select: [ :branch | branch isRemote and: [ branch remoteName = self remoteName ] ]
3 changes: 3 additions & 0 deletions Iceberg-UI.package/IceRemote.extension/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"name" : "IceRemote"
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
building
addRepositoryBranchesTo: composite
| branches |

(branches := composite fastTable)
(branches := composite fastTreeTable)
title: 'Branches';
display: #branches;
column: 'Name' evaluated: [ :branch :model | model descriptionTextForBranch: branch ];
column: 'Status' evaluated: [ :branch :model | model statusForBranch: branch ].

display: [ :repository |
| localisations |
localisations := repository remotes collect: [ :remote | IceBranchGroupModel repository: repository remote: remote ] as: OrderedCollection.
repository hasLocalBraches
ifTrue: [ localisations addFirst: (IceBranchGroupModel localFromRepository: repository) ].
localisations ];
children: #children;
column: 'Name' evaluated: #nameToDisplay;
column: 'Status' evaluated: #status;
allExpanded.

"actions"
branches addAction: self branchCreateNewAction.

"selection actions"
branches
branches
addSelectionAction: self branchSwitchAction;
addSelectionAction: self branchCompareWithCurrentAction
addSelectionAction: self branchCompareWithCurrentAction
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ menu actions - branches
branchCompareWithCurrentAction
^ GLMGenericAction new
action: [ :presentation :model |
model compareCurrentBranchWithBranch: presentation selection.
presentation selection compareCurrentToMe.
presentation pane browser update ];
showTitle: 'Compare with current branch';
yourself
enabledCondition: [ :presentation :model | (model isCurrentBranch: presentation selection branch) not ];
condition: [ :presentation | presentation selection ifNil: [ false ] ifNotNil: #isBranchModel ];
showTitle: 'Compare with current branch';
yourself
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ menu actions - branches
branchSwitchAction
^ GLMGenericAction new
action: [ :presentation :model |
model switchBranchTo: presentation selection.
presentation selection switchToMe.
presentation pane browser update ];
showTitle: 'Switch to this branch';
enabledCondition: [ :presentation :model |
(model isCurrentBranch: presentation selection) not ];
showTitle: 'Switch to this branch';
enabledCondition: [ :presentation :model | (model isCurrentBranch: presentation selection branch) not ];
condition: [ :presentation | presentation selection ifNil: [ false ] ifNotNil: #isBranchModel ];
shortcut: $b;
yourself
yourself
Loading