-
Notifications
You must be signed in to change notification settings - Fork 85
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 #20 from npasserini/newChangeSets
This closes #12 and closes #7Replaced changeset model to allow for …
- Loading branch information
Showing
67 changed files
with
177 additions
and
148 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
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
api | ||
model: newModel | ||
model value: newModel | ||
model: anIceChangeSet | ||
model value: anIceChangeSet. | ||
anIceChangeSet whenChangedDo: [ self tree updateTree. ] |
3 changes: 0 additions & 3 deletions
3
SVS-Git.package/IceClassChangeSet.class/class/class.operations..st
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
SVS-Git.package/IceClassChangeSet.class/class/class.parent..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,6 @@ | ||
instance creation | ||
class: aClass parent: anIcePackageChangeSet | ||
^ self new | ||
targetClass: aClass; | ||
parent: anIcePackageChangeSet; | ||
yourself. |
14 changes: 14 additions & 0 deletions
14
SVS-Git.package/IceClassChangeSet.class/instance/analyseChanges.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 @@ | ||
private | ||
analyseChanges | ||
| newChanges | | ||
newChanges := self parent changes select: [ :operation | | ||
operation targetClass = self targetClass ]. | ||
|
||
newChanges | ||
detect: [ :operation | operation definition isClassDefinition ] | ||
ifFound: [ :classDef | | ||
classDefinition := classDef. | ||
changes := newChanges copyWithout: classDef. | ||
] | ||
ifNone: [ changes := newChanges ]. | ||
|
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 | ||
changes | ||
^ changes ifNil: [ self analyseChanges. changes ] |
3 changes: 3 additions & 0 deletions
3
SVS-Git.package/IceClassChangeSet.class/instance/classDefinition.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 | ||
classDefinition | ||
^ classDefinition ifNil: [ self analyseChanges. classDefinition ] |
2 changes: 1 addition & 1 deletion
2
SVS-Git.package/IceClassChangeSet.class/instance/initialElements.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,3 +1,3 @@ | ||
initialization | ||
initialElements | ||
^ self operations collect: #asIceChangeSet | ||
^ self changes collect: #asIceChangeSet |
10 changes: 0 additions & 10 deletions
10
SVS-Git.package/IceClassChangeSet.class/instance/operations..st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
SVS-Git.package/IceClassChangeSet.class/instance/operations.st
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
SVS-Git.package/IceClassChangeSet.class/instance/updateDiff..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,10 @@ | ||
*SVS-Git-UI | ||
updateDiff: aDiffModel | ||
self classDefinition | ||
ifNil: [ super updateDiff: aDiffModel ] | ||
ifNotNil: [ :cd | | ||
aDiffModel | ||
contextClass: nil; | ||
leftText: cd toSource; | ||
rightText: cd fromSource | ||
] |
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: 3 additions & 2 deletions
5
SVS-Git.package/IceCommitModel.class/instance/initializePresenter.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,5 +1,6 @@ | ||
initialization | ||
initializePresenter | ||
message acceptBlock: [ :text | | ||
text ifNotEmpty: [ self model commitWithMessage: text asString ] ]. | ||
commitButton action: [ message accept ] | ||
text ifNotEmpty: [ self model commitWithMessage: text asString. ] ]. | ||
commitButton action: [ message accept ]. | ||
refreshButton action: [ self model refresh ] |
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
3 changes: 3 additions & 0 deletions
3
SVS-Git.package/IceCommitModel.class/instance/refreshButton.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 | ||
refreshButton | ||
^ refreshButton |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Parent class for any comparison between two versions of the code (working copy, commit or other) and comprising any level of granularity (a whole repository, a package, a class, etc.). |
File renamed without changes.
File renamed without changes.
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. | ||
announcer := Announcer new. |
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 @@ | ||
actions | ||
refresh | ||
elements ifNotNil: [ elements do: #refresh ]. | ||
announcer announce: IceChangeSetChanged new. |
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 | ||
whenChangedDo: aBlock | ||
announcer when: IceChangeSetChanged do: aBlock |
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
8 changes: 4 additions & 4 deletions
8
SVS-Git.package/IceExamples.class/class/exampleChangesTree2.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,10 @@ | ||
examples - change tree | ||
exampleChangesTree2 | ||
| ds git changes | | ||
git := Git new origin: '[email protected]:npasserini/pharo-git.git'. | ||
changes := IceRepositoryChangeSet fromRepository: git. | ||
| repository changeSet ds | | ||
repository := Git new origin: '[email protected]:npasserini/pharo-git-test.git'. | ||
changeSet := IceWorkingCopyDiff forRepository: repository. | ||
ds := FTTreeDataSource | ||
roots: (changes elements sort: [ :a :b | a name < b name ]) | ||
roots: (changeSet elements sort: [ :a :b | a name < b name ]) | ||
children: [ :data | data elements sort: [ :a :b | a name < b name ] ]. | ||
FTTableMorph new | ||
extent: 200 @ 400; | ||
|
8 changes: 4 additions & 4 deletions
8
SVS-Git.package/IceExamples.class/class/exampleChangesTreeOnIcebergPackage.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,8 +1,8 @@ | ||
examples - change tree | ||
exampleChangesTreeOnIcebergPackage | ||
| git changes | | ||
git := Git new origin: '[email protected]:npasserini/pharo-git.git'. | ||
changes := IceRepositoryChangeSet fromRepository: git. | ||
| repository changeSet | | ||
repository := Git new origin: '[email protected]:npasserini/pharo-git-test.git'. | ||
changeSet := IceWorkingCopyDiff forRepository: repository. | ||
IceChangesTreeView new | ||
model: changes; | ||
model: changeSet; | ||
openWithSpec. |
9 changes: 4 additions & 5 deletions
9
SVS-Git.package/IceExamples.class/class/exampleChangesTreeOnTestPackage.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,11 +1,10 @@ | ||
examples - change tree | ||
exampleChangesTreeOnTestPackage | ||
| git changes | | ||
Transcript show: '----------------------------------'; cr. | ||
git := Git new origin: '[email protected]:npasserini/pharo-git-test.git'. | ||
changes := IceRepositoryChangeSet fromRepository: git. | ||
| repository changeSet | | ||
repository := Git new origin: '[email protected]:npasserini/pharo-git-test.git'. | ||
changeSet := IceWorkingCopyDiff forRepository: repository. | ||
IceChangesTreeView new | ||
model: changes; | ||
model: changeSet; | ||
openWithSpec. | ||
|
||
Transcript flush. |
4 changes: 2 additions & 2 deletions
4
SVS-Git.package/IceExamples.class/class/exampleSynchronizer.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,8 +1,8 @@ | ||
examples - change tree | ||
exampleSynchronizer | ||
| repository changeSet | | ||
repository := Git new origin: '[email protected]:npasserini:repackaging/pharo-git.git'. | ||
changeSet := IceRepositoryChangeSet fromRepository: repository. | ||
repository := Git new origin: '[email protected]:npasserini/pharo-git.git'; branch: 'newChangeSets'. | ||
changeSet := IceWorkingCopyDiff forRepository: repository. | ||
IceSynchronizer new | ||
changeSet: changeSet; | ||
openWithSpec. |
10 changes: 0 additions & 10 deletions
10
SVS-Git.package/IceExamples.class/class/exampleSynchronizerRepackaging.st
This file was deleted.
Oops, something went wrong.
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 @@ | ||
Provides a filtered version of a diff, restricted to a package. |
7 changes: 0 additions & 7 deletions
7
SVS-Git.package/IcePackageChangeSet.class/class/fromWorkingCopy.toRepository..st
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
SVS-Git.package/IcePackageChangeSet.class/class/package.parent..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,6 @@ | ||
instance creation | ||
package: aPackage parent: anIceDiff | ||
^ self new | ||
package: aPackage; | ||
parent: anIceDiff; | ||
yourself |
3 changes: 3 additions & 0 deletions
3
SVS-Git.package/IcePackageChangeSet.class/instance/changedClasses.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 | ||
changedClasses | ||
^ self changes collect: #targetClass as: Set |
4 changes: 4 additions & 0 deletions
4
SVS-Git.package/IcePackageChangeSet.class/instance/changes.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,4 @@ | ||
initialization | ||
changes | ||
^ self parent changes select: [ :change | | ||
change targetClass notNil and: [ change targetClass package mcPackage = self package ] ] |
28 changes: 1 addition & 27 deletions
28
SVS-Git.package/IcePackageChangeSet.class/instance/initialElements.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,29 +1,3 @@ | ||
initialization | ||
initialElements | ||
| changeSets localChanges extensionChanges | | ||
|
||
changeSets := (((self patch operations | ||
"If class is nil it represents a package operation, | ||
which is not persisted in current file format." | ||
select: [ :op | op targetClass notNil ]) | ||
groupedBy: #targetClass) | ||
associations collect: [:assoc | | ||
IceClassChangeSet class: assoc key operations: assoc value]) | ||
groupedBy: [ :changeSet | self isExtension: changeSet ]. | ||
|
||
|
||
localChanges := changeSets at: false ifAbsent: {}. | ||
extensionChanges := changeSets at: true | ||
ifPresent: [:extensions | | ||
{ IceSimpleChangeSet | ||
description: '* extension methods' | ||
elements: extensions }] | ||
ifAbsent: {}. | ||
|
||
^ localChanges, extensionChanges | ||
|
||
"[ :op | | targetClass | | ||
targetClass := op targetClass. | ||
targetClass package = self package correspondingRPackage | ||
ifTrue: [targetClass] | ||
ifFalse: ['* extension methods']]" | ||
^ self changedClasses collect: [:class | IceClassChangeSet class: class parent: self ] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
4 changes: 4 additions & 0 deletions
4
SVS-Git.package/IcePackageChangeSet.class/instance/refresh.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,4 @@ | ||
actions | ||
refresh | ||
super refresh. | ||
elements := nil. |
3 changes: 0 additions & 3 deletions
3
SVS-Git.package/IcePackageChangeSet.class/instance/theirs..st
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
7 changes: 0 additions & 7 deletions
7
SVS-Git.package/IceRepositoryChangeSet.class/instance/initialElements.st
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
SVS-Git.package/IceRepositoryChangeSet.class/instance/printOn..st
This file was deleted.
Oops, something went wrong.
Empty file.
Oops, something went wrong.