summaryrefslogtreecommitdiff
path: root/hacking
diff options
context:
space:
mode:
authorBrian Coca <brian.coca+git@gmail.com>2016-10-03 22:55:11 -0400
committerBrian Coca <brian.coca+git@gmail.com>2016-10-03 22:55:38 -0400
commit72e6ffad471f0c3aadfd9563e43d7a7c95ff74aa (patch)
treed940715b94fedc76fff7e5b280c298c4d6f3a32e /hacking
parent08a58ae0255a0ca822e74af21662e3e9ce4ea31f (diff)
downloadansible-72e6ffad471f0c3aadfd9563e43d7a7c95ff74aa.tar.gz
added script to unify repos
in case i forget how to do this, can be deleted afterwards
Diffstat (limited to 'hacking')
-rwxr-xr-xhacking/unify_repos.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/hacking/unify_repos.sh b/hacking/unify_repos.sh
new file mode 100755
index 0000000000..fde2953862
--- /dev/null
+++ b/hacking/unify_repos.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+set -x
+set -e
+set -u
+
+# get current stuff
+git clone git@github.com:ansible/ansible.git ansible_unified
+cd ansible_unified/
+git submodule init
+git submodule update
+
+# add submodules as remotes
+git remote add core_modules git@github.com:ansible/ansible-modules-core.git
+git remote add extras_modules git@github.com:ansible/ansible-modules-extras.git
+git fetch --all
+
+# remove submodules
+echo "" > .gitmodules
+git add .gitmodules
+git rm --cached lib/ansible/modules/core/
+git rm --cached lib/ansible/modules/extras/
+git commit -am "removed core and extras submodules"
+rm -rf lib/ansible/modules/core
+rm -rf lib/ansible/modules/extras
+
+# merge remotes into old submodule dirs
+## core
+git merge -s ours --allow-unrelated-histories --no-commit core_modules/devel
+git read-tree --prefix=lib/ansible/modules/core -u core_modules/devel
+git commit -am 'core modules back to main repo'
+## extras
+git merge -s ours --allow-unrelated-histories --no-commit extras_modules/devel
+git read-tree --prefix=lib/ansible/modules/extras -u extras_modules/devel
+git commit -am 'extras modules back to main repo'