require 'sinatra/base' module GitFusion class App < Sinatra::Base get '/git_fusion/v1/repos' do require_p4 p4 = env['p4'] hws_settings = env['hws_settings'] results = p4.run_files('-e', "//#{hws_settings.GIT_FUSION_DEPOT}/repos/*/p4gf_config") repo_names = results.map do |result| m = %r{^//#{hws_settings.GIT_FUSION_DEPOT}/repos/(.*)/p4gf_config}.match(result['depotFile']) m[1] if m end repo_names.to_json end post '/git_fusion/v1/repos' do halt 501 end # It appears that the git fusion repository name can be a path, e.g., # `this_team/sub_project`. get '/git_fusion/v1/repos/*' do {}.to_json end put '/git_fusion/v1/repos/*' do halt 501 end patch '/git_fusion/v1/repos/*' do halt 501 end delete '/git_fusion/v1/repos/*' do halt 501 end end end
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#3 | 15745 | ptomiak |
Second part of shelved changes. Contains updated git-fusion app, changes to string encodig/decoding and updated docs. |
||
#2 | 15744 | ptomiak | Unshelve files from review 15549 to my dev branch. | ||
#1 | 15741 | ptomiak | Branch HWS for my use. | ||
//guest/perforce_software/helix-web-services/main/source/helix_web_services/lib/git_fusion/app.rb | |||||
#1 | 15622 | tjuricek |
Move source code to 'source/' subdirectory of branch. build/ will remain where it is. |
||
//guest/perforce_software/helix-web-services/main/helix_web_services/lib/git_fusion/app.rb | |||||
#2 | 15243 | tjuricek |
Example implementation of Git Fusion repo listing. Seems to work given a wee bit of manual poking against perforce:1666 |
||
#1 | 15241 | tjuricek | Add Git Fusion stubs and documentation. |