summaryrefslogtreecommitdiff
path: root/.zsh/functions
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.zsh/functions/cci18
1 files changed, 15 insertions, 3 deletions
diff --git a/.zsh/functions/cci b/.zsh/functions/cci
index 4baaa7d..6d10917 100644
--- a/.zsh/functions/cci
+++ b/.zsh/functions/cci
@@ -13,6 +13,11 @@ _ask_$0 ()
fi
}
+_stg_v_$0 ()
+{
+ python -c 'from stgit.builtin_version import version; print version'
+}
+
if [[ $# == 0 ]]; then
echo "No message given. Aborting."
return 1
@@ -55,7 +60,14 @@ if [[ -z $(cstg files) ]]; then
fi
echo ">> Committing"
-cstg commit $tok
+cstg commit $tok || return
+
+# from 0.16 onwards stg repushes the patches ... pop them again
+# this is needed to make the `config push` work
+if is-at-least 0.16 $(_stg_v_$0); then
+ echo ">>> Popping patches, stg thought it had to re-apply"
+ cstg pop -a -k || return
+fi
if [[ -n $(cstg series --applied) ]]; then
echo
@@ -65,10 +77,10 @@ if [[ -n $(cstg series --applied) ]]; then
fi
echo ">> Pushing to remote"
-config push
+config push || return
echo ">> Re-apply patches"
-cstg push -a -k
+cstg push -a -k || return
echo ">> Done"
né 'Necoro' Neumann2-1/+28 2013-09-30Urxvt autotransform for <filename>:<line>.René 'Necoro' Neumann1-1/+4 2013-09-30Remove tabbed(x) from urxvt. We use i3 -- no need for it.René 'Necoro' Neumann1-9/+0 2013-09-30Do not display icon in urxvt. It's not supported by i3 anyway.René 'Necoro' Neumann1-1/+1 2013-09-29Remove wrong monitors lineRené 'Necoro' Neumann1-1/+0 2013-09-29Delete vimperator paste plugin -- seems not to work anymore with new FFRené 'Necoro' Neumann1-266/+0 2013-09-29Use $HOST instead of Cauchiy in titleRené 'Necoro' Neumann1-1/+1 2013-09-24Remove herbstluftwmRené 'Necoro' Neumann1-1/+0 2013-09-24Conky changesRené 'Necoro' Neumann2-5/+13 2013-09-15Remove trailing slash from \~ulpRené 'Necoro' Neumann1-1/+1 2013-09-15Make cci explicitly use python2René 'Necoro' Neumann1-1/+1 2013-09-10Node/NPM preparationRené 'Necoro' Neumann3-1/+13