[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] mtsh, monotree, monotone.el, etc.
From: |
Matthew A. Nicholson |
Subject: |
Re: [Monotone-devel] mtsh, monotree, monotone.el, etc. |
Date: |
Sun, 12 Feb 2006 03:54:16 -0600 |
User-agent: |
Debian Thunderbird 1.0.7 (X11/20051019) |
Olivier Andrieu wrote:
Bruce Stephens [Wednesday 8 February 2006] :
> I notice contrib/monotone-nav.el hasn't seen much modification, so am
> I right to guess that it's not being used much?
Nevers used it myself, I don't even know what i's supposed to do :)
> contrib/monotone.el seems to work fine, and I've been using it
> recently now and again. Are there things missing from it? I feel
> there probably are things it could usefully do, but I find it hard
> to imagine specific things I could add. So maybe that's a sign
> that it's sufficient.
I initially wrote monotone.el, then someone (Harley Gorrell
<address@hidden>) far more knowledgeable than me about elisp
development started rewriting this file and added
monotone-nav.el. Unfortunately he hasn't contributed since April.
Personally, I prefer my version of monotone.el, I just have feeling it
works better :)
Anyway, having a close look at monotone.el and cleaning it up is on my
list of things to do. I'm interested if you have
remarks/comments/opinions on monotone.el. I need to have a look at
this too: http://wiki.gnuarch.org/xtla#DVC
> I *do* use contrib/monotone.zsh_completion all the time. I'll send a
> patch updating it once rosters is more officially stable.
Right, monotone.bash_completion needs to be updated too.
I have some patches for monotone.bash_completion (bugfixes and adding
missing stuff) and a patch to make it install in the proper place with
the debian package.
I have attached the bash completion patch. Not sure how complete it is,
but it fixes several bugs in the completion (mostly dealing with filenames).
--
Matthew A. Nicholson
Matt-Land.com
#
#
# patch "contrib/monotone.bash_completion"
# from [d942f24e3f430c7e12fceeb7a58e088e45211971]
# to [c5fff50c3c591f9dd72f80c3812c506571e3ab74]
#
============================================================
--- contrib/monotone.bash_completion d942f24e3f430c7e12fceeb7a58e088e45211971
+++ contrib/monotone.bash_completion c5fff50c3c591f9dd72f80c3812c506571e3ab74
@@ -1,7 +1,9 @@
# -*- shell-script -*-
+# vim: set ft=sh:
-# bash completion for monotone 0.18
+# bash completion for monotone 0.25
# Author: Olivier Andrieu <address@hidden>
+# Contributions by Matthew A. Nicholson <address@hidden>
# source this file from your .bashrc
# If you use the bash completion package <http://www.caliban.org/bash/>,
@@ -42,6 +44,10 @@
COMPREPLY=( $(compgen -W "$(monotone $mono_db list branches 2> /dev/null)"
-- ${cur#*=} ) )
}
+_monotone_tags() {
+ COMPREPLY=( $(compgen -W "$(monotone $mono_db list tags 2> /dev/null | awk
'{print $1}')" -- ${cur#*=} ) )
+}
+
_monotone() {
local cur prev mono_db
@@ -68,6 +74,10 @@
cur="${cur#*=}"
_filedir
;;
+ --root=* )
+ cur="${cur#*=}"
+ _filedir -d
+ ;;
--branch=* )
_monotone_branches
;;
@@ -76,19 +86,22 @@
;;
--ticker=* )
cur="${cur#*=}"
- COMPREPLY=( $(compgen -W 'count dot' -- $cur ) )
+ COMPREPLY=( $(compgen -W 'count dot none' -- $cur ) )
;;
--revision=* )
_monotone_complete revision
;;
-* )
- COMPREPLY=( $(compgen -W '--debug --dump --quiet --help --nostd --norc\
- --rcfile --key --db --branch --version
--full-version\
- --ticker --revision --message' -- $cur) )
+ COMPREPLY=( $(compgen -W '--debug --dump --quiet --help --version
+ --full-version --xargs --ticker --nostd --norc
+ --rcfile --key --db --root --verbose -k -d -@
+ -m -b -r --branch --message --date --author
+ --depth --execute --keydir --confdir
+ --key-to-push --bind' -- $cur) )
;;
* )
case $prev in
- --db | -d | --rcfile | --dump )
+ --db | -d | --rcfile | --dump | --root )
_filedir
;;
--branch | -b )
@@ -103,105 +116,112 @@
--revision | -r )
_monotone_complete revision
;;
- db )
- COMPREPLY=( $(compgen -W 'init info version dump load migrate execute
check changesetify rebuild' -- $cur ) )
- ;;
- cdiff | diff | annotate )
+ db )
+ COMPREPLY=( $(compgen -W 'init info version dump load migrate
execute kill_rev_locally kill_branch_certs_locally kill_tag_locally check
changesetify rebuild set_epoch' -- $cur ) )
+ ;;
+ cdiff | diff | annotate )
COMPREPLY=( $(compgen -W '--revision' -- $cur ) )
- _filedir
- ;;
- log | approve | disapprove | comment | tag | testresult | cert |
explicit_merge | trusted | update )
- _monotone_complete revision
- ;;
- ls | list )
- COMPREPLY=( $(compgen -W 'certs keys branches epochs tags vars known
unknown ignored missing' -- $cur ) )
- ;;
- attr )
- COMPREPLY=( $(compgen -W 'get set drop' -- $cur ) )
- ;;
- co | checkout )
- _filedir -d
- _monotone_complete revision
- ;;
- status | cvs_import | add | drop | rename | revert | identify )
- _filedir
- ;;
- cat )
- COMPREPLY=( $(compgen -W 'file manifest revision' -- $cur) )
- ;;
+ _filedir
+ ;;
+ log | approve | disapprove | comment | tag | testresult | cert |
explicit_merge | trusted | update )
+ _monotone_complete revision
+ ;;
+ ls | list )
+ COMPREPLY=( $(compgen -W 'certs keys branches epochs tags vars known
unknown ignored missing' -- $cur ) )
+ ;;
+ attr )
+ COMPREPLY=( $(compgen -W 'get set drop' -- $cur ) )
+ ;;
+ co | checkout )
+ _filedir -d
+ _monotone_complete revision
+ ;;
+ status | cvs_import | add | drop | rm | rename | mv | revert |
identify )
+ _filedir
+ ;;
+ complete )
+ COMPREPLY=( $(compgen -W 'revision manifest file key' -- $cur) )
+ ;;
+ cat )
+ COMPREPLY=( $(compgen -W 'file manifest revision' -- $cur) )
+ ;;
push | pull | serve | sync )
- COMPREPLY=( $(compgen -A hostname -- $cur) )
- ;;
- pubkey | privkey )
- _monotone_keys $prev
- ;;
- chkeypass | dropkey )
- _monotone_keys privkey
- ;;
- propagate | reindex )
- _monotone_branches
- ;;
- * )
- if (( $COMP_CWORD >= 2 )) ; then
- local prev2=${COMP_WORDS[COMP_CWORD-2]}
- case $prev2 in
- cdiff | diff | explicit_merge )
- _monotone_complete revision
- ;;
- co | checkout | rename | annotate )
- _filedir -d
- ;;
- cat )
- _monotone_complete $prev
- ;;
- log | attr )
- _filedir
- ;;
- list )
- if [ $prev == certs ] ; then
- _monotone_complete revision
- _monotone_complete manifest
- _monotone_complete file
- fi
- ;;
- push | pull | serve | sync | propagate )
+ COMPREPLY=( $(compgen -A hostname -- $cur) )
+ ;;
+ pubkey | privkey )
+ _monotone_keys $prev
+ ;;
+ chkeypass | dropkey )
+ _monotone_keys privkey
+ ;;
+ propagate | reindex )
+ _monotone_branches
+ ;;
+ * )
+ if (( $COMP_CWORD >= 2 )) ; then
+ local prev2=${COMP_WORDS[COMP_CWORD-2]}
+ case $prev2 in
+ cdiff | diff | explicit_merge )
+ _monotone_complete revision
+ ;;
+ co | checkout | rename | mv | annotate )
+ _filedir
+ ;;
+ cat )
+ _monotone_complete $prev
+ ;;
+ log | attr )
+ _filedir
+ ;;
+ list )
+ if [ $prev == certs ] ; then
+ _monotone_complete revision
+ _monotone_complete manifest
+ _monotone_complete file
+ fi
+ ;;
+ push | pull | serve | sync | propagate )
_monotone_branches
- ;;
- * )
- if (( $COMP_CWORD >= 3 )) ; then
- local prev3=${COMP_WORDS[COMP_CWORD-3]}
- case $prev3 in
- explicit_merge )
- _monotone_complete revision
- _monotone_branches
- ;;
- *)
- unset prev2
- unset prev3
- esac
- else
- unset prev2
- fi
- ;;
- esac
- fi
- if [ -z "$prev2" ] ; then
- COMPREPLY=( $(compgen -W 'db agraph \
- annotate cat cdiff complete diff list
log ls status \
- cert chkeypass dropkey genkey trusted \
- pull push reindex serve sync \
- privkey pubkey read \
- cvs_import \
- approve comment disapprove tag
testresult \
- checkout co explicit_merge heads merge
propagate refresh_inodeprints setup \
- set unset \
- add attr commit drop identify rename
revert update' -- $cur) )
- fi
- ;;
+ ;;
+ * )
+ if (( $COMP_CWORD >= 3 )) ; then
+ local prev3=${COMP_WORDS[COMP_CWORD-3]}
+ case $prev3 in
+ explicit_merge )
+ _monotone_complete revision
+ _monotone_branches
+ ;;
+ *)
+ unset prev2
+ unset prev3
+ esac
+ else
+ unset prev2
+ _filedir
+ fi
+ ;;
+ esac
+ fi
+ if (( $COMP_CWORD < 2 )) ; then
+ COMPREPLY=( $(compgen -W 'automate db agraph fload fmerge lca lcad
+ rcs_import annotate cat complete diff
+ list log ls status cert chkeypass dropkey
+ genkey trusted pull push reindex serve
+ sync certs fdata fdelta mdata mdelta
+ privkey pubkey rdata read cvs_import
+ approve comment disapprove tag testresult
+ checkout co explicit_merge fcommit heads
+ merge propagate refresh_inodeprints setup
+ set unset add attr ci commit drop
+ identify mv rename revert rm update' --
$cur) )
+ else
+ _filedir
+ fi
+ ;;
esac
;;
esac
return 0
}
+complete -F _monotone -o filenames monotone
-complete -F _monotone -o default monotone
- [Monotone-devel] mtsh, monotree, monotone.el, etc., Bruce Stephens, 2006/02/08
- Re: [Monotone-devel] mtsh, monotree, monotone.el, etc., Nathaniel Smith, 2006/02/11
- Re: [Monotone-devel] mtsh, monotree, monotone.el, etc., Olivier Andrieu, 2006/02/11
- Re: [Monotone-devel] mtsh, monotree, monotone.el, etc.,
Matthew A. Nicholson <=