[PATCH 1 of 3 STABLE?] tests: test-gendoc.t really checks the languages
Simon Heimberg
simohe at besonet.ch
Thu Jul 25 14:19:50 CDT 2013
# HG changeset patch
# User Simon Heimberg <simohe at besonet.ch>
# Date 1374778763 -7200
# Node ID 02c7739c841d08a4b2e22f4cd6f8ca00d0559e82
# Parent d5f56b4da136c867c3aab952e72049f4d79e1582
tests: test-gendoc.t really checks the languages
Before the language variable LC_ALL was ignored, C was checked several times.
Setting the language by LANGUAGE works and shows many errors.
Related to issue4003.
diff -r d5f56b4da136 -r 02c7739c841d tests/test-gendoc.t
--- a/tests/test-gendoc.t Don Jul 25 19:59:43 2013 +0200
+++ b/tests/test-gendoc.t Don Jul 25 20:59:23 2013 +0200
@@ -9,7 +9,7 @@
> echo "% extracting documentation from $LOCALE"
> echo ".. -*- coding: utf-8 -*-" > gendoc-$LOCALE.txt
> echo "" >> gendoc-$LOCALE.txt
- > LC_ALL=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit
+ > LANGUAGE=$LOCALE python "$TESTDIR/../doc/gendoc.py" >> gendoc-$LOCALE.txt 2> /dev/null || exit 3
>
> # We call runrst without adding "--halt warning" to make it report
> # all errors instead of stopping on the first one.
@@ -25,6 +25,17 @@
% extracting documentation from de
checking for parse errors
+ gendoc-de.txt:354: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
+ gendoc-de.txt:1752: (ERROR/3) Unexpected indentation.
+ gendoc-de.txt:1753: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
+ gendoc-de.txt:5578: (WARNING/2) Inline literal start-string without end-string.
+ gendoc-de.txt:5593: (ERROR/3) Unexpected indentation.
+ gendoc-de.txt:5594: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
+ gendoc-de.txt:6779: (WARNING/2) Inline emphasis start-string without end-string.
+ gendoc-de.txt:7281: (WARNING/2) Option list ends without a blank line; unexpected unindent.
+ gendoc-de.txt:7538: (ERROR/3) Unexpected indentation.
+ gendoc-de.txt:7539: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
+ gendoc-de.txt:7552: (WARNING/2) Literal block expected; none found.
% extracting documentation from el
checking for parse errors
@@ -34,24 +45,416 @@
% extracting documentation from it
checking for parse errors
+ gendoc-it.txt:74: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ Un esempio che mostra come file nuovi (sconosciuti) vengono
+ aggiunti automaticamente da :hg:`add`::
+
+ $ ls
+ foo.c
+ $ hg status
+ ? foo.c
+ $ hg add
+ adding foo.c
+ $ hg status
+ A foo.c
+
+ gendoc-it.txt:183: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ Examples:
+
+ - create a zip file containing the 1.0 release::
+
+ hg archive -r 1.0 project-1.0.zip
+
+ - create a tarball excluding .hg files::
+
+ hg archive project.tar.gz -X ".hg*"
+
+ gendoc-it.txt:299: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ Some examples:
+
+ - start a bisection with known bad revision 12, and good revision 34::
+
+ hg bisect --bad 34
+ hg bisect --good 12
+
+ - advance the current bisection by marking current revision as good or
+ bad::
+
+ hg bisect --good
+ hg bisect --bad
+
+ - mark the current revision, or a known revision, to be skipped (e.g. if
+ that revision is not usable because of another issue)::
+
+ hg bisect --skip
+ hg bisect --skip 23
+
+ - skip all revisions that do not touch directories ``foo`` or ``bar``
+
+ hg bisect --skip '!( file("path:foo") & file("path:bar") )'
+
+ - forget the current bisection::
+
+ hg bisect --reset
+
+ - use 'make && make tests' to automatically find the first broken
+ revision::
+
+ hg bisect --reset
+ hg bisect --bad 34
+ hg bisect --good 12
+ hg bisect --command 'make && make tests'
+
+ - see all changesets whose states are already known in the current
+ bisection::
+
+ hg log -r "bisect(pruned)"
+
+ - see the changeset currently being bisected (especially useful
+ if running with -U/--noupdate)::
+
+ hg log -r "bisect(current)"
+
+ - see all changesets that took part in the current bisection::
+
+ hg log -r "bisect(range)"
+
+ - with the graphlog extension, you can even get a nice graph::
+
+ hg log --graph -r "bisect(range)"
+
+ See :hg:`help revsets` for more about the `bisect()` keyword.
+
+ gendoc-it.txt:569: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ For efficiency, hardlinks are used for cloning whenever the
+ source and destination are on the same filesystem (note this
+ applies only to the repository data, not to the working
+ directory). Some filesystems, such as AFS, implement hardlinking
+ incorrectly, but do not report errors. In these cases, use the
+ --pull option to avoid hardlinking.
+
+ In some cases, you can clone repositories and the working
+ directory using full hardlinks with ::
+
+ $ cp -al REPO REPOCLONE
+
+ This is the fastest way to clone, but it is not always safe. The
+ operation is not atomic (making sure REPO is not modified during
+ the operation is up to you) and you have to make sure your
+ editor breaks hardlinks (Emacs and most Linux Kernel tools do
+ so). Also, this is not compatible with certain extensions that
+ place their metadata under the .hg directory, such as mq.
+
+ Mercurial will update the working directory to the first applicable
+ revision from this list:
+
+ a) null if -U or the source repository has no changesets
+ b) if -u . and the source repository is local, the first parent of
+ the source repository's working directory
+ c) the changeset specified with -u (if a branch name, this means the
+ latest head of that branch)
+ d) the changeset specified with -r
+ e) the tipmost head specified with -b
+ f) the tipmost head specified with the url#branch source syntax
+ g) the revision marked with the '@' bookmark, if present
+ h) the tipmost head of the default branch
+ i) tip
+
+ Examples:
+
+ - clone a remote repository to a new directory named hg/::
+
+ hg clone http://selenic.com/hg
+
+ - create a lightweight local clone::
+
+ hg clone project/ project-feature/
+
+ - clone from an absolute path on an ssh server (note double-slash)::
+
+ hg clone ssh://user@server//home/projects/alpha/
+
+ - do a high-speed clone over a LAN while checking out a
+ specified version::
+
+ hg clone --uncompressed http://server/repo -u 1.5
+
+ - create a repository without changesets after a particular revision::
+
+ hg clone -r 04e544 experimental/ good/
+
+ - clone (and track) a particular named branch::
+
+ hg clone http://selenic.com/hg#stable
+
+ gendoc-it.txt:767: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ Examples:
+
+ - compare a file in the current working directory to its parent::
+
+ hg diff foo.c
+
+ - compare two historical versions of a directory, with rename info::
+
+ hg diff --git -r 1.0:1.2 lib/
+
+ - get change stats relative to the last change on some date::
+
+ hg diff --stat -r "date('may 2')"
+
+ - diff all newly-added files that contain a keyword::
+
+ hg diff "set:added() and grep(GNU)"
+
+ - compare a revision and its parents::
+
+ hg diff -c 9353 # compare against first parent
+ hg diff -r 9353^:9353 # same using revset syntax
+ hg diff -r 9353^2:9353 # compare against the second parent
+
+ gendoc-it.txt:827: (ERROR/3) Unknown directive type "nota".
+
+ .. nota::
+ l'export potrebbe generare un diff inatteso per changeset di
+ merge, dal momento che confronter\xe0 tali changeset solo con
+ il loro primo genitore.
+
+ gendoc-it.txt:855: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ Examples:
+
+ - use export and import to transplant a bugfix to the current
+ branch::
+
+ hg export -r 9353 | hg import -
+
+ - export all the changesets between two revisions to a file with
+ rename information::
+
+ hg export --git -r 123:150 > changes.txt
+
+ - split outgoing changes into a series of patches with
+ descriptive names::
+
+ hg export -r "outgoing()" -o "%n-%m.patch"
+
+ gendoc-it.txt:901: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ Examples:
+
+ - forget newly-added binary files::
+
+ hg forget "set:added() and binary()"
+
+ - forget files that would be excluded by .hgignore::
+
+ hg forget "set:hgignore()"
+
+ gendoc-it.txt:949: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ Examples:
+
+ - copy a single change to the stable branch and edit its description::
+
+ hg update stable
+ hg graft --edit 9393
+
+ - graft a range of changesets with one exception, updating dates::
+
+ hg graft -D "2085::2093 and not 2091"
+
+ - continue a graft after resolving conflicts::
+
+ hg graft -c
+
+ - show the source of a grafted changeset::
+
+ hg log --debug -r .
+
+ gendoc-it.txt:1100: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ Examples:
+
+ - generate a build identifier for the working directory::
+
+ hg id --id > build-id.dat
+
+ - find the revision corresponding to a tag::
+
+ hg id -n -r 1.3
+
+ - check the most recent revision of a remote repository::
+
+ hg id -r tip http://selenic.com/hg/
+
+ gendoc-it.txt:1179: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ Examples:
+
+ - import a traditional patch from a website and detect renames::
+
+ hg import -s 80 http://example.com/bugfix.patch
+
+ - import a changeset from an hgweb server::
+
+ hg import http://www.selenic.com/hg/rev/5ca8c111e9aa
+
+ - import all the patches in an Unix-style mbox::
+
+ hg import incoming-patches.mbox
+
+ - attempt to exactly restore an exported changeset (not always
+ possible)::
+
+ hg import --exact proposed-fix.patch
+
+ gendoc-it.txt:1205: (WARNING/2) Option list ends without a blank line; unexpected unindent.
+ gendoc-it.txt:1729: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ -A/--after can be used to remove only files that have already
+ been deleted, -f/--force can be used to force deletion, and -Af
+ can be used to remove files from the next revision without
+ deleting them from the working directory.
+
+ The following table details the behavior of remove for different
+ file states (columns) and option combinations (rows). The file
+ states are Added [A], Clean [C], Modified [M] and Missing [!]
+ (as reported by :hg:`status`). The actions are Warn, Remove
+ (from branch) and Delete (from disk):
+
+ ======= == == == ==
+ A C M !
+ ======= == == == ==
+ none W RD W R
+ -f R RD RD R
+ -A W W W R
+ -Af R R R R
+ ======= == == == ==
+
+ Note that remove never deletes files in Added [A] state from the
+ working directory, not even if option --force is specified.
+
+ gendoc-it.txt:1911: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ For example, the following commands are transactional, and their
+ effects can be rolled back:
+
+ - commit
+ - import
+ - pull
+ - push (with this repository as the destination)
+ - unbundle
+
+ To avoid permanent data loss, rollback will refuse to rollback a
+ commit transaction if it isn't checked out. Use --force to
+ override this protection.
+
+ gendoc-it.txt:2065: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ Examples:
+
+ - show changes in the working directory relative to a
+ changeset::
+
+ hg status --rev 9353
+
+ - show all changes including copies in an existing changeset::
+
+ hg status --copies --change 9353
+
+ - get a NUL separated list of added files, suitable for xargs::
+
+ hg status -an0
+
+ gendoc-it.txt:6458: (ERROR/3) Unknown directive type "contenitore".
+
+ .. contenitore:: verboso
+
+ Some examples:
+
+ - pull largefiles for all branch heads::
+
+ hg lfpull -r "head() and not closed()"
+
+ - pull largefiles on the default branch::
+
+ hg lfpull -r "branch(default)"
+
% extracting documentation from ja
checking for parse errors
+ gendoc-ja.txt:1733: (ERROR/3) Unexpected indentation.
+ gendoc-ja.txt:1734: (WARNING/2) Block quote ends without a blank line; unexpected unindent.
+ gendoc-ja.txt:7977: (WARNING/2) Literal block expected; none found.
% extracting documentation from pt_BR
checking for parse errors
+ gendoc-pt_BR.txt:894: (ERROR/3) Unexpected indentation.
+ gendoc-pt_BR.txt:1224: (ERROR/3) Unexpected indentation.
+ gendoc-pt_BR.txt:1786: (ERROR/3) Content block expected for the "container" directive; none found.
+ gendoc-pt_BR.txt:2807: (WARNING/2) Bullet list ends without a blank line; unexpected unindent.
+ gendoc-pt_BR.txt:6373: (WARNING/2) Inline literal start-string without end-string.
% extracting documentation from ro
checking for parse errors
+ gendoc-ro.txt:156: (WARNING/2) Option list ends without a blank line; unexpected unindent.
+ gendoc-ro.txt:1208: (WARNING/2) Option list ends without a blank line; unexpected unindent.
+ gendoc-ro.txt:1243: (WARNING/2) Option list ends without a blank line; unexpected unindent.
+ gendoc-ro.txt:1414: (WARNING/2) Option list ends without a blank line; unexpected unindent.
+ gendoc-ro.txt:1495: (WARNING/2) Option list ends without a blank line; unexpected unindent.
+ gendoc-ro.txt:1648: (WARNING/2) Option list ends without a blank line; unexpected unindent.
+ gendoc-ro.txt:2244: (WARNING/2) Option list ends without a blank line; unexpected unindent.
+ gendoc-ro.txt:5870: (WARNING/2) Option list ends without a blank line; unexpected unindent.
+ gendoc-ro.txt:7525: (WARNING/2) Option list ends without a blank line; unexpected unindent.
% extracting documentation from ru
checking for parse errors
+ UnicodeError: Unable to decode input data. Tried the following encodings: u'utf-8'.
+ (UnicodeDecodeError: 'utf8' codec can't decode byte 0xbf in position 327618: invalid start byte)
+ Exiting due to error. Use "--traceback" to diagnose.
+ Please report errors to <docutils-users at lists.sf.net>.
+ Include "--traceback" output, Docutils version (0.7 [release]),
+ Python version (2.6.6), your OS type & version, and the
+ command line used.
% extracting documentation from sv
checking for parse errors
+ gendoc-sv.txt:107: (ERROR/3) Unexpected indentation.
% extracting documentation from zh_CN
checking for parse errors
% extracting documentation from zh_TW
checking for parse errors
+ gendoc-zh_TW.txt:1470: (WARNING/2) Inline interpreted text or phrase reference start-string without end-string.
More information about the Mercurial-devel
mailing list