Merge with http://hg.omnifarious.org/~hopper/mercurial
authorThomas Arendsen Hein <thomas@intevation.de>
Tue, 29 Nov 2005 18:06:23 +0100
changeset 1560 6efad1cc07de
parent 1558 651690fe6be3 (diff)
parent 1559 59b3639df0a9 (current diff)
child 1561 9c6d0abdb94e
Merge with http://hg.omnifarious.org/~hopper/mercurial
mercurial/commands.py
--- a/contrib/bash_completion
+++ b/contrib/bash_completion
@@ -2,18 +2,25 @@ shopt -s extglob
 
 _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 @@ shopt -s extglob
 	    fi
 	;;
 	*)
-            COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" ))
+	    COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" ))
 	;;
     esac
 
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1475,9 +1475,9 @@ def log(ui, repo, *pats, **opts):
     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
+++ b/tests/run-tests
@@ -40,16 +40,11 @@ HGTMP="${TMPDIR-/tmp}/hgtests.$RANDOM.$R
 }
 
 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 @@ fi
 cd "$TESTDIR"
 
 PATH="$INST/bin:$PATH"; export PATH
-PYTHONPATH="$INST/$lib/python"; export PYTHONPATH
-
+PYTHONPATH="$PYTHONDIR"; export PYTHONPATH
 
 run_one() {
     rm -f "$1.err"