Skip to content

Commit

Permalink
Add branch name to commit button.
Browse files Browse the repository at this point in the history
  • Loading branch information
npasserini committed Oct 21, 2016
1 parent 3aa941c commit 45306f2
Show file tree
Hide file tree
Showing 27 changed files with 89 additions and 18 deletions.
1 change: 1 addition & 0 deletions Iceberg.package/IceAbstractVersion.class/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Base class for different types of versions, namely: IceVersion (normal versions) and IceForeignVersion (versions not managed by Ice).
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
instance creation
package: package
forPackage: package
^ self new package: package; yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
as yet unclassified
beCurrent
"By default do not to anything, version should have a package manager that makes them current without Iceberg intervention."
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
patches
updatedVersion
^ self
14 changes: 14 additions & 0 deletions Iceberg.package/IceAbstractVersion.class/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "Iceberg-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "NicoPasserini 10/20/2016 15:48",
"instvars" : [
"package" ],
"name" : "IceAbstractVersion",
"pools" : [
],
"super" : "Object",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
initialization
branchName
^ self model repository branch name
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
initialization
initialize
model := nil asValueHolder.
model whenChangedDo: [ commitButton label: 'Commit onto branch ', self branchName ].
super initialize
3 changes: 0 additions & 3 deletions Iceberg.package/IceForeignVersion.class/instance/beCurrent.st

This file was deleted.

4 changes: 4 additions & 0 deletions Iceberg.package/IceForeignVersion.class/instance/mcVersion.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
as yet unclassified
mcVersion
self halt.
^ mcVersion ifNil: [ mcVersion := self package workingCopy loadedVersion ]
9 changes: 9 additions & 0 deletions Iceberg.package/IceForeignVersion.class/instance/printOn..st
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
printing
printOn: aStream
aStream print: self class;
nextPut: $(;
nextPutAll:
(mcVersion
ifNotNil: [ mcVersion printString ]
ifNil: [ self package name ]);
nextPut: $).
6 changes: 3 additions & 3 deletions Iceberg.package/IceForeignVersion.class/properties.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"category" : "Iceberg-Adapters",
"category" : "Iceberg-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "NicoPasserini 9/14/2016 18:01",
"instvars" : [
"package" ],
"mcVersion" ],
"name" : "IceForeignVersion",
"pools" : [
],
"super" : "Object",
"super" : "IceAbstractVersion",
"type" : "normal" }
6 changes: 5 additions & 1 deletion Iceberg.package/IceLoadedCode.class/instance/versionFor..st
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
querying
versionFor: package
^ self loadedVersions at: package ifAbsentPut: [ package computeLoadedVersion ]
^ self loadedVersions
at: package
ifPresent: #updatedVersion
ifAbsentPut: [ package computeLoadedVersion ]

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
as yet unclassified
addTo: aMCRepositoryGroup
"For now do not add me as an MCRepository"
^ aMCRepositoryGroup addBasicRepository: self
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
as yet unclassified
isValid
^ true
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ private
computeLoadedVersion
| workingCopyAncestors |
workingCopyAncestors := self package workingCopy ancestors.
workingCopyAncestors ifEmpty: [ ^ IceTemporaryVersion forPackage: self ].

self workingCopy ancestors
detect: [ :ancestor | (ancestor respondsTo: #iceVersion) and: [ ancestor commit notNil ] ]
Expand All @@ -15,5 +16,5 @@ computeLoadedVersion
^ (self repository commitAt: commitId) versionFor: self ]
].

^ IceForeignVersion package: self.
^ IceForeignVersion forPackage: self.
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
instance creation
forPackage: package
"Use fromCommit:package: instead"
self shouldNotImplement

This file was deleted.

This file was deleted.

3 changes: 1 addition & 2 deletions Iceberg.package/IceSavedPackageVersion.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@
],
"commentStamp" : "NicoPasserini 9/26/2016 11:11",
"instvars" : [
"package",
"entry",
"info",
"commit",
"originatingCommit" ],
"name" : "IceSavedPackageVersion",
"pools" : [
],
"super" : "Object",
"super" : "IceAbstractVersion",
"type" : "normal" }
1 change: 1 addition & 0 deletions Iceberg.package/IceTemporaryVersion.class/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I am a temporary place holder for a version. Someone asked for a version but the package is still being loaded, at some point a real version will replace me. In the meanwhile I can respond to some messages as a version would do.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
patches
updatedVersion
| newVersion |
newVersion := self package computeLoadedVersion.
self package repository loadedCode versionLoaded: newVersion.
^ newVersion
14 changes: 14 additions & 0 deletions Iceberg.package/IceTemporaryVersion.class/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "Iceberg-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "NicoPasserini 10/20/2016 18:24",
"instvars" : [
],
"name" : "IceTemporaryVersion",
"pools" : [
],
"super" : "IceAbstractVersion",
"type" : "normal" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*Iceberg-Adapters
loadedVersion
self ancestors do: [ :ancestor |
(self repositoryGroup
versionWithInfo: ancestor
ifNone: [ MCRepositoryGroup default versionWithInfo: ancestor ifNone: [] ])
ifNotNil: [ :version | ^ version ]
].
2 changes: 2 additions & 0 deletions Iceberg.package/MCWorkingCopy.extension/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
"name" : "MCWorkingCopy" }

0 comments on commit 45306f2

Please sign in to comment.