Patchwork [6,of,6] hgweb: support showing output based on a ?lang= parameter RFC

login
register
mail settings
Submitter timeless@mozdev.org
Date Jan. 12, 2016, 6:38 p.m.
Message ID <b19888b62650e660619f.1452623889@waste.org>
Download mbox | patch
Permalink /patch/12702/
State Changes Requested
Delegated to: Yuya Nishihara
Headers show

Comments

timeless@mozdev.org - Jan. 12, 2016, 6:38 p.m.
# HG changeset patch
# User timeless <timeless@mozdev.org>
# Date 1452622138 0
#      Tue Jan 12 18:08:58 2016 +0000
# Node ID b19888b62650e660619f3f94b39a6659be0786e6
# Parent  b07e12420422c7767f72171c842426750d0f54a3
hgweb: support showing output based on a ?lang= parameter RFC

This is a proof-of-concept showing that it is sort of possible
to get the web ui to spit out content in other languages.

Patch

diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -28,6 +28,7 @@ 
     error,
     hg,
     hook,
+    i18n,
     repoview,
     templatefilters,
     templater,
@@ -418,6 +419,9 @@ 
                 rctx.ctype = ctype
                 content = webcommands.rawfile(rctx, req, tmpl)
             else:
+                lang = req.form.get('lang', None)
+                if lang is not None and len(lang):
+                    i18n.setdatapath(util.datapath, lang)
                 content = getattr(webcommands, cmd)(rctx, req, tmpl)
                 req.respond(HTTP_OK, ctype)
 
diff --git a/tests/test-hgweb-locale.t b/tests/test-hgweb-locale.t
--- a/tests/test-hgweb-locale.t
+++ b/tests/test-hgweb-locale.t
@@ -4,11 +4,540 @@ 
 
   $ hg init test
   $ cd test
+  $ LANG=ja
   $ LANGUAGE=
   $ LC_ALL=
   $ hg serve --singlethreaded -n help -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
   $ cat hg.pid >> $DAEMON_PIDS
 
