changeset 1560:6efad1cc07de

Merge with http://hg.omnifarious.org/~hopper/mercurial
author Thomas Arendsen Hein <thomas@intevation.de>
date Tue, 29 Nov 2005 18:06:23 +0100
parents 651690fe6be3 (diff) 59b3639df0a9 (current diff)
children 9c6d0abdb94e
files mercurial/commands.py
diffstat 3 files changed, 24 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/bash_completion	Fri Nov 18 22:48:47 2005 -0800
+++ b/contrib/bash_completion	Tue Nov 29 18:06:23 2005 +0100
@@ -2,18 +2,25 @@
 
 _hg_commands()
 {
-    local commands="$(hg -v help | sed -e '1,/^list of commands:/d' \
-				       -e '/^global options:/,$d' \
-				       -e '/^ [^ ]/!d; s/[,:]//g;')"
+    local all commands result
+
+    all=($(hg --debug help | sed -e '1,/^list of commands:/d' \
+				 -e '/^global options:/,$d' \
+				 -e '/^ [^ ]/!d; s/^ //; s/[,:]//g;'))
+
+    commands="${all[*]##debug*}"
+    result=$(compgen -W "${commands[*]}" -- "$cur")
 
     # hide debug commands from users, but complete them if
-    # specifically asked for
-    if [[ "$cur" == de* ]]; then
-	commands="$commands debugcheckstate debugstate debugindex"
-	commands="$commands debugindexdot debugwalk debugdata"
-	commands="$commands debugancestor debugconfig debugrename"
+    # there is no other possible command
+    if [ "$result" = "" ]; then
+	local debug
+	debug=(${all[*]##!(debug*)})
+	debug="${debug[*]/g/debug}"
+	result=$(compgen -W "$debug" -- "$cur")
     fi
-    COMPREPLY=( ${COMPREPLY[@]:-} $(compgen -W "$commands" -- "$cur") )
+
+    COMPREPLY=(${COMPREPLY[@]:-} $result)
 }
 
 _hg_paths()
@@ -161,7 +168,7 @@
 	    fi
 	;;
 	*)
-            COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" ))
+	    COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" ))
 	;;
     esac
 
--- a/mercurial/commands.py	Fri Nov 18 22:48:47 2005 -0800
+++ b/mercurial/commands.py	Tue Nov 29 18:06:23 2005 +0100
@@ -1475,9 +1475,9 @@
     Print the revision history of the specified files or the entire project.
 
     By default this command outputs: changeset id and hash, tags,
-    parents, user, date and time, and a summary for each commit. The
-    -v switch adds some more detail, such as changed files, manifest
-    hashes or message signatures.
+    non-trivial parents, user, date and time, and a summary for each
+    commit. When the -v/--verbose switch is used, the list of changed
+    files and full commit message is shown.
     """
     class dui(object):
         # Implement and delegate some ui protocol.  Save hunks of
--- a/tests/run-tests	Fri Nov 18 22:48:47 2005 -0800
+++ b/tests/run-tests	Tue Nov 29 18:06:23 2005 +0100
@@ -40,16 +40,11 @@
 }
 
 TESTDIR="$PWD"
-
-if [ -d /usr/lib64 ]; then
-    lib=lib64
-else
-    lib=lib
-fi
-
 INST="$HGTMP/install"
+PYTHONDIR="$INST/lib/python"
 cd ..
-if ${PYTHON-python} setup.py install --home="$INST" > tests/install.err 2>&1
+if ${PYTHON-python} setup.py install --home="$INST" \
+  --install-lib="$PYTHONDIR" > tests/install.err 2>&1
 then
     rm tests/install.err
 else
@@ -59,8 +54,7 @@
 cd "$TESTDIR"
 
 PATH="$INST/bin:$PATH"; export PATH
-PYTHONPATH="$INST/$lib/python"; export PYTHONPATH
-
+PYTHONPATH="$PYTHONDIR"; export PYTHONPATH
 
 run_one() {
     rm -f "$1.err"