changeset 4563:8044be585b91

dispatch: restore a dropped shlex import Add test-dispatch as a place for command parsing and dispatch tests.
author Brendan Cully <brendan@kublai.com>
date Tue, 12 Jun 2007 13:21:42 -0700
parents 80d35fba99a8
children d48e1b5f8265 622d8ed78b47
files mercurial/cmdutil.py tests/test-dispatch tests/test-dispatch.out
diffstat 3 files changed, 22 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Tue Jun 12 18:55:47 2007 +0200
+++ b/mercurial/cmdutil.py	Tue Jun 12 13:21:42 2007 -0700
@@ -7,9 +7,9 @@
 
 from node import *
 from i18n import _
-import os, sys, mdiff, bdiff, util, templater, patch, commands
-import atexit, signal, pdb, hg, lock, fancyopts, traceback
-import socket, revlog, version, extensions, errno
+import os, sys, atexit, signal, pdb, traceback, socket, errno, shlex
+import mdiff, bdiff, util, templater, patch, commands, hg, lock
+import fancyopts, revlog, version, extensions
 
 revrangesep = ':'
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-dispatch	Tue Jun 12 13:21:42 2007 -0700
@@ -0,0 +1,15 @@
+#!/bin/sh
+# test command parsing and dispatch
+
+hg init a
+cd a
+echo a > a
+hg ci -Ama -d '0 0'
+
+echo '% [defaults]'
+hg cat a
+cat > $HGRCPATH <<EOF
+[defaults]
+cat = -v
+EOF
+hg cat a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-dispatch.out	Tue Jun 12 13:21:42 2007 -0700
@@ -0,0 +1,4 @@
+adding a
+% [defaults]
+a
+a