diff --git a/Iceberg.package/IceAbstractCommitWalk.class/instance/uptoBranches..st b/Iceberg.package/IceAbstractCommitWalk.class/instance/uptoBranches..st new file mode 100644 index 0000000000..26dffb0256 --- /dev/null +++ b/Iceberg.package/IceAbstractCommitWalk.class/instance/uptoBranches..st @@ -0,0 +1,3 @@ +walk definition +uptoBranches: branches + ^ branches do: [ :branch | self uptoBranch: branch ] \ No newline at end of file diff --git a/Iceberg.package/IceBranch.class/instance/ownCommits.st b/Iceberg.package/IceBranch.class/instance/ownCommits.st index 8c95000711..abc92db3e5 100644 --- a/Iceberg.package/IceBranch.class/instance/ownCommits.st +++ b/Iceberg.package/IceBranch.class/instance/ownCommits.st @@ -1,4 +1,7 @@ commits ownCommits "Return the commits that are only in this branch." - ^ self backend commitsOnlyIn: self name \ No newline at end of file + ^ self repository newCommitWalk + fromBranch: self; + uptoBranches: self repository localBranches; + commits. diff --git a/Iceberg.package/IceMCGitRepository.class/instance/commitsOnlyIn..st b/Iceberg.package/IceMCGitRepository.class/instance/commitsOnlyIn..st deleted file mode 100644 index a5b6399b16..0000000000 --- a/Iceberg.package/IceMCGitRepository.class/instance/commitsOnlyIn..st +++ /dev/null @@ -1,10 +0,0 @@ -querying -commitsOnlyIn: branchName - | otherBranches | - otherBranches := self allBranchNames - reject: [:name | (name beginsWith: 'remotes') or: [ name = branchName ] ] - thenCollect: [ :name | name copyUpTo: Character space ]. - - ^ (self command: { 'log'. branchName. '--not'. otherBranches . '--format=%H' }) - trim lines - collect: [ :id | self frontend commitAt: id ] \ No newline at end of file diff --git a/Iceberg.package/IceMCGitRepository.class/instance/localBranchNames.st b/Iceberg.package/IceMCGitRepository.class/instance/localBranchNames.st deleted file mode 100644 index c311fc61fe..0000000000 --- a/Iceberg.package/IceMCGitRepository.class/instance/localBranchNames.st +++ /dev/null @@ -1,3 +0,0 @@ -accessing -localBranchNames - ^ (self command: 'branch') lines collect: [ :line | line allButFirst: 2 ] \ No newline at end of file diff --git a/Iceberg.package/IceMCGitRepository.class/instance/localBranches.st b/Iceberg.package/IceMCGitRepository.class/instance/localBranches.st new file mode 100644 index 0000000000..8cf0591fe9 --- /dev/null +++ b/Iceberg.package/IceMCGitRepository.class/instance/localBranches.st @@ -0,0 +1,5 @@ +querying +localBranches + ^ (self command: 'branch') lines + reject: [ :line | line matchesRegex: '\* \(detached from (.*)\)' ] + thenCollect: [ :line | IceBranch named: (line allButFirst: 2) inRepository: self frontend ] diff --git a/Iceberg.package/IceRepository.class/instance/localBranchNames.st b/Iceberg.package/IceRepository.class/instance/localBranchNames.st deleted file mode 100644 index 34c3006121..0000000000 --- a/Iceberg.package/IceRepository.class/instance/localBranchNames.st +++ /dev/null @@ -1,3 +0,0 @@ -querying -localBranchNames - ^ self backend localBranchNames diff --git a/Iceberg.package/IceRepository.class/instance/localBranches.st b/Iceberg.package/IceRepository.class/instance/localBranches.st new file mode 100644 index 0000000000..a7efd0b80c --- /dev/null +++ b/Iceberg.package/IceRepository.class/instance/localBranches.st @@ -0,0 +1,3 @@ +querying +localBranches + ^ self backend localBranches \ No newline at end of file