diff --git a/Iceberg-Tests.package/IceRepositoryTest.class/instance/testMetacelloIntegrationForTags.st b/Iceberg-Tests.package/IceRepositoryTest.class/instance/testMetacelloIntegrationForTags.st index eb9f90a033..6d8c8a0eca 100644 --- a/Iceberg-Tests.package/IceRepositoryTest.class/instance/testMetacelloIntegrationForTags.st +++ b/Iceberg-Tests.package/IceRepositoryTest.class/instance/testMetacelloIntegrationForTags.st @@ -15,3 +15,8 @@ testMetacelloIntegrationForTags self assert: ((repository loadedCode versionFor: (repository packageNamed: packageName)) isKindOf: IceSavedPackageVersion ). self assert: repository incommingCommits isEmpty. self assert: repository outgoingCommits isEmpty. + + repository loadedPackages do: [ :package | + self assert: package incommingCommits isEmpty. + self assert: package outgoingCommits isEmpty + ]. diff --git a/Iceberg.package/IceBranch.class/instance/outgoingCommits.st b/Iceberg.package/IceBranch.class/instance/outgoingCommits.st index 1ea4a0e165..6368c8e59e 100644 --- a/Iceberg.package/IceBranch.class/instance/outgoingCommits.st +++ b/Iceberg.package/IceBranch.class/instance/outgoingCommits.st @@ -1,5 +1,3 @@ commits outgoingCommits - ^ self upstream - ifNotNil: [ self commitsNotIn: self upstream ] - ifNil: [ self ownCommits ] + ^ self outgoingCommitsWalk commits \ No newline at end of file diff --git a/Iceberg.package/IceBranch.class/instance/outgoingCommitsWalk.st b/Iceberg.package/IceBranch.class/instance/outgoingCommitsWalk.st new file mode 100644 index 0000000000..e83b2c0619 --- /dev/null +++ b/Iceberg.package/IceBranch.class/instance/outgoingCommitsWalk.st @@ -0,0 +1,10 @@ +commits +outgoingCommitsWalk + | walk | + walk := self repository newCommitWalk fromBranch: self. + self upstream + ifNotNil: [ walk uptoBranch: self upstream ] + ifNil: [ walk uptoBranches: ( + self repository localBranches copyWithout: self) ]. + + ^ walk. \ No newline at end of file diff --git a/Iceberg.package/IceBranch.class/instance/ownCommits.st b/Iceberg.package/IceBranch.class/instance/ownCommits.st deleted file mode 100644 index abc92db3e5..0000000000 --- a/Iceberg.package/IceBranch.class/instance/ownCommits.st +++ /dev/null @@ -1,7 +0,0 @@ -commits -ownCommits - "Return the commits that are only in this branch." - ^ self repository newCommitWalk - fromBranch: self; - uptoBranches: self repository localBranches; - commits. diff --git a/Iceberg.package/IceSavedPackage.class/instance/outgoingCommits.st b/Iceberg.package/IceSavedPackage.class/instance/outgoingCommits.st index 39870f39f2..6d4ad583ae 100644 --- a/Iceberg.package/IceSavedPackage.class/instance/outgoingCommits.st +++ b/Iceberg.package/IceSavedPackage.class/instance/outgoingCommits.st @@ -1,7 +1,5 @@ querying outgoingCommits - ^ self repository newCommitWalk - fromHead; - uptoCommit: self repository currentBranch upstream lastCommit; + ^ self repository currentBranch outgoingCommitsWalk modifyingPackage: self; - commits + commits \ No newline at end of file