Skip to content

Commit

Permalink
Allow command revisions for gerrit-based toy builds
Browse files Browse the repository at this point in the history
Change-Id: I6ee30acf55897a2dd6835144ca2a3c355fa4f07e
Reviewed-on: http://review.membase.org/6020
Tested-by: Farshid Ghods <farshid.ghods@gmail.com>
Reviewed-by: Farshid Ghods <farshid.ghods@gmail.com>
  • Loading branch information
steveyen authored and farshidce committed May 6, 2011
1 parent 2a21a4d commit 27172d5
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions fetch-manifest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,22 @@
exit(false) unless ok
end

sh %{git reset --hard origin/#{revision} || git reset --hard #{revision}} do |ok, res|
exit(false) unless ok
if revision.include?(' ')
# Handle when the revision attribute is a full command, like...
#
# <project name="ep-engine"
# path="ep-engine"
# revision="git fetch ssh://buildbot@review.membase.org:29418/ep-engine refs/changes/79/5979/1 && git format-patch -1 --stdout FETCH_HEAD"/>
#
# This is useful for gerrit-based test builds.
#
sh revision do |ok, res|
exit(false) unless ok
end
else
sh %{git reset --hard origin/#{revision} || git reset --hard #{revision}} do |ok, res|
exit(false) unless ok
end
end

changes[name] =
Expand Down

0 comments on commit 27172d5

Please sign in to comment.