merge with crew-stable
authorMartin Geisler <mg@lazybytes.net>
Wed, 15 Jul 2009 17:44:47 +0200
changeset 9142 63cfacb7917e
parent 9141 78b81646a2e4 (current diff)
parent 9130 335f749cc369 (diff)
child 9143 a604c98dbf62
child 9155 b46063eabe98
merge with crew-stable
mercurial/commands.py
setup.py
--- a/doc/gendoc.py	Tue Jul 14 18:00:37 2009 -0700
+++ b/doc/gendoc.py	Wed Jul 15 17:44:47 2009 +0200
@@ -1,6 +1,8 @@
-import sys, textwrap
+import os, sys, textwrap
 # import from the live mercurial repo
 sys.path.insert(0, "..")
+# fall back to pure modules if required C extensions are not available
+sys.path.append(os.path.join('..', 'mercurial', 'pure'))
 from mercurial import demandimport; demandimport.enable()
 from mercurial.commands import table, globalopts
 from mercurial.i18n import gettext, _
--- a/doc/hgignore.5.txt	Tue Jul 14 18:00:37 2009 -0700
+++ b/doc/hgignore.5.txt	Wed Jul 15 17:44:47 2009 +0200
@@ -12,22 +12,28 @@
 --------
 
 The Mercurial system uses a file called `.hgignore` in the root
-directory of a repository to control its behavior when it finds files
-that it is not currently managing.
+directory of a repository to control its behavior when it searches
+for files that it is not currently tracking.
 
 DESCRIPTION
 -----------
 
-Mercurial ignores every unmanaged file that matches any pattern in an
-ignore file. The patterns in an ignore file do not apply to files
-managed by Mercurial. To control Mercurial's handling of files that it
-manages, see the hg(1) man page. Look for the "-I" and "-X" options.
+An untracked file is ignored if its path relative to the repository
+root directory, or any prefix path of that path, is matched against
+any pattern in `.hgignore`.
 
-In addition, a Mercurial configuration file can point to a set of
+For example, say we have an an untracked file, `file.c`, at 
+`a/b/file.c` inside our repository. Mercurial will ignore `file.c` if
+any pattern in `.hgignore` matches `a/b/file.c`, `a/b` or `a`.
+
+In addition, a Mercurial configuration file can reference a set of
 per-user or global ignore files. See the hgrc(5) man page for details
 of how to configure these files. Look for the "ignore" entry in the
 "ui" section.
 
+To control Mercurial's handling of files that it manages, see the
+hg(1) man page. Look for the "-I" and "-X" options.
+
 SYNTAX
 ------
 
--- a/mercurial/commands.py	Tue Jul 14 18:00:37 2009 -0700
+++ b/mercurial/commands.py	Wed Jul 15 17:44:47 2009 +0200
@@ -1473,7 +1473,10 @@
             f = f.lstrip("^")
             if not ui.debugflag and f.startswith("debug"):
                 continue
-            doc = gettext(e[0].__doc__)
+            doc = e[0].__doc__
+            if doc and 'DEPRECATED' in doc and not ui.verbose:
+                continue
+            doc = gettext(doc)
             if not doc:
                 doc = _("(no help text available)")
             h[f] = doc.splitlines()[0].rstrip()
--- a/setup.py	Tue Jul 14 18:00:37 2009 -0700
+++ b/setup.py	Wed Jul 15 17:44:47 2009 +0200
@@ -248,6 +248,8 @@
 datafiles = []
 for root in ('templates', 'i18n'):
     for dir, dirs, files in os.walk(root):
+        dirs[:] = [x for x in dirs if not x.startswith('.')]
+        files = [x for x in files if not x.startswith('.')]
         datafiles.append((os.path.join('mercurial', dir),
                           [os.path.join(dir, file_) for file_ in files]))
 
--- a/tests/test-extension	Tue Jul 14 18:00:37 2009 -0700
+++ b/tests/test-extension	Wed Jul 15 17:44:47 2009 +0200
@@ -73,11 +73,25 @@
     "yet another debug command"
     pass
 
-cmdtable = {"debugfoobar": (debugfoobar, (), "hg debugfoobar")}
+def foo(ui, repo, *args, **opts):
+    """yet another foo command
+
+    This command has been DEPRECATED since forever.
+    """
+    pass
+
+cmdtable = {
+    "debugfoobar": (debugfoobar, (), "hg debugfoobar"),
+    "foo": (foo, (), "hg foo")
+}
 EOF
 debugpath=`pwd`/debugextension.py
 echo "debugextension = $debugpath" >> $HGRCPATH
+echo "% hg help"
 hg help debugextension
+echo "% hg help --verbose"
+hg --verbose help debugextension
+echo "% hg help --debug"
 hg --debug help debugextension
 echo 'debugextension = !' >> $HGRCPATH
 
--- a/tests/test-extension.out	Tue Jul 14 18:00:37 2009 -0700
+++ b/tests/test-extension.out	Wed Jul 15 17:44:47 2009 +0200
@@ -19,15 +19,47 @@
 empty extension - empty cmdtable
 
 no commands defined
+% hg help
 debugextension extension - only debugcommands
 
 no commands defined
+% hg help --verbose
+debugextension extension - only debugcommands
+
+list of commands:
+
+ foo:
+      yet another foo command
+
+enabled extensions:
+
+ debugextension   only debugcommands
+
+global options:
+ -R --repository      repository root directory or symbolic path name
+    --cwd             change working directory
+ -y --noninteractive  do not prompt, assume 'yes' for any required answers
+ -q --quiet           suppress output
+ -v --verbose         enable additional output
+    --config          set/override config option
+    --debug           enable debugging output
+    --debugger        start debugger
+    --encoding        set the charset encoding (default: ascii)
+    --encodingmode    set the charset encoding mode (default: strict)
+    --traceback       print traceback on exception
+    --time            time how long the command takes
+    --profile         print command execution profile
+    --version         output version information and exit
+ -h --help            display help and exit
+% hg help --debug
 debugextension extension - only debugcommands
 
 list of commands:
 
  debugfoobar:
       yet another debug command
+ foo:
+      yet another foo command
 
 enabled extensions: