summaryrefslogtreecommitdiffstats
path: root/git/parent.rb
diff options
context:
space:
mode:
authorKenny Woodson <kwoodson@redhat.com>2016-01-19 15:10:22 -0500
committerKenny Woodson <kwoodson@redhat.com>2016-01-19 15:10:22 -0500
commit8ce35b40a55f46f716f280054594c8b5d39cd547 (patch)
tree97a31697b2962e51381bb6009e9ca3d96001ba85 /git/parent.rb
parentcdf8cafd5d8ec1103758e39123b3f67b4f2c0722 (diff)
parent3f9c84336fb3b1cfdfb0872af1cd6ed7c5daa2b2 (diff)
downloadopenshift-8ce35b40a55f46f716f280054594c8b5d39cd547.tar.gz
openshift-8ce35b40a55f46f716f280054594c8b5d39cd547.tar.bz2
openshift-8ce35b40a55f46f716f280054594c8b5d39cd547.tar.xz
openshift-8ce35b40a55f46f716f280054594c8b5d39cd547.zip
Merge pull request #1234 from kwoodson/remove_ruby
Removing ruby scripts.
Diffstat (limited to 'git/parent.rb')
-rwxr-xr-xgit/parent.rb45
1 files changed, 0 insertions, 45 deletions
diff --git a/git/parent.rb b/git/parent.rb
deleted file mode 100755
index 2acb127c4..000000000
--- a/git/parent.rb
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/usr/bin/env ruby
-#
-#
-#
-
-if __FILE__ == $0
- # If we aren't on master we don't need to parent check
- branch = 'prod'
- exit(0) if ARGV[0] !~ /#{branch}/
- commit_id = ARGV[1]
- %x[/usr/bin/git checkout #{branch}]
- %x[/usr/bin/git merge #{commit_id}]
-
- count = 0
- #lines = %x[/usr/bin/git rev-list --left-right stg...master].split("\n")
- lines = %x[/usr/bin/git rev-list --left-right remotes/origin/stg...#{branch}].split("\n")
- lines.each do |commit|
- # next if they are in stage
- next if commit =~ /^</
- # remove the first char '>'
- commit = commit[1..-1]
- # check if any remote branches contain $commit
- results = %x[/usr/bin/git branch -q -r --contains #{commit} 2>/dev/null ]
- # if this comes back empty, nothing contains it, we can skip it as
- # we have probably created the merge commit here locally
- next if results.empty?
-
- # The results generally contain origin/pr/246/merge and origin/pr/246/head
- # this is the pull request which would contain the commit in question.
- #
- # If the results do not contain origin/stg then stage does not contain
- # the commit in question. Therefore we need to alert!
- unless results =~ /origin\/stg/
- puts "\nFAILED: (These commits are not in stage.)\n"
- puts "\t#{commit}"
- count += 1
- end
- end
-
- # Exit with count of commits in #{branch} but not stg
- exit(count)
-end
-
-__END__
-