eac_tools 0.101.3 → 0.102.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +40 -24
- data/lib/eac_tools/version.rb +1 -1
- data/sub/avm-git/avm-git.gemspec +25 -0
- data/sub/avm-git/lib/avm/git/application_scms/base/assert_main_at.rb +44 -0
- data/sub/avm-git/lib/avm/git/application_scms/base.rb +18 -0
- data/sub/avm-git/lib/avm/git/application_scms.rb +9 -0
- data/sub/avm-git/lib/avm/git/commit/class_methods.rb +29 -0
- data/sub/{eac_git/lib/eac_git/local → avm-git/lib/avm/git}/commit/diff_tree_line.rb +2 -2
- data/sub/avm-git/lib/avm/git/commit/file.rb +42 -0
- data/sub/avm-git/lib/avm/git/commit.rb +57 -0
- data/sub/avm-git/lib/avm/git/issue/complete/commits.rb +40 -0
- data/sub/avm-git/lib/avm/git/issue/complete/git_subrepos.rb +20 -0
- data/sub/avm-git/lib/avm/git/issue/complete/local_branch.rb +59 -0
- data/sub/avm-git/lib/avm/git/issue/complete/local_tag.rb +37 -0
- data/sub/avm-git/lib/avm/git/issue/complete/push.rb +60 -0
- data/sub/avm-git/lib/avm/git/issue/complete/remote.rb +33 -0
- data/sub/avm-git/lib/avm/git/issue/complete/test.rb +34 -0
- data/sub/avm-git/lib/avm/git/issue/complete/tracker.rb +21 -0
- data/sub/avm-git/lib/avm/git/issue/complete/validation.rb +36 -0
- data/sub/avm-git/lib/avm/git/issue/complete/validations.rb +54 -0
- data/sub/avm-git/lib/avm/git/issue/complete/working_tree.rb +19 -0
- data/sub/avm-git/lib/avm/git/issue/complete.rb +66 -0
- data/sub/avm-git/lib/avm/git/issue.rb +10 -0
- data/sub/avm-git/lib/avm/git/launcher/base/class_methods.rb +28 -0
- data/sub/avm-git/lib/avm/git/launcher/base/dirty_files.rb +21 -0
- data/sub/avm-git/lib/avm/git/launcher/base/remotes.rb +37 -0
- data/sub/avm-git/lib/avm/git/launcher/base/subrepo.rb +42 -0
- data/sub/avm-git/lib/avm/git/launcher/base/underlying.rb +54 -0
- data/sub/avm-git/lib/avm/git/launcher/base.rb +81 -0
- data/sub/avm-git/lib/avm/git/launcher/error.rb +13 -0
- data/sub/avm-git/lib/avm/git/launcher/mirror_update.rb +36 -0
- data/sub/avm-git/lib/avm/git/launcher/publish_base.rb +127 -0
- data/sub/avm-git/lib/avm/git/launcher/remote.rb +53 -0
- data/sub/avm-git/lib/avm/git/launcher/sub_warp_base.rb +36 -0
- data/sub/avm-git/lib/avm/git/launcher/warp_base.rb +63 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/local_project_mixin.rb +16 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/publish.rb +13 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git/warp.rb +25 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git.rb +22 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/publish.rb +29 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo/warp.rb +82 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subrepo.rb +32 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree/publish.rb +12 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree/warp.rb +29 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/git_subtree.rb +47 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes/provider.rb +17 -0
- data/sub/avm-git/lib/avm/git/launcher_stereotypes.rb +9 -0
- data/sub/avm-git/lib/avm/git/organize/reference_update.rb +32 -0
- data/sub/avm-git/lib/avm/git/organize/repository.rb +74 -0
- data/sub/avm-git/lib/avm/git/organize.rb +9 -0
- data/sub/avm-git/lib/avm/git/revision_test.rb +102 -0
- data/sub/avm-git/lib/avm/git/runners/base/commit.rb +96 -0
- data/sub/avm-git/lib/avm/git/runners/base/deploy.rb +108 -0
- data/sub/avm-git/lib/avm/git/runners/base/dirty_files.rb +42 -0
- data/sub/avm-git/lib/avm/git/runners/base/organize.rb +72 -0
- data/sub/avm-git/lib/avm/git/runners/base/revisions_test.rb +63 -0
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/check.rb +45 -0
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/clone.rb +80 -0
- data/sub/avm-git/lib/avm/git/runners/base/subrepo/fix.rb +69 -0
- data/sub/avm-git/lib/avm/git/runners/base/subrepo.rb +17 -0
- data/sub/avm-git/lib/avm/git/runners/base.rb +40 -0
- data/sub/avm-git/lib/avm/git/runners.rb +9 -0
- data/sub/avm-git/lib/avm/git/scms/git/branch.rb +28 -0
- data/sub/avm-git/lib/avm/git/scms/git/branches.rb +17 -0
- data/sub/avm-git/lib/avm/git/scms/git/change_tracker.rb +34 -0
- data/sub/avm-git/lib/avm/git/scms/git/changed_file.rb +25 -0
- data/sub/avm-git/lib/avm/git/scms/git/changed_files.rb +21 -0
- data/sub/avm-git/lib/avm/git/scms/git/commit/deploy.rb +37 -0
- data/sub/avm-git/lib/avm/git/scms/git/commit/deploy_methods.rb +24 -0
- data/sub/avm-git/lib/avm/git/scms/git/commit.rb +64 -0
- data/sub/avm-git/lib/avm/git/scms/git/commit_dirty.rb +32 -0
- data/sub/avm-git/lib/avm/git/scms/git/commits.rb +44 -0
- data/sub/avm-git/lib/avm/git/scms/git/interval.rb +28 -0
- data/sub/avm-git/lib/avm/git/scms/git/milestones.rb +18 -0
- data/sub/avm-git/lib/avm/git/scms/git/remote.rb +18 -0
- data/sub/avm-git/lib/avm/git/scms/git/remotes.rb +29 -0
- data/sub/avm-git/lib/avm/git/scms/git/run_commit.rb +54 -0
- data/sub/avm-git/lib/avm/git/scms/git.rb +46 -0
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/changed_file.rb +19 -0
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/commit.rb +23 -0
- data/sub/avm-git/lib/avm/git/scms/git_sub_base/interval.rb +23 -0
- data/sub/avm-git/lib/avm/git/scms/git_sub_base.rb +30 -0
- data/sub/avm-git/lib/avm/git/scms/git_subrepo.rb +33 -0
- data/sub/avm-git/lib/avm/git/scms/git_subtree.rb +29 -0
- data/sub/avm-git/lib/avm/git/scms/provider.rb +16 -0
- data/sub/avm-git/lib/avm/git/scms.rb +9 -0
- data/sub/avm-git/lib/avm/git/subrepo_check/parent.rb +48 -0
- data/sub/avm-git/lib/avm/git/subrepo_check/remote.rb +86 -0
- data/sub/avm-git/lib/avm/git/subrepo_check/show_result.rb +30 -0
- data/sub/avm-git/lib/avm/git/subrepo_check.rb +36 -0
- data/sub/avm-git/lib/avm/git/subrepo_checks.rb +57 -0
- data/sub/avm-git/lib/avm/git/vendor/github.rb +20 -0
- data/sub/avm-git/lib/avm/git/vendor.rb +9 -0
- data/sub/avm-git/lib/avm/git/version.rb +7 -0
- data/sub/avm-git/lib/avm/git.rb +16 -0
- data/sub/avm-git/locale/en.yml +6 -0
- data/sub/avm-git/locale/pt-BR.yml +6 -0
- data/sub/{eac_git/spec/lib/eac_git/local → avm-git/spec/lib/avm/git}/commit/diff_tree_line_spec.rb +3 -1
- data/sub/{eac_git/spec/lib/eac_git/local → avm-git/spec/lib/avm/git}/commit_spec.rb +10 -10
- data/sub/avm-git/spec/lib/avm/git/launcher/base_spec.rb +45 -0
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec.rb +83 -0
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec_files/config.yml +5 -0
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/publish_spec_settings.yml +6 -0
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec.rb +53 -0
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec_files/config.yml +3 -0
- data/sub/avm-git/spec/lib/avm/git/launcher_stereotypes/git_subrepo/warp_spec_settings.yml +6 -0
- data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec.rb +126 -0
- data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec_files/append1/stub3.txt.template +1 -0
- data/sub/avm-git/spec/lib/avm/git/runners/base/deploy_spec_files/append2/stub4.txt +1 -0
- data/sub/avm-git/spec/lib/avm/git/scms/git/commit/deploy_spec.rb +92 -0
- data/sub/avm-git/spec/lib/avm/git/scms/git_spec.rb +8 -0
- data/sub/avm-git/spec/lib/avm/git/scms/git_subrepo_spec.rb +8 -0
- data/sub/avm-git/spec/lib/avm/git/vendor/github_spec.rb +23 -0
- data/sub/{eac_git → avm-git}/spec/spec_helper.rb +2 -2
- metadata +132 -250
- data/sub/eac_git/eac_git.gemspec +0 -20
- data/sub/eac_git/lib/eac_git/executables.rb +0 -45
- data/sub/eac_git/lib/eac_git/local/branch.rb +0 -45
- data/sub/eac_git/lib/eac_git/local/changed_file.rb +0 -53
- data/sub/eac_git/lib/eac_git/local/commit/archive.rb +0 -17
- data/sub/eac_git/lib/eac_git/local/commit/changed_file.rb +0 -43
- data/sub/eac_git/lib/eac_git/local/commit.rb +0 -71
- data/sub/eac_git/lib/eac_git/local/dirty_files.rb +0 -26
- data/sub/eac_git/lib/eac_git/local/log.rb +0 -14
- data/sub/eac_git/lib/eac_git/local/remote/push.rb +0 -33
- data/sub/eac_git/lib/eac_git/local/remote.rb +0 -47
- data/sub/eac_git/lib/eac_git/local/remotes.rb +0 -17
- data/sub/eac_git/lib/eac_git/local/subrepo/config.rb +0 -40
- data/sub/eac_git/lib/eac_git/local/subrepo.rb +0 -46
- data/sub/eac_git/lib/eac_git/local.rb +0 -124
- data/sub/eac_git/lib/eac_git/remote.rb +0 -20
- data/sub/eac_git/lib/eac_git/remote_like/ls_result.rb +0 -18
- data/sub/eac_git/lib/eac_git/remote_like.rb +0 -30
- data/sub/eac_git/lib/eac_git/rspec/setup.rb +0 -20
- data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo/directory.rb +0 -35
- data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo/file.rb +0 -21
- data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo/fs_object.rb +0 -25
- data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo/repository.rb +0 -30
- data/sub/eac_git/lib/eac_git/rspec/stubbed_git_local_repo.rb +0 -28
- data/sub/eac_git/lib/eac_git/rspec.rb +0 -7
- data/sub/eac_git/lib/eac_git/version.rb +0 -5
- data/sub/eac_git/lib/eac_git.rb +0 -9
- data/sub/eac_git/spec/lib/eac_git/executables_spec.rb +0 -11
- data/sub/eac_git/spec/lib/eac_git/local/dirty_files_spec.rb +0 -18
- data/sub/eac_git/vendor/git-subrepo/Changes +0 -110
- data/sub/eac_git/vendor/git-subrepo/Intro.pod +0 -509
- data/sub/eac_git/vendor/git-subrepo/License +0 -21
- data/sub/eac_git/vendor/git-subrepo/Makefile +0 -82
- data/sub/eac_git/vendor/git-subrepo/Meta +0 -28
- data/sub/eac_git/vendor/git-subrepo/ReadMe.pod +0 -698
- data/sub/eac_git/vendor/git-subrepo/doc/comparison.swim +0 -35
- data/sub/eac_git/vendor/git-subrepo/doc/git-subrepo.swim +0 -608
- data/sub/eac_git/vendor/git-subrepo/doc/intro-to-subrepo.swim +0 -387
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Changes +0 -15
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/License +0 -21
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Makefile +0 -45
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/Meta +0 -28
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/ReadMe.pod +0 -77
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/bin/bash+ +0 -43
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/doc/bash+.swim +0 -61
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/lib/bash+.bash +0 -92
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/man/man1/bash+.1 +0 -134
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/man/man3/bash+.3 +0 -134
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/base.t +0 -12
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/fcopy.t +0 -22
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/lib/foo/bar.bash +0 -3
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/lib/foo/foo.bash +0 -3
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/source-bash+-std.t +0 -18
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/source-bash+.t +0 -23
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/test.bash +0 -70
- data/sub/eac_git/vendor/git-subrepo/ext/bashplus/test/use.t +0 -19
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Changes +0 -15
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/License +0 -21
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Makefile +0 -20
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/Meta +0 -30
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ReadMe.pod +0 -115
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/doc/test-more.swim +0 -89
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Changes +0 -15
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/License +0 -21
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Makefile +0 -45
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/Meta +0 -28
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/ReadMe.pod +0 -77
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/bin/bash+ +0 -43
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/doc/bash+.swim +0 -61
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/lib/bash+.bash +0 -92
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man1/bash+.1 +0 -134
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/man/man3/bash+.3 +0 -134
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/base.t +0 -12
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/fcopy.t +0 -22
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/lib/foo/bar.bash +0 -3
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/lib/foo/foo.bash +0 -3
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+-std.t +0 -18
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/source-bash+.t +0 -23
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/test.bash +0 -70
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/bashplus/test/use.t +0 -19
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Changes +0 -15
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/License +0 -21
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Makefile +0 -37
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/Meta +0 -28
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/ReadMe.pod +0 -66
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/doc/test-tap.swim +0 -48
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/lib/test/tap.bash +0 -153
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/man/man3/test-tap.3 +0 -119
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/bail_out.t +0 -13
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/done.t +0 -10
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail.t +0 -20
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/fail_fast.t +0 -15
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/helper.bash +0 -9
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/pass.t +0 -9
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/plan.t +0 -10
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/skip_all.t +0 -20
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/tap.t +0 -13
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/bail.t +0 -14
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/fail.t +0 -7
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/fail_fast.t +0 -12
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/skip-all-init.t +0 -8
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/ext/test-tap-bash/test/test/skip-all-plan.t +0 -9
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/lib/test/more.bash +0 -95
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/man/man3/test-more.3 +0 -173
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/fail.t +0 -20
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/more.t +0 -20
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/pass.t +0 -9
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/setup +0 -8
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/skip_all.t +0 -11
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/test/fail1.t +0 -12
- data/sub/eac_git/vendor/git-subrepo/ext/test-more-bash/test/test/skip_all.t +0 -10
- data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo +0 -1903
- data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo.d/bash+.bash +0 -1
- data/sub/eac_git/vendor/git-subrepo/lib/git-subrepo.d/help-functions.bash +0 -339
- data/sub/eac_git/vendor/git-subrepo/man/man1/git-subrepo.1 +0 -743
- data/sub/eac_git/vendor/git-subrepo/note/0.4.0 +0 -12
- data/sub/eac_git/vendor/git-subrepo/note/AllGitCmds +0 -148
- data/sub/eac_git/vendor/git-subrepo/note/Cases +0 -32
- data/sub/eac_git/vendor/git-subrepo/note/Commands +0 -33
- data/sub/eac_git/vendor/git-subrepo/note/Dags +0 -199
- data/sub/eac_git/vendor/git-subrepo/note/Gists +0 -7
- data/sub/eac_git/vendor/git-subrepo/note/Links +0 -25
- data/sub/eac_git/vendor/git-subrepo/note/Plugins +0 -10
- data/sub/eac_git/vendor/git-subrepo/note/Spec +0 -39
- data/sub/eac_git/vendor/git-subrepo/note/Story1 +0 -57
- data/sub/eac_git/vendor/git-subrepo/note/ToDo +0 -55
- data/sub/eac_git/vendor/git-subrepo/note/design.swim +0 -137
- data/sub/eac_git/vendor/git-subrepo/note/design2.swim +0 -85
- data/sub/eac_git/vendor/git-subrepo/note/init-test +0 -38
- data/sub/eac_git/vendor/git-subrepo/note/pull-dance.txt +0 -18
- data/sub/eac_git/vendor/git-subrepo/note/recreate-rebase-conflict.sh +0 -56
- data/sub/eac_git/vendor/git-subrepo/note/subtree-rebase-fail-example/test.bash +0 -29
- data/sub/eac_git/vendor/git-subrepo/note/test-subrepo-push.sh +0 -69
- data/sub/eac_git/vendor/git-subrepo/note/test.sh +0 -58
- data/sub/eac_git/vendor/git-subrepo/pkg/bin/generate-completion.pl +0 -210
- data/sub/eac_git/vendor/git-subrepo/pkg/bin/generate-help-functions.pl +0 -89
- data/sub/eac_git/vendor/git-subrepo/share/completion.bash +0 -42
- data/sub/eac_git/vendor/git-subrepo/share/enable-completion.sh +0 -50
- data/sub/eac_git/vendor/git-subrepo/share/git-completion.bash +0 -2738
- data/sub/eac_git/vendor/git-subrepo/share/zsh-completion/_git-subrepo +0 -81
- data/sub/eac_git/vendor/git-subrepo/test/branch-all.t +0 -41
- data/sub/eac_git/vendor/git-subrepo/test/branch-rev-list-one-path.t +0 -43
- data/sub/eac_git/vendor/git-subrepo/test/branch-rev-list.t +0 -47
- data/sub/eac_git/vendor/git-subrepo/test/branch.t +0 -52
- data/sub/eac_git/vendor/git-subrepo/test/clean.t +0 -43
- data/sub/eac_git/vendor/git-subrepo/test/clone-annotated-tag.t +0 -45
- data/sub/eac_git/vendor/git-subrepo/test/clone.t +0 -107
- data/sub/eac_git/vendor/git-subrepo/test/compile.t +0 -19
- data/sub/eac_git/vendor/git-subrepo/test/config.t +0 -58
- data/sub/eac_git/vendor/git-subrepo/test/encode.t +0 -91
- data/sub/eac_git/vendor/git-subrepo/test/error.t +0 -171
- data/sub/eac_git/vendor/git-subrepo/test/fetch.t +0 -43
- data/sub/eac_git/vendor/git-subrepo/test/gitignore.t +0 -61
- data/sub/eac_git/vendor/git-subrepo/test/init.t +0 -64
- data/sub/eac_git/vendor/git-subrepo/test/issue29.t +0 -98
- data/sub/eac_git/vendor/git-subrepo/test/issue95.t +0 -98
- data/sub/eac_git/vendor/git-subrepo/test/issue96.t +0 -96
- data/sub/eac_git/vendor/git-subrepo/test/pull-all.t +0 -38
- data/sub/eac_git/vendor/git-subrepo/test/pull-merge.t +0 -113
- data/sub/eac_git/vendor/git-subrepo/test/pull-message.t +0 -88
- data/sub/eac_git/vendor/git-subrepo/test/pull-new-branch.t +0 -58
- data/sub/eac_git/vendor/git-subrepo/test/pull-ours.t +0 -90
- data/sub/eac_git/vendor/git-subrepo/test/pull-theirs.t +0 -82
- data/sub/eac_git/vendor/git-subrepo/test/pull-twice.t +0 -44
- data/sub/eac_git/vendor/git-subrepo/test/pull-worktree.t +0 -40
- data/sub/eac_git/vendor/git-subrepo/test/pull.t +0 -99
- data/sub/eac_git/vendor/git-subrepo/test/push-after-init.t +0 -51
- data/sub/eac_git/vendor/git-subrepo/test/push-force.t +0 -56
- data/sub/eac_git/vendor/git-subrepo/test/push-new-branch.t +0 -61
- data/sub/eac_git/vendor/git-subrepo/test/push-no-changes.t +0 -29
- data/sub/eac_git/vendor/git-subrepo/test/push-squash.t +0 -56
- data/sub/eac_git/vendor/git-subrepo/test/push.t +0 -176
- data/sub/eac_git/vendor/git-subrepo/test/reclone.t +0 -45
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/HEAD +0 -1
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/config +0 -4
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/1f/0c4b264caed0126814a0ede851a1e0b4e16ae6 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/87/46903fdb1b9c2101377880125917c2e05b4d69 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/94/c86ffc745232d89f78c6f895e11e71272518db +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/c6/76c57b6576743fa56278527aa60ebd2e202a7c +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/objects/f6/2a8ff3feadf39b0a98f1a86ec6d1eb33858ee9 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/refs/heads/master +0 -1
- data/sub/eac_git/vendor/git-subrepo/test/repo/bar/refs/tags/A +0 -1
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/HEAD +0 -1
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/config +0 -4
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/a0/f4cdaaf533a936296cdebbed8206c3b9ededa8 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/e2/1291a1ad392a9d4c51dd9586804f1467b28afd +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/objects/e6/9de29bb2d1d6434b8b29ae775ad8c2e48c5391 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/foo/refs/heads/master +0 -1
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/HEAD +0 -1
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/config +0 -5
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/11/523f5dcf03b4c89b592dc8a3d0308f68da2386 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/14/2addf8ec5f37334e837440122c62f2c68a29ad +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/32/5180321750a21cd7a4e7ecda319e557a4f6a09 +0 -2
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/3d/918c6901c02f43af5d31779dd5e1f9166aeb36 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/3e/4cb596066dce63ba4d047abddb677389b65e19 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/4b/6e53022e7a04f07887697e4f3d7c377fd9822b +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/58/931fc1bd559b59c41ea738fc7ad04f9ad01bd3 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/5e/c0c28e1b806f25efdca18fcf7a74b49c3755bd +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/75/fa6584e748f57eff06eebdc55e9ac21d4fcbf2 +0 -1
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/80/2d5edbd5e1cb7fca82b5bd38e7c8a0a496fb20 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/94/7b3d714c38791e95ad6f928b48c98bb8708acd +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/95/e1f2df3f4d5f3d7a60588c25a7ca8a913d3c2a +0 -1
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/b1/5f4a7666baf40d949548ead946a3370e273479 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/c3/ee8978c4c5d84c3b7d00ba8e5906933d027882 +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/c8/b0bffbc405ef3fad7354ff833fbec36d67ddfa +0 -3
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/dd/8bdb934ec848137f011fe423b185505c343626 +0 -2
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/e2/9be58c767cfeb27235c995d293a7d71aac0135 +0 -2
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/ee/1224401fc6aac595145fa727dcf6706ac8aec1 +0 -1
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/objects/f1/cc1a657b2e805c400f5dcaaa76bd29c6178b1b +0 -0
- data/sub/eac_git/vendor/git-subrepo/test/repo/init/refs/heads/master +0 -1
- data/sub/eac_git/vendor/git-subrepo/test/setup +0 -205
- data/sub/eac_git/vendor/git-subrepo/test/status.t +0 -68
- data/sub/eac_git/vendor/git-subrepo/test/submodule.t +0 -45
- /data/sub/{eac_git → avm-git}/Gemfile +0 -0
- /data/sub/{eac_git/spec/lib/eac_git/local → avm-git/spec/lib/avm/git}/commit/diff_tree_line_spec_files/add.source.out +0 -0
- /data/sub/{eac_git/spec/lib/eac_git/local → avm-git/spec/lib/avm/git}/commit/diff_tree_line_spec_files/add.target.yaml +0 -0
- /data/sub/{eac_git/spec/lib/eac_git/local → avm-git/spec/lib/avm/git}/commit/diff_tree_line_spec_files/modify.source.out +0 -0
- /data/sub/{eac_git/spec/lib/eac_git/local → avm-git/spec/lib/avm/git}/commit/diff_tree_line_spec_files/modify.target.yaml +0 -0
- /data/sub/{eac_git/spec/lib/eac_git/local → avm-git/spec/lib/avm/git}/commit/diff_tree_line_spec_files/remove.source.out +0 -0
- /data/sub/{eac_git/spec/lib/eac_git/local → avm-git/spec/lib/avm/git}/commit/diff_tree_line_spec_files/remove.target.yaml +0 -0
- /data/sub/{eac_git/spec/lib/eac_git/local → avm-git/spec/lib/avm/git}/commit/diff_tree_line_spec_files/rename.source.out +0 -0
- /data/sub/{eac_git/spec/lib/eac_git/local → avm-git/spec/lib/avm/git}/commit/diff_tree_line_spec_files/rename.target.yaml +0 -0
- /data/sub/{eac_git/spec/lib/eac_git/local → avm-git/spec/lib/avm/git}/commit/diff_tree_line_spec_files/rename_modify.source.out +0 -0
- /data/sub/{eac_git/spec/lib/eac_git/local → avm-git/spec/lib/avm/git}/commit/diff_tree_line_spec_files/rename_modify.target.yaml +0 -0
- /data/sub/{eac_git → avm-git}/spec/rubocop_spec.rb +0 -0
@@ -0,0 +1,102 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
class RevisionTest
|
6
|
+
enable_simple_cache
|
7
|
+
enable_speaker
|
8
|
+
common_constructor :git, :sha1, :options
|
9
|
+
|
10
|
+
def banner
|
11
|
+
infov 'Revision to test', sha1
|
12
|
+
::EacRubyUtils::Speaker.context.on(::EacCli::Speaker.new(err_line_prefix: ' ')) do
|
13
|
+
revision_banner
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def successful_label
|
18
|
+
successful?.to_s.send((successful? ? :green : :red))
|
19
|
+
end
|
20
|
+
|
21
|
+
def to_s
|
22
|
+
sha1
|
23
|
+
end
|
24
|
+
|
25
|
+
def successful?
|
26
|
+
successful
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def checkout_revision
|
32
|
+
infom 'Checking out revision...'
|
33
|
+
git.execute!('checkout', sha1)
|
34
|
+
end
|
35
|
+
|
36
|
+
def commit_uncached
|
37
|
+
::Avm::Git::Commit.new(git, sha1)
|
38
|
+
end
|
39
|
+
|
40
|
+
def git_absolute_path
|
41
|
+
::File.expand_path(git.to_s)
|
42
|
+
end
|
43
|
+
|
44
|
+
def revision_banner
|
45
|
+
infov '* Subject', commit.subject
|
46
|
+
infov '* Success?', successful_label
|
47
|
+
infov '* STDOUT', stdout_cache.content_path
|
48
|
+
infov '* STDERR', stderr_cache.content_path
|
49
|
+
end
|
50
|
+
|
51
|
+
def root_cache
|
52
|
+
fs_cache.child(git_absolute_path.parameterize, sha1,
|
53
|
+
options.fetch(:test_command).to_s.parameterize)
|
54
|
+
end
|
55
|
+
|
56
|
+
def run_test
|
57
|
+
infom "Running test command \"#{::Shellwords.join(test_command_args)}\" " \
|
58
|
+
"on \"#{git_absolute_path}\"..."
|
59
|
+
result = ::EacRubyUtils::Ruby.on_clean_environment { test_command.execute }
|
60
|
+
infom 'Test done'
|
61
|
+
write_result_cache(result)
|
62
|
+
end
|
63
|
+
|
64
|
+
def stdout_cache
|
65
|
+
root_cache.child('stdout')
|
66
|
+
end
|
67
|
+
|
68
|
+
def stderr_cache
|
69
|
+
root_cache.child('stderr')
|
70
|
+
end
|
71
|
+
|
72
|
+
def successful_cache
|
73
|
+
root_cache.child('successful')
|
74
|
+
end
|
75
|
+
|
76
|
+
def successful_uncached # rubocop:disable Naming/PredicateMethod
|
77
|
+
if options.fetch(:no_cache) || !successful_cache.stored?
|
78
|
+
checkout_revision
|
79
|
+
run_test
|
80
|
+
end
|
81
|
+
successful_cache.read == 'true'
|
82
|
+
end
|
83
|
+
|
84
|
+
def test_command
|
85
|
+
::EacRubyUtils::Envs.local.command(*test_command_args).chdir(git.to_s)
|
86
|
+
end
|
87
|
+
|
88
|
+
def test_command_args
|
89
|
+
r = ::Shellwords.split(options.fetch(:test_command).to_s)
|
90
|
+
return r if r.any?
|
91
|
+
|
92
|
+
raise 'No command found'
|
93
|
+
end
|
94
|
+
|
95
|
+
def write_result_cache(result)
|
96
|
+
stdout_cache.write(result[:stdout])
|
97
|
+
stderr_cache.write(result[:stderr])
|
98
|
+
successful_cache.write(result[:exit_code].zero? ? 'true' : 'false')
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
@@ -0,0 +1,96 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class Commit
|
8
|
+
runner_with :help do
|
9
|
+
desc 'Mostra informações de um commit.'
|
10
|
+
bool_opt '-f', '--files', 'Mostra os arquivos.'
|
11
|
+
bool_opt '-s', '--size', 'Mostra o tamanho de arquivos.'
|
12
|
+
pos_arg :ref
|
13
|
+
end
|
14
|
+
|
15
|
+
def run
|
16
|
+
input_banner
|
17
|
+
validate
|
18
|
+
main_info_banner
|
19
|
+
files_banner
|
20
|
+
size_banner
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def input_banner
|
26
|
+
infov 'Repository', git
|
27
|
+
infov 'Reference', reference
|
28
|
+
end
|
29
|
+
|
30
|
+
def validate
|
31
|
+
return if reference_id.present?
|
32
|
+
|
33
|
+
fatal_error "Object ID not found for reference \"#{reference}\""
|
34
|
+
end
|
35
|
+
|
36
|
+
def main_info_banner
|
37
|
+
infov 'Reference ID', reference_id
|
38
|
+
infov 'Subject', commit.subject
|
39
|
+
infov 'Author', commit.author_all
|
40
|
+
infov 'Commiter', commit.commiter_all
|
41
|
+
infov 'Files', commit.files.count
|
42
|
+
end
|
43
|
+
|
44
|
+
def size_banner
|
45
|
+
return unless show_size?
|
46
|
+
|
47
|
+
infov 'Total files size', bytes_size(commit.files_size)
|
48
|
+
end
|
49
|
+
|
50
|
+
def files_banner
|
51
|
+
return unless parsed.files?
|
52
|
+
|
53
|
+
commit.files.each do |file|
|
54
|
+
infov " #{file.path}", file_value(file)
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def file_value(file)
|
59
|
+
s = file.status
|
60
|
+
s += ", #{bytes_size(file.dst_size)}" if show_size?
|
61
|
+
s
|
62
|
+
end
|
63
|
+
|
64
|
+
def reference_id
|
65
|
+
git.rev_parse(reference)
|
66
|
+
end
|
67
|
+
|
68
|
+
def reference
|
69
|
+
parsed.ref
|
70
|
+
end
|
71
|
+
|
72
|
+
def git_uncached
|
73
|
+
::Avm::Git::Launcher::Base.new(runner_context.call(:repository_path))
|
74
|
+
end
|
75
|
+
|
76
|
+
def commit_uncached
|
77
|
+
::Avm::Git::Commit.new(git, reference_id)
|
78
|
+
end
|
79
|
+
|
80
|
+
def human_files_size
|
81
|
+
::Filesize.from("#{commit.files_size} B").pretty
|
82
|
+
end
|
83
|
+
|
84
|
+
def bytes_size(size)
|
85
|
+
b = "#{size} B"
|
86
|
+
"#{::Filesize.from(b).pretty} (#{b})"
|
87
|
+
end
|
88
|
+
|
89
|
+
def show_size?
|
90
|
+
parsed.size?
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class Deploy
|
8
|
+
DEFAULT_REFERENCE = 'HEAD'
|
9
|
+
|
10
|
+
runner_with :help do
|
11
|
+
desc 'Deploy a Git revision to a location (Local or remote).'
|
12
|
+
arg_opt '-a', '--append-dirs', 'Append directories to deploy (List separated by ":").'
|
13
|
+
arg_opt '-i', '--instance', 'Read entries from instance with id=<instance-id>.'
|
14
|
+
arg_opt '-r', '--reference', "Reference (default: #{DEFAULT_REFERENCE})."
|
15
|
+
pos_arg :target_url, optional: true
|
16
|
+
end
|
17
|
+
|
18
|
+
def run
|
19
|
+
input_banner
|
20
|
+
validate
|
21
|
+
main_info_banner
|
22
|
+
deploy
|
23
|
+
success 'Done'
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def input_banner
|
29
|
+
infov 'Repository', git
|
30
|
+
infov 'Reference', reference
|
31
|
+
infov 'Instance ID', instance_id.if_present('- BLANK -')
|
32
|
+
infov 'Appended directories', appended_directories
|
33
|
+
infov 'Target URL', target_url
|
34
|
+
end
|
35
|
+
|
36
|
+
def validate
|
37
|
+
if reference_sha1.blank?
|
38
|
+
fatal_error "Object ID not found for reference \"#{reference}\""
|
39
|
+
end
|
40
|
+
fatal_error 'Nor <target-url> nor --instance was setted' if target_url.blank?
|
41
|
+
end
|
42
|
+
|
43
|
+
def main_info_banner
|
44
|
+
infov 'Reference SHA1', reference_sha1
|
45
|
+
end
|
46
|
+
|
47
|
+
def reference_sha1_uncached
|
48
|
+
git.git_repo.rev_parse(reference)
|
49
|
+
end
|
50
|
+
|
51
|
+
def reference
|
52
|
+
parsed.reference || DEFAULT_REFERENCE
|
53
|
+
end
|
54
|
+
|
55
|
+
def git_uncached
|
56
|
+
::Avm::Git::Scms::Git.new(git_repository_path)
|
57
|
+
end
|
58
|
+
|
59
|
+
def git_repository_path
|
60
|
+
if runner_context.call(:repository_path) || dev_instance_fs_path.blank?
|
61
|
+
return runner_context.call(:repository_path)
|
62
|
+
end
|
63
|
+
|
64
|
+
dev_instance_fs_path
|
65
|
+
end
|
66
|
+
|
67
|
+
def dev_instance_fs_path
|
68
|
+
instance.if_present do |v|
|
69
|
+
v.application.instance('dev').read_entry_optional(
|
70
|
+
::Avm::Instances::EntryKeys::INSTALL_PATH
|
71
|
+
)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
def deploy
|
76
|
+
git.commit(reference_sha1)
|
77
|
+
.deploy_to_url(target_url)
|
78
|
+
.append_templatized_directories(appended_directories)
|
79
|
+
.variables_source_set(variables_source)
|
80
|
+
.run
|
81
|
+
end
|
82
|
+
|
83
|
+
def target_url
|
84
|
+
parsed.target_url.if_present { |v| return v }
|
85
|
+
instance.if_present { |v| return v.install_url }
|
86
|
+
nil
|
87
|
+
end
|
88
|
+
|
89
|
+
def variables_source
|
90
|
+
instance || ::EacConfig::Node.context.current
|
91
|
+
end
|
92
|
+
|
93
|
+
def instance_uncached
|
94
|
+
instance_id.if_present { |v| ::Avm::Instances::Base.by_id(v) }
|
95
|
+
end
|
96
|
+
|
97
|
+
def instance_id
|
98
|
+
parsed.instance
|
99
|
+
end
|
100
|
+
|
101
|
+
def appended_directories
|
102
|
+
parsed.append_dirs.to_s.split(':')
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class DirtyFiles
|
8
|
+
DEFAULT_FORMAT = '%p'
|
9
|
+
FIELDS = {
|
10
|
+
i: :index, w: :worktree, p: :path, a: :absolute_path
|
11
|
+
}.transform_keys { |k| "%#{k}" }
|
12
|
+
|
13
|
+
runner_with :help do
|
14
|
+
desc 'Lists dirty files in Git repository.'
|
15
|
+
arg_opt '-f', '--format',
|
16
|
+
"Format of each line (See \"Format fields\") [default: #{DEFAULT_FORMAT}]."
|
17
|
+
end
|
18
|
+
|
19
|
+
def help_extra_text
|
20
|
+
"Format fields:\n" + FIELDS.map { |k, v| " #{k} => #{v}" }.join("\n") # rubocop:disable Style/StringConcatenation
|
21
|
+
end
|
22
|
+
|
23
|
+
def run
|
24
|
+
runner_context.call(:git).dirty_files.each do |file|
|
25
|
+
out("#{format_file(file)}\n")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
def format
|
32
|
+
parsed.format || DEFAULT_FORMAT
|
33
|
+
end
|
34
|
+
|
35
|
+
def format_file(file)
|
36
|
+
FIELDS.inject(format) { |a, e| a.gsub(e.first, file.send(e.last)) }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class Organize
|
8
|
+
runner_with :help do
|
9
|
+
desc 'Organize branches.'
|
10
|
+
bool_opt '-a', '--all', 'Run all organizations.'
|
11
|
+
bool_opt '-n', '--no', 'Do not run operations.'
|
12
|
+
bool_opt '-o', '--originals', 'Remove refs/original branches.'
|
13
|
+
bool_opt '-s', '--subrepos', 'Remove git-subrepo branches.'
|
14
|
+
bool_opt '-y', '--yes', 'Run operations without confirmation.'
|
15
|
+
end
|
16
|
+
|
17
|
+
def run
|
18
|
+
start_banner
|
19
|
+
collect_references
|
20
|
+
after_collect_banner
|
21
|
+
run_operations
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def after_collect_banner
|
27
|
+
infov 'Collected references', repository.collected_references.count
|
28
|
+
repository.collected_references.each do |ru|
|
29
|
+
infov " * #{ru.reference}", ru.operation
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def collect?(type)
|
34
|
+
parsed.fetch(type) || parsed.all?
|
35
|
+
end
|
36
|
+
|
37
|
+
def collect_references
|
38
|
+
%w[subrepos originals].each do |type|
|
39
|
+
repository.send("collect_#{type}") if collect?(type)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def run_operations
|
44
|
+
return warn('No operations to run (Run with --help to see options)') if
|
45
|
+
repository.collected_references.empty?
|
46
|
+
return unless run_operations?
|
47
|
+
|
48
|
+
repository.collected_references.each do |ru|
|
49
|
+
info "Doing operation #{ru}..."
|
50
|
+
ru.run_operation
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
def run_operations?
|
55
|
+
return true if parsed.yes?
|
56
|
+
return false if parsed.no?
|
57
|
+
|
58
|
+
input('Confirm operations?', bool: true)
|
59
|
+
end
|
60
|
+
|
61
|
+
def repository_uncached
|
62
|
+
::Avm::Git::Organize::Repository.new(runner_context.call(:git).eac_git)
|
63
|
+
end
|
64
|
+
|
65
|
+
def start_banner
|
66
|
+
infov 'Repository', repository
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class RevisionsTest
|
8
|
+
runner_with :help do
|
9
|
+
desc 'Test multiple revisions until a error is found.'
|
10
|
+
arg_opt '-c', '--command', 'Command to test instance.'
|
11
|
+
bool_opt '-n', '--no-cache', 'Does not use cache.'
|
12
|
+
end
|
13
|
+
|
14
|
+
def run
|
15
|
+
fatal_error('Repository is dirty') if runner_context.call(:git).dirty?
|
16
|
+
|
17
|
+
return_to_branch_on_end do
|
18
|
+
infov 'Revisions found', revisions.count
|
19
|
+
if revision_with_error
|
20
|
+
warn("First revision with error: #{revision_with_error}")
|
21
|
+
else
|
22
|
+
success('No error found in revisions')
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def return_to_branch_on_end
|
30
|
+
current_branch = runner_context.call(:git).current_branch
|
31
|
+
yield
|
32
|
+
ensure
|
33
|
+
infom "Returning to original branch \"#{current_branch}\""
|
34
|
+
runner_context.call(:git).execute!('checkout', current_branch)
|
35
|
+
end
|
36
|
+
|
37
|
+
def revision_with_error_uncached
|
38
|
+
revision_with_error = nil
|
39
|
+
revisions.each do |revision|
|
40
|
+
revision.banner
|
41
|
+
unless revision.successful?
|
42
|
+
revision_with_error = revision
|
43
|
+
break
|
44
|
+
end
|
45
|
+
end
|
46
|
+
revision_with_error
|
47
|
+
end
|
48
|
+
|
49
|
+
def revisions_uncached
|
50
|
+
runner_context.call(:git).execute!('log', '--pretty=format:%H', 'origin/master..HEAD')
|
51
|
+
.each_line.map(&:strip).reverse.map do |sha1|
|
52
|
+
::Avm::Git::RevisionTest.new(runner_context.call(:git), sha1, test_revision_options)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def test_revision_options
|
57
|
+
{ test_command: parsed.command, no_cache: parsed.no_cache? }
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class Subrepo
|
8
|
+
class Check
|
9
|
+
runner_with :help do
|
10
|
+
desc 'Check status of subrepos.'
|
11
|
+
bool_opt '-a', '--all', 'Select all subrepos.'
|
12
|
+
bool_opt '-f', '--fix-parent', 'Fix parent SHA1.'
|
13
|
+
bool_opt '-n', '--no-error', 'Do not exit with error if check fails.'
|
14
|
+
bool_opt '-r', '--remote', 'Check subrepos remote.'
|
15
|
+
pos_arg :subrepos, repeat: true, optional: true
|
16
|
+
end
|
17
|
+
|
18
|
+
def run
|
19
|
+
subrepo_checks.show_result
|
20
|
+
return if parsed.no_error?
|
21
|
+
return unless subrepo_checks.result.error?
|
22
|
+
|
23
|
+
fatal_error 'Failed'
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def subrepo_checks_uncached
|
29
|
+
r = ::Avm::Git::SubrepoChecks.new(local_repos)
|
30
|
+
r.check_remote = parsed.remote?
|
31
|
+
r.fix_parent = parsed.fix_parent?
|
32
|
+
r.add_all_subrepos if parsed.all?
|
33
|
+
r.add_subrepos(*parsed.subrepos)
|
34
|
+
r
|
35
|
+
end
|
36
|
+
|
37
|
+
def local_repos_uncached
|
38
|
+
::EacGit::Local.new(runner_context.call(:git))
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,80 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class Subrepo
|
8
|
+
class Clone
|
9
|
+
runner_with :help do
|
10
|
+
desc 'Clone git-subrepo repositories.'
|
11
|
+
arg_opt '-b', '--branch', 'Branch.'
|
12
|
+
arg_opt '-d', '--parent-dir', 'Target path\'s parent directory.'
|
13
|
+
pos_arg :url
|
14
|
+
pos_arg :target_path, optional: true
|
15
|
+
end
|
16
|
+
|
17
|
+
def run
|
18
|
+
start_banner
|
19
|
+
clean
|
20
|
+
clone
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def start_banner
|
26
|
+
infov 'URL', url
|
27
|
+
infov 'Subpath', target_path
|
28
|
+
infov 'Branch', branch
|
29
|
+
end
|
30
|
+
|
31
|
+
def clean
|
32
|
+
infom 'Cleaning...'
|
33
|
+
git.command('subrepo', 'clean', '--all', '--force').system!
|
34
|
+
end
|
35
|
+
|
36
|
+
def clone
|
37
|
+
infom 'Cloning...'
|
38
|
+
infov 'Clone arguments', clone_args
|
39
|
+
git.command(*clone_args).system!
|
40
|
+
end
|
41
|
+
|
42
|
+
delegate :branch, :url, to: :parsed
|
43
|
+
|
44
|
+
def git_uncached
|
45
|
+
::EacGit::Local.new('.')
|
46
|
+
end
|
47
|
+
|
48
|
+
def clone_args
|
49
|
+
['subrepo'] + branch.if_present([]) { |v| ['--branch', v] } +
|
50
|
+
if ::File.exist?(target_path)
|
51
|
+
['init', target_path, '--remote', url]
|
52
|
+
else
|
53
|
+
['clone', url, target_path, '--message', clone_message, '--force']
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
def clone_message
|
58
|
+
"Subrepo \"#{target_path}\" (#{url})."
|
59
|
+
end
|
60
|
+
|
61
|
+
def repos_name_from_url
|
62
|
+
%r{/([^/]+)\z}.if_match(url, false) { |m| m[1].gsub(/\.git\z/, '') }
|
63
|
+
end
|
64
|
+
|
65
|
+
def target_path
|
66
|
+
parsed.target_path || target_path_from_parent_dir ||
|
67
|
+
fatal_error('No target path specified')
|
68
|
+
end
|
69
|
+
|
70
|
+
def target_path_from_parent_dir
|
71
|
+
return nil unless parsed.parent_dir && repos_name_from_url
|
72
|
+
|
73
|
+
::File.join(parsed.parent_dir, repos_name_from_url)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
@@ -0,0 +1,69 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class Subrepo
|
8
|
+
class Fix
|
9
|
+
runner_with :help do
|
10
|
+
desc 'Fix git-subrepos\' parent property.'
|
11
|
+
end
|
12
|
+
|
13
|
+
def run
|
14
|
+
loop do
|
15
|
+
break if fix
|
16
|
+
|
17
|
+
amend_each
|
18
|
+
rebase_fixup
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
24
|
+
def amend_each
|
25
|
+
infov 'Dirty files', local_repos.dirty_files.count
|
26
|
+
local_repos.dirty_files.each do |file|
|
27
|
+
infov ' * Ammending', file.path
|
28
|
+
::Avm::Scms::AutoCommit::ForFile.new(
|
29
|
+
git_scm, file.path,
|
30
|
+
[::Avm::Scms::AutoCommit::Rules::Unique.new]
|
31
|
+
).run
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def fix # rubocop:disable Naming/PredicateMethod
|
36
|
+
infom 'Checking/fixing...'
|
37
|
+
c = new_check(true)
|
38
|
+
c.show_result
|
39
|
+
!c.result.error?
|
40
|
+
end
|
41
|
+
|
42
|
+
# @return [Avm::Git::Scms::Git]
|
43
|
+
def git_scm_uncached
|
44
|
+
::Avm::Git::Scms::Git.new(runner_context.call(:git).root_path)
|
45
|
+
end
|
46
|
+
|
47
|
+
def new_check(fix_parent = false) # rubocop:disable Style/OptionalBooleanParameter
|
48
|
+
r = ::Avm::Git::SubrepoChecks.new(local_repos).add_all_subrepos
|
49
|
+
r.fix_parent = fix_parent
|
50
|
+
r
|
51
|
+
end
|
52
|
+
|
53
|
+
def local_repos_uncached
|
54
|
+
::EacGit::Local.new(runner_context.call(:git))
|
55
|
+
end
|
56
|
+
|
57
|
+
def rebase_fixup
|
58
|
+
local_repos.command('rebase', '-i', 'origin/master', '--autosquash').envvar(
|
59
|
+
'GIT_SEQUENCE_EDITOR', 'true'
|
60
|
+
).or(
|
61
|
+
local_repos.command('rebase', '--continue').envvar('GIT_SEQUENCE_EDITOR', 'true')
|
62
|
+
).system!
|
63
|
+
end
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Avm
|
4
|
+
module Git
|
5
|
+
module Runners
|
6
|
+
class Base
|
7
|
+
class Subrepo
|
8
|
+
require_sub __FILE__
|
9
|
+
runner_with :help, :subcommands do
|
10
|
+
desc 'Git-subrepo (https://github.com/ingydotnet/git-subrepo) utilities.'
|
11
|
+
subcommands
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|