+help add (default: Japanese)
+
+  $ get-with-headers.py localhost:$HGPORT 'help/add'
+  200 Script output follows
+  
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
+  <head>
+  <link rel="icon" href="/static/hgicon.png" type="image/png" />
+  <meta name="robots" content="index, nofollow" />
+  <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
+  <script type="text/javascript" src="/static/mercurial.js"></script>
+  
+  <title>Help: add</title>
+  </head>
+  <body>
+  
+  <div class="container">
+  <div class="menu">
+  <div class="logo">
+  <a href="https://mercurial-scm.org/">
+  <img src="/static/hglogo.png" alt="mercurial" /></a>
+  </div>
+  <ul>
+  <li><a href="/shortlog">log</a></li>
+  <li><a href="/graph">graph</a></li>
+  <li><a href="/tags">tags</a></li>
+  <li><a href="/bookmarks">bookmarks</a></li>
+  <li><a href="/branches">branches</a></li>
+  </ul>
+  <ul>
+   <li class="active"><a href="/help">help</a></li>
+  </ul>
+  </div>
+  
+  <div class="main">
+  <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
+  <h3>Help: add</h3>
+  
+  <form class="search" action="/log">
+  
+  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <div id="hint">Find changesets by keywords (author, files, the commit message), revision
+  number or hash, or <a href="/help/revsets">revset expression</a>.</div>
+  </form>
+  <div id="doc">
+  <p>
+  hg add [OPTION]... [FILE]...
+  </p>
+  <p>
+  \xe6\x8c\x87\xe5\xae\x9a\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab\xe3\x81\xae\xe8\xbf\xbd\xe5\x8a\xa0\xe7\x99\xbb\xe9\x8c\xb2\xe4\xba\x88\xe7\xb4\x84 (esc)
+  </p>
+  <p>
+  \xe6\xa7\x8b\xe6\x88\x90\xe7\xae\xa1\xe7\x90\x86\xe3\x81\xb8\xe3\x81\xae\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab\xe3\x81\xae\xe8\xbf\xbd\xe5\x8a\xa0\xe7\x99\xbb\xe9\x8c\xb2\xe3\x82\x92\xe4\xba\x88\xe7\xb4\x84\xe3\x81\x97\xe3\x81\xbe\xe3\x81\x99\xe3\x80\x82 (esc)
+  </p>
+  <p>
+  \xe6\x8c\x87\xe5\xae\x9a\xe3\x81\x95\xe3\x82\x8c\xe3\x81\x9f\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab\xe3\x81\xaf\xe3\x80\x81 \xe6\xac\xa1\xe5\x9b\x9e\xe3\x81\xae\xe3\x82\xb3\xe3\x83\x9f\xe3\x83\x83\xe3\x83\x88\xe3\x81\x8b\xe3\x82\x89\xe6\xa7\x8b\xe6\x88\x90\xe7\xae\xa1\xe7\x90\x86\xe5\xaf\xbe\xe8\xb1\xa1\xe3\x81\xa8\xe3\x81\xaa\xe3\x82\x8a\xe3\x81\xbe\xe3\x81\x99\xe3\x80\x82 (esc)
+  \xe8\xbf\xbd\xe5\x8a\xa0\xe7\x99\xbb\xe9\x8c\xb2\xe3\x81\xae\xe3\x82\xb3\xe3\x83\x9f\xe3\x83\x83\xe3\x83\x88\xe5\x89\x8d\xe5\x8f\x96\xe3\x82\x8a\xe6\xb6\x88\xe3\x81\x97\xe3\x81\xaf &quot;hg help forget&quot; \xe3\x82\x92\xe5\x8f\x82\xe7\x85\xa7\xe3\x81\x97\xe3\x81\xa6\xe3\x81\x8f\xe3\x81\xa0\xe3\x81\x95\xe3\x81\x84\xe3\x80\x82 (esc)
+  </p>
+  <p>
+  If no names are given, add all files to the repository (except
+  files matching &quot;.hgignore&quot;).
+  </p>
+  <p>
+  Examples:
+  </p>
+  <ul>
+   <li> New (unknown) files are added   automatically by &quot;hg add&quot;:
+  <pre>
+  \$ ls
+  foo.c
+  \$ hg status
+  ? foo.c
+  \$ hg add
+  adding foo.c
+  \$ hg status
+  A foo.c
+  </pre>
+   <li> Specific files to be added can be specified:
+  <pre>
+  \$ ls
+  bar.c  foo.c
+  \$ hg status
+  ? bar.c
+  ? foo.c
+  \$ hg add bar.c
+  \$ hg status
+  A bar.c
+  ? foo.c
+  </pre>
+  </ul>
+  <p>
+  \xe5\x85\xa8\xe3\x81\xa6\xe3\x81\xae\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab\xe3\x81\xae\xe7\x99\xbb\xe9\x8c\xb2\xe3\x81\x8c\xe6\x88\x90\xe5\x8a\x9f\xe3\x81\x97\xe3\x81\x9f\xe5\xa0\xb4\xe5\x90\x88\xe3\x81\xae\xe3\x82\xb3\xe3\x83\x9e\xe3\x83\xb3\xe3\x83\x89\xe7\xb5\x82\xe4\xba\x86\xe5\x80\xa4\xe3\x81\xaf 0 \xe3\x81\xa7\xe3\x81\x99\xe3\x80\x82 (esc)
+  </p>
+  <p>
+  \xe3\x82\xaa\xe3\x83\x97\xe3\x82\xb7\xe3\x83\xa7\xe3\x83\xb3 ([+] \xe5\x8d\xb0\xe4\xbb\x98\xe3\x81\x8d\xe3\x81\xae\xe3\x82\xaa\xe3\x83\x97\xe3\x82\xb7\xe3\x83\xa7\xe3\x83\xb3\xe3\x81\xaf\xe8\xa4\x87\xe6\x95\xb0\xe5\x9b\x9e\xe6\x8c\x87\xe5\xae\x9a\xe5\x8f\xaf\xe8\x83\xbd\xe3\x81\xa7\xe3\x81\x99): (esc)
+  </p>
+  <table>
+  <tr><td>-I</td>
+  <td>--include ???? [+]</td>
+  <td>?????????????????????</td></tr>
+  <tr><td>-X</td>
+  <td>--exclude ???? [+]</td>
+  <td>??????????????????????</td></tr>
+  <tr><td>-S</td>
+  <td>--subrepos</td>
+  <td>??????????????</td></tr>
+  <tr><td>-n</td>
+  <td>--dry-run</td>
+  <td>??????????????????????</td></tr>
+  </table>
+  <p>
+  \xe3\x82\xb0\xe3\x83\xad\xe3\x83\xbc\xe3\x83\x90\xe3\x83\xab\xe3\x82\xaa\xe3\x83\x97\xe3\x82\xb7\xe3\x83\xa7\xe3\x83\xb3 ([+] \xe5\x8d\xb0\xe4\xbb\x98\xe3\x81\x8d\xe3\x81\xae\xe3\x82\xaa\xe3\x83\x97\xe3\x82\xb7\xe3\x83\xa7\xe3\x83\xb3\xe3\x81\xaf\xe8\xa4\x87\xe6\x95\xb0\xe5\x9b\x9e\xe6\x8c\x87\xe5\xae\x9a\xe5\x8f\xaf\xe8\x83\xbd\xe3\x81\xa7\xe3\x81\x99): (esc)
+  </p>
+  <table>
+  <tr><td>-R</td>
+  <td>--repository ?????</td>
+  <td>???????????? ??????????????</td></tr>
+  <tr><td></td>
+  <td>--cwd ??????</td>
+  <td>???????</td></tr>
+  <tr><td>-y</td>
+  <td>--noninteractive</td>
+  <td>????????? ?????????????</td></tr>
+  <tr><td>-q</td>
+  <td>--quiet</td>
+  <td>?????</td></tr>
+  <tr><td>-v</td>
+  <td>--verbose</td>
+  <td>??????????</td></tr>
+  <tr><td></td>
+  <td>--config ?? [+]</td>
+  <td>??????????????(????? 'section.name=value')</td></tr>
+  <tr><td></td>
+  <td>--debug</td>
+  <td>??????????</td></tr>
+  <tr><td></td>
+  <td>--debugger</td>
+  <td>???????</td></tr>
+  <tr><td></td>
+  <td>--encoding ?????</td>
+  <td>????????????? (\xe3\x83\x87\xe3\x83\x95\xe3\x82\xa9\xe3\x83\xab\xe3\x83\x88\xe5\x80\xa4: ascii)</td></tr> (esc)
+  <tr><td></td>
+  <td>--encodingmode ???</td>
+  <td>???????????????? (\xe3\x83\x87\xe3\x83\x95\xe3\x82\xa9\xe3\x83\xab\xe3\x83\x88\xe5\x80\xa4: strict)</td></tr> (esc)
+  <tr><td></td>
+  <td>--traceback</td>
+  <td>???????????????????</td></tr>
+  <tr><td></td>
+  <td>--time</td>
+  <td>??????????????</td></tr>
+  <tr><td></td>
+  <td>--profile</td>
+  <td>????????????????</td></tr>
+  <tr><td></td>
+  <td>--version</td>
+  <td>??????????????</td></tr>
+  <tr><td>-h</td>
+  <td>--help</td>
+  <td>????????????</td></tr>
+  <tr><td></td>
+  <td>--hidden</td>
+  <td>??????????????????</td></tr>
+  </table>
+  
+  </div>
+  </div>
+  </div>
+  
+  <script type="text/javascript">process_dates()</script>
+  
+  
+  </body>
+  </html>
+  
+
+help add (request: Japanese)
+
+  $ get-with-headers.py localhost:$HGPORT 'help/add?lang=ja'
+  200 Script output follows
+  
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
+  <head>
+  <link rel="icon" href="/static/hgicon.png" type="image/png" />
+  <meta name="robots" content="index, nofollow" />
+  <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
+  <script type="text/javascript" src="/static/mercurial.js"></script>
+  
+  <title>Help: add</title>
+  </head>
+  <body>
+  
+  <div class="container">
+  <div class="menu">
+  <div class="logo">
+  <a href="https://mercurial-scm.org/">
+  <img src="/static/hglogo.png" alt="mercurial" /></a>
+  </div>
+  <ul>
+  <li><a href="/shortlog">log</a></li>
+  <li><a href="/graph">graph</a></li>
+  <li><a href="/tags">tags</a></li>
+  <li><a href="/bookmarks">bookmarks</a></li>
+  <li><a href="/branches">branches</a></li>
+  </ul>
+  <ul>
+   <li class="active"><a href="/help">help</a></li>
+  </ul>
+  </div>
+  
+  <div class="main">
+  <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
+  <h3>Help: add</h3>
+  
+  <form class="search" action="/log">
+  
+  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <div id="hint">Find changesets by keywords (author, files, the commit message), revision
+  number or hash, or <a href="/help/revsets">revset expression</a>.</div>
+  </form>
+  <div id="doc">
+  <p>
+  hg add [OPTION]... [FILE]...
+  </p>
+  <p>
+  \xe6\x8c\x87\xe5\xae\x9a\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab\xe3\x81\xae\xe8\xbf\xbd\xe5\x8a\xa0\xe7\x99\xbb\xe9\x8c\xb2\xe4\xba\x88\xe7\xb4\x84 (esc)
+  </p>
+  <p>
+  \xe6\xa7\x8b\xe6\x88\x90\xe7\xae\xa1\xe7\x90\x86\xe3\x81\xb8\xe3\x81\xae\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab\xe3\x81\xae\xe8\xbf\xbd\xe5\x8a\xa0\xe7\x99\xbb\xe9\x8c\xb2\xe3\x82\x92\xe4\xba\x88\xe7\xb4\x84\xe3\x81\x97\xe3\x81\xbe\xe3\x81\x99\xe3\x80\x82 (esc)
+  </p>
+  <p>
+  \xe6\x8c\x87\xe5\xae\x9a\xe3\x81\x95\xe3\x82\x8c\xe3\x81\x9f\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab\xe3\x81\xaf\xe3\x80\x81 \xe6\xac\xa1\xe5\x9b\x9e\xe3\x81\xae\xe3\x82\xb3\xe3\x83\x9f\xe3\x83\x83\xe3\x83\x88\xe3\x81\x8b\xe3\x82\x89\xe6\xa7\x8b\xe6\x88\x90\xe7\xae\xa1\xe7\x90\x86\xe5\xaf\xbe\xe8\xb1\xa1\xe3\x81\xa8\xe3\x81\xaa\xe3\x82\x8a\xe3\x81\xbe\xe3\x81\x99\xe3\x80\x82 (esc)
+  \xe8\xbf\xbd\xe5\x8a\xa0\xe7\x99\xbb\xe9\x8c\xb2\xe3\x81\xae\xe3\x82\xb3\xe3\x83\x9f\xe3\x83\x83\xe3\x83\x88\xe5\x89\x8d\xe5\x8f\x96\xe3\x82\x8a\xe6\xb6\x88\xe3\x81\x97\xe3\x81\xaf &quot;hg help forget&quot; \xe3\x82\x92\xe5\x8f\x82\xe7\x85\xa7\xe3\x81\x97\xe3\x81\xa6\xe3\x81\x8f\xe3\x81\xa0\xe3\x81\x95\xe3\x81\x84\xe3\x80\x82 (esc)
+  </p>
+  <p>
+  If no names are given, add all files to the repository (except
+  files matching &quot;.hgignore&quot;).
+  </p>
+  <p>
+  Examples:
+  </p>
+  <ul>
+   <li> New (unknown) files are added   automatically by &quot;hg add&quot;:
+  <pre>
+  \$ ls
+  foo.c
+  \$ hg status
+  ? foo.c
+  \$ hg add
+  adding foo.c
+  \$ hg status
+  A foo.c
+  </pre>
+   <li> Specific files to be added can be specified:
+  <pre>
+  \$ ls
+  bar.c  foo.c
+  \$ hg status
+  ? bar.c
+  ? foo.c
+  \$ hg add bar.c
+  \$ hg status
+  A bar.c
+  ? foo.c
+  </pre>
+  </ul>
+  <p>
+  \xe5\x85\xa8\xe3\x81\xa6\xe3\x81\xae\xe3\x83\x95\xe3\x82\xa1\xe3\x82\xa4\xe3\x83\xab\xe3\x81\xae\xe7\x99\xbb\xe9\x8c\xb2\xe3\x81\x8c\xe6\x88\x90\xe5\x8a\x9f\xe3\x81\x97\xe3\x81\x9f\xe5\xa0\xb4\xe5\x90\x88\xe3\x81\xae\xe3\x82\xb3\xe3\x83\x9e\xe3\x83\xb3\xe3\x83\x89\xe7\xb5\x82\xe4\xba\x86\xe5\x80\xa4\xe3\x81\xaf 0 \xe3\x81\xa7\xe3\x81\x99\xe3\x80\x82 (esc)
+  </p>
+  <p>
+  \xe3\x82\xaa\xe3\x83\x97\xe3\x82\xb7\xe3\x83\xa7\xe3\x83\xb3 ([+] \xe5\x8d\xb0\xe4\xbb\x98\xe3\x81\x8d\xe3\x81\xae\xe3\x82\xaa\xe3\x83\x97\xe3\x82\xb7\xe3\x83\xa7\xe3\x83\xb3\xe3\x81\xaf\xe8\xa4\x87\xe6\x95\xb0\xe5\x9b\x9e\xe6\x8c\x87\xe5\xae\x9a\xe5\x8f\xaf\xe8\x83\xbd\xe3\x81\xa7\xe3\x81\x99): (esc)
+  </p>
+  <table>
+  <tr><td>-I</td>
+  <td>--include ???? [+]</td>
+  <td>?????????????????????</td></tr>
+  <tr><td>-X</td>
+  <td>--exclude ???? [+]</td>
+  <td>??????????????????????</td></tr>
+  <tr><td>-S</td>
+  <td>--subrepos</td>
+  <td>??????????????</td></tr>
+  <tr><td>-n</td>
+  <td>--dry-run</td>
+  <td>??????????????????????</td></tr>
+  </table>
+  <p>
+  \xe3\x82\xb0\xe3\x83\xad\xe3\x83\xbc\xe3\x83\x90\xe3\x83\xab\xe3\x82\xaa\xe3\x83\x97\xe3\x82\xb7\xe3\x83\xa7\xe3\x83\xb3 ([+] \xe5\x8d\xb0\xe4\xbb\x98\xe3\x81\x8d\xe3\x81\xae\xe3\x82\xaa\xe3\x83\x97\xe3\x82\xb7\xe3\x83\xa7\xe3\x83\xb3\xe3\x81\xaf\xe8\xa4\x87\xe6\x95\xb0\xe5\x9b\x9e\xe6\x8c\x87\xe5\xae\x9a\xe5\x8f\xaf\xe8\x83\xbd\xe3\x81\xa7\xe3\x81\x99): (esc)
+  </p>
+  <table>
+  <tr><td>-R</td>
+  <td>--repository ?????</td>
+  <td>???????????? ??????????????</td></tr>
+  <tr><td></td>
+  <td>--cwd ??????</td>
+  <td>???????</td></tr>
+  <tr><td>-y</td>
+  <td>--noninteractive</td>
+  <td>????????? ?????????????</td></tr>
+  <tr><td>-q</td>
+  <td>--quiet</td>
+  <td>?????</td></tr>
+  <tr><td>-v</td>
+  <td>--verbose</td>
+  <td>??????????</td></tr>
+  <tr><td></td>
+  <td>--config ?? [+]</td>
+  <td>??????????????(????? 'section.name=value')</td></tr>
+  <tr><td></td>
+  <td>--debug</td>
+  <td>??????????</td></tr>
+  <tr><td></td>
+  <td>--debugger</td>
+  <td>???????</td></tr>
+  <tr><td></td>
+  <td>--encoding ?????</td>
+  <td>????????????? (\xe3\x83\x87\xe3\x83\x95\xe3\x82\xa9\xe3\x83\xab\xe3\x83\x88\xe5\x80\xa4: ascii)</td></tr> (esc)
+  <tr><td></td>
+  <td>--encodingmode ???</td>
+  <td>???????????????? (\xe3\x83\x87\xe3\x83\x95\xe3\x82\xa9\xe3\x83\xab\xe3\x83\x88\xe5\x80\xa4: strict)</td></tr> (esc)
+  <tr><td></td>
+  <td>--traceback</td>
+  <td>???????????????????</td></tr>
+  <tr><td></td>
+  <td>--time</td>
+  <td>??????????????</td></tr>
+  <tr><td></td>
+  <td>--profile</td>
+  <td>????????????????</td></tr>
+  <tr><td></td>
+  <td>--version</td>
+  <td>??????????????</td></tr>
+  <tr><td>-h</td>
+  <td>--help</td>
+  <td>????????????</td></tr>
+  <tr><td></td>
+  <td>--hidden</td>
+  <td>??????????????????</td></tr>
+  </table>
+  
+  </div>
+  </div>
+  </div>
+  
+  <script type="text/javascript">process_dates()</script>
+  
+  
+  </body>
+  </html>
+  
+
+help add (request: German)
+
+  $ get-with-headers.py localhost:$HGPORT 'help/add?lang=de'
+  200 Script output follows
+  
+  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
+  <head>
+  <link rel="icon" href="/static/hgicon.png" type="image/png" />
+  <meta name="robots" content="index, nofollow" />
+  <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
+  <script type="text/javascript" src="/static/mercurial.js"></script>
+  
+  <title>Help: add</title>
+  </head>
+  <body>
+  
+  <div class="container">
+  <div class="menu">
+  <div class="logo">
+  <a href="https://mercurial-scm.org/">
+  <img src="/static/hglogo.png" alt="mercurial" /></a>
+  </div>
+  <ul>
+  <li><a href="/shortlog">log</a></li>
+  <li><a href="/graph">graph</a></li>
+  <li><a href="/tags">tags</a></li>
+  <li><a href="/bookmarks">bookmarks</a></li>
+  <li><a href="/branches">branches</a></li>
+  </ul>
+  <ul>
+   <li class="active"><a href="/help">help</a></li>
+  </ul>
+  </div>
+  
+  <div class="main">
+  <h2 class="breadcrumb"><a href="/">Mercurial</a> </h2>
+  <h3>Help: add</h3>
+  
+  <form class="search" action="/log">
+  
+  <p><input name="rev" id="search1" type="text" size="30" /></p>
+  <div id="hint">Find changesets by keywords (author, files, the commit message), revision
+  number or hash, or <a href="/help/revsets">revset expression</a>.</div>
+  </form>
+  <div id="doc">
+  <p>
+  hg add [OPTION]... [FILE]...
+  </p>
+  <p>
+  F\xc3\xbcgt die angegebenen Dateien der n\xc3\xa4chsten Version hinzu (esc)
+  </p>
+  <p>
+  Merkt Dateien zur Versionskontrolle im Projektarchiv vor.
+  </p>
+  <p>
+  Die Dateien werden dem Projektarchiv beim n\xc3\xa4chsten \xc3\x9cbernehmen (commit) (esc)
+  hinzugef\xc3\xbcgt. Um dies vorher r\xc3\xbcckg\xc3\xa4ngig zu machen, siehe&quot;hg forget&quot;. (esc)
+  </p>
+  <p>
+  If no names are given, add all files to the repository (except
+  files matching &quot;.hgignore&quot;).
+  </p>
+  <p>
+  Examples:
+  </p>
+  <ul>
+   <li> New (unknown) files are added   automatically by &quot;hg add&quot;:
+  <pre>
+  \$ ls
+  foo.c
+  \$ hg status
+  ? foo.c
+  \$ hg add
+  adding foo.c
+  \$ hg status
+  A foo.c
+  </pre>
+   <li> Specific files to be added can be specified:
+  <pre>
+  \$ ls
+  bar.c  foo.c
+  \$ hg status
+  ? bar.c
+  ? foo.c
+  \$ hg add bar.c
+  \$ hg status
+  A bar.c
+  ? foo.c
+  </pre>
+  </ul>
+  <p>
+  Gibt 0 zur\xc3\xbcck, wenn alle Dateien erfolgreich hinzugef\xc3\xbcgt wurden. (esc)
+  </p>
+  <p>
+  options ([+] can be repeated):
+  </p>
+  <table>
+  <tr><td>-I</td>
+  <td>--include ???? [+]</td>
+  <td>?????????????????????</td></tr>
+  <tr><td>-X</td>
+  <td>--exclude ???? [+]</td>
+  <td>??????????????????????</td></tr>
+  <tr><td>-S</td>
+  <td>--subrepos</td>
+  <td>??????????????</td></tr>
+  <tr><td>-n</td>
+  <td>--dry-run</td>
+  <td>??????????????????????</td></tr>
+  </table>
+  <p>
+  global options ([+] can be repeated):
+  </p>
+  <table>
+  <tr><td>-R</td>
+  <td>--repository ?????</td>
+  <td>???????????? ??????????????</td></tr>
+  <tr><td></td>
+  <td>--cwd ??????</td>
+  <td>???????</td></tr>
+  <tr><td>-y</td>
+  <td>--noninteractive</td>
+  <td>????????? ?????????????</td></tr>
+  <tr><td>-q</td>
+  <td>--quiet</td>
+  <td>?????</td></tr>
+  <tr><td>-v</td>
+  <td>--verbose</td>
+  <td>??????????</td></tr>
+  <tr><td></td>
+  <td>--config ?? [+]</td>
+  <td>??????????????(????? 'section.name=value')</td></tr>
+  <tr><td></td>
+  <td>--debug</td>
+  <td>??????????</td></tr>
+  <tr><td></td>
+  <td>--debugger</td>
+  <td>???????</td></tr>
+  <tr><td></td>
+  <td>--encoding ?????</td>
+  <td>????????????? (Voreinstellung: ascii)</td></tr>
+  <tr><td></td>
+  <td>--encodingmode ???</td>
+  <td>???????????????? (Voreinstellung: strict)</td></tr>
+  <tr><td></td>
+  <td>--traceback</td>
+  <td>???????????????????</td></tr>
+  <tr><td></td>
+  <td>--time</td>
+  <td>??????????????</td></tr>
+  <tr><td></td>
+  <td>--profile</td>
+  <td>????????????????</td></tr>
+  <tr><td></td>
+  <td>--version</td>
+  <td>??????????????</td></tr>
+  <tr><td>-h</td>
+  <td>--help</td>
+  <td>????????????</td></tr>
+  <tr><td></td>
+  <td>--hidden</td>
+  <td>??????????????????</td></tr>
+  </table>
+  
+  </div>
+  </div>
+  </div>
+  
+  <script type="text/javascript">process_dates()</script>
+  
+  
+  </body>
+  </html>
+  
+
 stop
 
   $ killdaemons.py