KDevelop/Plugin Repo Merging
< KDevelop
Merging A Plugin Repo into The KDevelop Repo
Given a plugin which is candidate for inclusion in the main kdevelop repository. So far it has been developed in a separate repository, with a noteworthy commit history which ideally should be kept exactly (e.g. if multiple authors committed).
The recommended way is to import the unmodified history of the subtree and to do a merge commit to move the merged repository to the plugin subdirectory.
# go to local kdevelop repo
cd <path-to-local-kdevelop-repo>
# make repo of plugin known
git remote add plugin_remote <path-or-url-to-plugin-repo>
# get only main branch(es), like master, with all the interesting history
# avoid fetching (version) tags as they might conflict or are confusing in the kdevelop repo
git fetch plugin_remote master
# prepare merge commit
# git 2.9+ needs --allow-unrelated-histories
git merge -s ours --no-commit --allow-unrelated-histories plugin_remote/master
# copy files in the working copy, into its own subdir below plugins/
git read-tree --prefix=plugins/<pluginname> -u plugin_remote/master
# complete the merge commit
git commit -m "Imported <pluginname> as a subtree."
# now integrate the plugin code into the build system and remove no longer needed files
# then commit this
Once this is pushed to the official repo, it is time to mark the old repo as finished in a final commit which...
- removes all files
- leaves a README.md file with info about the move
- leaves a CMakeLists.txt which catches automated builds of the repo
Sample for CMakeLists.txt:
project(<pluginname> LANGUAGES NONE)
message(FATAL_ERROR "<pluginname> was merged into kdevelop.git")
Sample for README.md:
<pluginname> has been moved into kdevelop.git:plugins/<pluginname>
Also to do:
- Ask translation admins to copy any translation catalogs to the location of kdevelop catalogs.
- Update sysadmin/repo-metadata to move the plugin repo project data below "unmaintained".
- Update kde-build-metadata to remove all data about the plugin.