summaryrefslogtreecommitdiff
path: root/dev-vcs/git-imerge
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-vcs/git-imerge
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-vcs/git-imerge')
-rw-r--r--dev-vcs/git-imerge/Manifest5
-rw-r--r--dev-vcs/git-imerge/files/git-imerge.bashcomplete267
-rw-r--r--dev-vcs/git-imerge/git-imerge-1.0.0.ebuild45
-rw-r--r--dev-vcs/git-imerge/metadata.xml8
4 files changed, 325 insertions, 0 deletions
diff --git a/dev-vcs/git-imerge/Manifest b/dev-vcs/git-imerge/Manifest
new file mode 100644
index 000000000000..58f04bcb3965
--- /dev/null
+++ b/dev-vcs/git-imerge/Manifest
@@ -0,0 +1,5 @@
+AUX git-imerge.bashcomplete 4714 SHA256 7eb6b4a301dd73eb8417e5037fd3153da72046fcdfad09aa3c03fd1b58493835 SHA512 a1399072ca9a775acc4ceebbb2c13c1608687df68f01b407e1b3ff8f9ce01e748025ac02d88bf210af609206ffd0f6e578495b3c2a66bdddf9793210714c1b42 WHIRLPOOL ad0f737f5a22f89848ce191e13d43654e00a0910a9bb46b226cf252cbeb8383910c67cea0ab9004c134cce7cc81857108f4cdd3be0d532070e58f4f7976f3c15
+DIST git-imerge-1.0.0.tar.gz 58736 SHA256 2ef3a49a6d54c4248ef2541efc3c860824fc8295a7226760f24f0bb2c5dd41f2 SHA512 919b80f157d635e3a3eb2b05cfaf8f6a7034fe6f43529c829fef0152007bce3bf5b296cc00f6db0c0a711bfb9e118c4adb0f5a2641ff841c973ff12610473e9b WHIRLPOOL a347f139d8aec6c616805632385e3466283a778f40a2a87d817c510258f34ada22669209547d282a7d510ad2d56047eb75e8becd138cd7b6dd3b322c5ac9896e
+EBUILD git-imerge-1.0.0.ebuild 1071 SHA256 dff30eb52b7316c58aa6a8125e052f0b56af05fe4a48e7570fef3ef1619c1db8 SHA512 58ad713ad457416256406264bbced5fca2264c43bd479f8ab2d9da0fe7ed0c3b42e3b6b8b62d8334f1a942f63d93a65a3714a03c5bbd576f1824863d005476e8 WHIRLPOOL ac4460fc0759d2629fc15cc74e27d7b4c4adcf9b78c1259242ac0c173de4989ba8e04abf6071b2e45fe7673653ce21f6c4e733faec02d7173f6618a99150b7ea
+MISC ChangeLog 1738 SHA256 2e25d450ac9a833e9041165592a04d9342094dded218dcbb035cab4318a1bb6f SHA512 06f23ddc0571f24c7c8dbd7dc51bc95cc7025c79755d7bcf7af3126ff5a0eef54fdcd9bb5f3641090c5064a3b763296063e5a0c7de4cba4991cb24350d56d394 WHIRLPOOL 4c6230f1a306d9b44e648d9eb9e3a45db7ee8d71dee5f85ee2d0bcec4869335f4481b147c3f32ddca04f1d25d90dda10fdaee13a475404e6b8b49f4fdf4e819c
+MISC metadata.xml 250 SHA256 592743c3a07b1f90003f711d643d45ff7457aa7b5da82a63e8240a2cfe73ce81 SHA512 c5b2424b4f6fdfbe8267055899a39cd14d992aaea9fc8dc6d007ee495e97a2d4125a9abad94c17a4c646521759fa998a3468dae0ac4d8b12c09926fc24e7403f WHIRLPOOL e7bd02f6dadb558bf1c04820c253df660f148ed2ea9efff2407c8cf94971a5af80e2df8faba74a52b43e0dc4987b815ef81845bcd0bc39ba97fbc169bcd29204
diff --git a/dev-vcs/git-imerge/files/git-imerge.bashcomplete b/dev-vcs/git-imerge/files/git-imerge.bashcomplete
new file mode 100644
index 000000000000..0fe8e04f64de
--- /dev/null
+++ b/dev-vcs/git-imerge/files/git-imerge.bashcomplete
@@ -0,0 +1,267 @@
+__git_imerge_branches () {
+ git for-each-ref --format='%(refname)' refs/heads/ refs/remotes/ 2>/dev/null |
+ sed -e 's!^refs/heads/!!' -e 's!^refs/remotes/!!'
+}
+
+__git_imerge_names () {
+ git for-each-ref --format='%(refname)' refs/imerge/ 2>/dev/null |
+ sed -e 's/^refs\/imerge\/\(.*\)\/.*/\1/' -e '/manual/d' -e '/auto/d'
+}
+
+__git_imerge_goals="\
+merge
+rebase
+rebase-with-history
+full
+"
+
+__git_imerge_commands="\
+start
+merge
+rebase
+continue
+finish
+diagram
+list
+init
+record
+autofill
+simplify
+remove
+reparent
+"
+
+__git_imerge_start_options="\
+--help
+--manual
+--name
+--branch
+--goal
+--first-parent
+"
+
+__git_imerge_init_options=$__git_imerge_start_options
+
+__git_imerge_continue_options="\
+--help
+--name
+--edit
+--no-edit
+"
+
+__git_imerge_finish_options="\
+--help
+--name
+--goal
+--branch
+--force
+"
+
+__git_imerge_simplify_options=$__git_imerge_finish_options
+
+__git_imerge_merge_options="\
+--help
+--name
+--goal
+--branch
+--manual
+"
+
+__git_imerge_list_options="\
+--help
+"
+
+__git_imerge_reparent_options=$__git_imerge_list_options
+
+__git_imerge_record_options="\
+--help
+--name
+--edit
+--no-edit
+"
+
+__git_imerge_autofill_options="\
+--help
+--name
+"
+
+__git_imerge_diagram_options="\
+--help
+--name
+--commits
+--frontier
+--html
+--color
+--no-color
+"
+
+__git_imerge_remove_options=$__git_imerge_autofill_options
+
+__git_imerge_rebase_options=$__git_imerge_merge_options
+
+__git-imerge_start_completion() {
+ case "$1_$cur" in
+ --help_|--branch_|_--branch=|--name_|_--name=)
+ return
+ ;;
+ --goal_*|*_--goal=*)
+ __gitcomp "$__git_imerge_goals" "" "${cur##--goal=}"
+ return
+ ;;
+ *-|*_-*?)
+ __gitcomp "$__git_imerge_start_options"
+ return
+ ;;
+ esac
+ __gitcomp "$(__git_imerge_branches)"
+}
+
+__git-imerge_init_completion() {
+ __git-imerge_start_completion $1
+}
+
+__git-imerge_continue_completion() {
+ case "$1_$cur" in
+ --help_)
+ return
+ ;;
+ --name_*|*_--name=*)
+ __gitcomp "$(__git_imerge_names)" "" "${cur##--name=}"
+ return
+ ;;
+ esac
+ __gitcomp "$__git_imerge_continue_options"
+}
+
+__git-imerge_finish_completion() {
+ case "$1_$cur" in
+ --help_)
+ return
+ ;;
+ --goal_*|*_--goal=*)
+ __gitcomp "$__git_imerge_goals" "" "${cur##--goal=}"
+ return
+ ;;
+ --branch_*|*_--branch=*)
+ __gitcomp "$(__git_imerge_branches)" "" "${cur##--branch=}"
+ return
+ ;;
+ --name_*|*_--name=*)
+ __gitcomp "$(__git_imerge_names)" "" "${cur##--name=}"
+ return
+ ;;
+ esac
+ __gitcomp "$__git_imerge_finish_options"
+}
+
+__git-imerge_simplify_completion() {
+ __git-imerge_finish_completion $1
+}
+
+__git-imerge_merge_completion() {
+ case "$1_$cur" in
+ --help_|--branch_|_--branch=|--name_|_--name=)
+ return
+ ;;
+ --goal_*|*_--goal=*)
+ __gitcomp "$__git_imerge_goals" "" "${cur##--goal=}"
+ return
+ ;;
+ *-|*_-*?)
+ __gitcomp "$__git_imerge_merge_options"
+ return
+ ;;
+ esac
+ __gitcomp "$(__git_imerge_branches)"
+}
+
+__git-imerge_rebase_completion() {
+ __git-imerge_merge_completion $1
+}
+
+__git-imerge_list_completion() {
+ case "$1" in
+ --help)
+ return
+ ;;
+ esac
+ __gitcomp "$__git_imerge_list_options"
+}
+
+__git-imerge_reparent_completion() {
+ __git-imerge_list_completion $1
+}
+
+__git-imerge_record_completion() {
+ case "$1_$cur" in
+ --help_)
+ return
+ ;;
+ --name_*|*_--name=*)
+ __gitcomp "$(__git_imerge_names)" "" "${cur##--name=}"
+ return
+ ;;
+ esac
+ __gitcomp "$__git_imerge_record_options"
+}
+
+__git-imerge_autofill_completion() {
+ case "$1_$cur" in
+ --help_)
+ return
+ ;;
+ --name_*|*_--name=*)
+ __gitcomp "$(__git_imerge_names)" "" "${cur##--name=}"
+ return
+ ;;
+ esac
+ __gitcomp "$__git_imerge_autofill_options"
+}
+
+__git-imerge_remove_completion() {
+ __git-imerge_autofill_completion $1
+}
+
+__git-imerge_diagram_completion() {
+ case "$1_$cur" in
+ --help_|--html_|_--html=)
+ return
+ ;;
+ --name_*|*_--name=*)
+ __gitcomp "$(__git_imerge_names)" "" "${cur##--name=}"
+ return
+ ;;
+ esac
+ __gitcomp "$__git_imerge_diagram_options"
+}
+
+_git_imerge () {
+ # Disable default filename completion. Note that "compopt" is only
+ # available in Bash 4 and newer, so we check for existence before
+ # trying to use it.
+ type compopt >/dev/null 2>&1 && compopt +o default +o bashdefault
+
+ local i command cur_opt
+ for ((i=0; i <= ${cword}; i++)); do
+ if [ -n "$command" ] && [ "${words[i]}" != "$cur" ]; then
+ cur_opt="${words[i]}"
+ fi
+ if [ -z "$command" ] && \
+ [ "$i" -lt "${cword}" ] && \
+ [[ "${words[i-1]}" == *"imerge"* ]]
+ then
+ command="${words[i]}"
+ fi
+ done
+
+ if test -z "$command"; then
+ __gitcomp "$__git_imerge_commands"
+ return
+ fi
+
+ if [ -z `type -t __git-imerge_"$command"_completion "$cur_opt"` ]; then
+ return
+ fi
+
+ __git-imerge_"$command"_completion "$cur_opt"
+}
diff --git a/dev-vcs/git-imerge/git-imerge-1.0.0.ebuild b/dev-vcs/git-imerge/git-imerge-1.0.0.ebuild
new file mode 100644
index 000000000000..249da409f76c
--- /dev/null
+++ b/dev-vcs/git-imerge/git-imerge-1.0.0.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+PYTHON_COMPAT=( python{2_7,3_4,3_5,3_6} )
+
+inherit bash-completion-r1 python-r1
+
+DESCRIPTION="Incremental merge for git"
+HOMEPAGE="https://github.com/mhagger/git-imerge"
+SRC_URI="${HOMEPAGE}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+REQUIRED_USE="${PYTHON_REQUIRED_USE}"
+
+RDEPEND="${PYTHON_DEPS}
+ dev-vcs/git"
+DEPEND="dev-python/docutils"
+
+src_compile() {
+ for doc in *.rst; do
+ rst2html.py "${doc}" > "${T}/${doc/.rst/.html}" \
+ || die "failed to convert ${doc} to ${T}/${doc/.rst/.html}"
+ done
+
+ rst2s5.py \
+ --theme=small-white \
+ --current-slide \
+ doc/presentations/GitMerge-2013/talk.rst \
+ "${T}/talk.html" \
+ || die 'failed to convert talk.rst to ${T}/talk.html'
+}
+
+src_install() {
+ python_foreach_impl python_doscript "${PN}"
+ newbashcomp "${FILESDIR}/git-imerge.bashcomplete" git-imerge
+ dodoc *.rst "${T}"/*.html
+
+ # Don't forget the CSS for the presentation.
+ dodoc -r "${T}/ui"
+}
diff --git a/dev-vcs/git-imerge/metadata.xml b/dev-vcs/git-imerge/metadata.xml
new file mode 100644
index 000000000000..33aa1137112c
--- /dev/null
+++ b/dev-vcs/git-imerge/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <!-- maintainer-needed -->
+ <upstream>
+ <remote-id type="github">mhagger/git-imerge</remote-id>
+ </upstream>
+</pkgmetadata>