changeset 8920:e3e7f33d72cf

merged Greek translation
author Martin Geisler <mg@lazybytes.net>
date Sun, 21 Jun 2009 20:09:03 +0200
parents c9a01a7798d8 (diff) ec32797aa9b1 (current diff)
children 80f5c4f99b62
files
diffstat 60 files changed, 1302 insertions(+), 831 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/buildrpm	Sun Jan 25 17:35:38 2009 +0200
+++ b/contrib/buildrpm	Sun Jun 21 20:09:03 2009 +0200
@@ -1,19 +1,19 @@
 #!/bin/sh
 #
 # Build a Mercurial RPM in place.
-# Known to work on:
-# - Fedora 9
-# - Fedora 10
 #
 # Bryan O'Sullivan <bos@serpentine.com>
+#
+# Tested on
+# - Fedora 10
+# - Fedora 11
+# - Centos 5.3 (with Fedora EPEL repo for asciidoc)
 
-if hg --version > /dev/null 2>&1; then :
-else
-    echo 'hg command not available!' 1>&2
-    exit 1
-fi
+HG="`dirname $0`/../hg"
+PYTHONPATH="`dirname $0`/../mercurial/pure"
+export PYTHONPATH
 
-root="`hg root 2>/dev/null`"
+root="`$HG root 2>/dev/null`"
 specfile=contrib/mercurial.spec
 
 if [ -z "$root" ]; then
@@ -26,7 +26,7 @@
 cd "$root"
 rm -rf $rpmdir
 mkdir -p $rpmdir/RPMS
-hg clone "$root" $rpmdir/BUILD
+$HG clone "$root" $rpmdir/BUILD
 
 if [ ! -f $specfile ]; then
     echo "Cannot find $specfile!" 1>&2
@@ -35,11 +35,11 @@
 
 tmpspec=/tmp/`basename "$specfile"`.$$ # FIXME: Insecure /tmp handling
 # Use the most recent tag as the version.
-version=`hg tags | perl -e 'while(<STDIN>){if(/^(\d\S+)/){print$1;exit}}'`
+version=`$HG tags | python -c 'import sys; print [l for l in sys.stdin.readlines() if l[0].isdigit()][0].split()[0]'`
 # Compute the release number as the difference in revision numbers
 # between the tip and the most recent tag.
-release=`hg tags | perl -e 'while(<STDIN>){($tag,$id)=/^(\S+)\s+(\d+)/;if($tag eq "tip"){$tip = $id}elsif($tag=~/^\d/){print $tip-$id+1;exit}}'`
-tip=`hg -q tip`
+release=`$HG tags | python -c 'import sys; l = sys.stdin.readlines(); print int(l[0].split()[1].split(":")[0]) - int([x for x in l if x[0].isdigit()][0].split()[1].split(":")[0])'`
+tip=`$HG -q tip`
 
 # Beat up the spec file
 sed -e 's,^Source:.*,Source: /dev/null,' \
@@ -51,11 +51,11 @@
 
 cat <<EOF >> $tmpspec
 %changelog
-* `date +'%a %b %d %Y'` `hg showconfig ui.username` $version-$release
+* `date +'%a %b %d %Y'` `$HG showconfig ui.username` $version-$release
 - Automatically built via $0
 
 EOF
-hg log \
+$HG log \
      --template '* {date|rfc822date} {author}\n- {desc|firstline}\n\n' \
      .hgtags \
   | sed -e 's/^\(\* [MTWFS][a-z][a-z]\), \([0-3][0-9]\) \([A-Z][a-z][a-z]\) /\1 \3 \2 /' \
--- a/contrib/mercurial.spec	Sun Jan 25 17:35:38 2009 +0200
+++ b/contrib/mercurial.spec	Sun Jun 21 20:09:03 2009 +0200
@@ -71,6 +71,8 @@
 %{_bindir}/hg-viz
 %{_bindir}/git-rev-tree
 %{_bindir}/mercurial-convert-repo
-%{_libdir}/python%{pythonver}/site-packages/%{name}-*-py2.5.egg-info
+%if "%{?pythonver}" != "2.4"
+%{_libdir}/python%{pythonver}/site-packages/%{name}-*-py%{pythonver}.egg-info
+%endif
 %{pythonlib}
 %{hgext}
--- a/contrib/perf.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/contrib/perf.py	Sun Jun 21 20:09:03 2009 +0200
@@ -1,4 +1,5 @@
 # perf.py - performance test routines
+'''helper extension to measure performance'''
 
 from mercurial import cmdutil, match, commands
 import time, os, sys
--- a/doc/hgrc.5.txt	Sun Jan 25 17:35:38 2009 +0200
+++ b/doc/hgrc.5.txt	Sun Jun 21 20:09:03 2009 +0200
@@ -142,6 +142,11 @@
     foo.password = bar
     foo.schemes = http https
 
+    bar.prefix = secure.example.org
+    bar.key = path/to/file.key
+    bar.cert = path/to/file.cert
+    bar.schemes = https
+
 Supported arguments:
 
   prefix;;
@@ -152,10 +157,17 @@
     against the URI with its scheme stripped as well, and the schemes
     argument, q.v., is then subsequently consulted.
   username;;
-    Username to authenticate with.
+    Optional. Username to authenticate with. If not given, and the
+    remote site requires basic or digest authentication, the user
+    will be prompted for it.
   password;;
-    Optional. Password to authenticate with. If not given the user
+    Optional. Password to authenticate with. If not given, and the
+    remote site requires basic or digest authentication, the user
     will be prompted for it.
+  key;;
+    Optional. PEM encoded client certificate key file.
+  cert;;
+    Optional. PEM encoded client certificate chain file.
   schemes;;
     Optional. Space separated list of URI schemes to use this
     authentication entry with. Only used if the prefix doesn't include
--- a/hgext/acl.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/acl.py	Sun Jun 21 20:09:03 2009 +0200
@@ -5,49 +5,49 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2, incorporated herein by reference.
 #
-# this hook allows to allow or deny access to parts of a repo when
-# taking incoming changesets.
-#
-# authorization is against local user name on system where hook is
-# run, not committer of original changeset (since that is easy to
-# spoof).
-#
-# acl hook is best to use if you use hgsh to set up restricted shells
-# for authenticated users to only push to / pull from.  not safe if
-# user has interactive shell access, because they can disable hook.
-# also not safe if remote users share one local account, because then
-# no way to tell remote users apart.
-#
-# to use, configure acl extension in hgrc like this:
-#
-#   [extensions]
-#   hgext.acl =
-#
-#   [hooks]
-#   pretxnchangegroup.acl = python:hgext.acl.hook
-#
-#   [acl]
-#   sources = serve        # check if source of incoming changes in this list
-#                          # ("serve" == ssh or http, "push", "pull", "bundle")
-#
-# allow and deny lists have subtree pattern (default syntax is glob)
-# on left, user names on right. deny list checked before allow list.
-#
-#   [acl.allow]
-#   # if acl.allow not present, all users allowed by default
-#   # empty acl.allow = no users allowed
-#   docs/** = doc_writer
-#   .hgtags = release_engineer
-#
-#   [acl.deny]
-#   # if acl.deny not present, no users denied by default
-#   # empty acl.deny = all users allowed
-#   glob pattern = user4, user5
-#   ** = user6
+
+'''provide simple hooks for access control
+
+Authorization is against local user name on system where hook is run, not
+committer of original changeset (since that is easy to spoof).
+
+The acl hook is best to use if you use hgsh to set up restricted shells for
+authenticated users to only push to / pull from. It's not safe if user has
+interactive shell access, because they can disable the hook. It's also not
+safe if remote users share one local account, because then there's no way to
+tell remote users apart.
+
+To use, configure the acl extension in hgrc like this:
+
+  [extensions]
+  hgext.acl =
+
+  [hooks]
+  pretxnchangegroup.acl = python:hgext.acl.hook
+
+  [acl]
+  sources = serve        # check if source of incoming changes in this list
+                         # ("serve" == ssh or http, "push", "pull", "bundle")
+
+Allow and deny lists have a subtree pattern (default syntax is glob) on the
+left and user names on right. The deny list is checked before the allow list.
+
+  [acl.allow]
+  # if acl.allow not present, all users allowed by default
+  # empty acl.allow = no users allowed
+  docs/** = doc_writer
+  .hgtags = release_engineer
+
+  [acl.deny]
+  # if acl.deny not present, no users denied by default
+  # empty acl.deny = all users allowed
+  glob pattern = user4, user5
+   ** = user6
+'''
 
 from mercurial.i18n import _
 from mercurial import util, match
-import getpass
+import getpass, urllib
 
 def buildmatch(ui, repo, user, key):
     '''return tuple of (match function, list enabled).'''
@@ -72,7 +72,15 @@
         ui.debug(_('acl: changes have source "%s" - skipping\n') % source)
         return
 
-    user = getpass.getuser()
+    user = None
+    if source == 'serve' and 'url' in kwargs:
+        url = kwargs['url'].split(':')
+        if url[0] == 'remote' and url[1].startswith('http'):
+            user = urllib.unquote(url[2])
+
+    if user is None:
+        user = getpass.getuser()
+
     cfg = ui.config('acl', 'config')
     if cfg:
         ui.readconfig(cfg, sections = ['acl.allow', 'acl.deny'])
--- a/hgext/bookmarks.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/bookmarks.py	Sun Jun 21 20:09:03 2009 +0200
@@ -64,10 +64,14 @@
         util.copyfile(repo.join('bookmarks'), repo.join('undo.bookmarks'))
     if current(repo) not in refs:
         setcurrent(repo, None)
-    file = repo.opener('bookmarks', 'w+')
-    for refspec, node in refs.iteritems():
-        file.write("%s %s\n" % (hex(node), refspec))
-    file.close()
+    wlock = repo.wlock()
+    try:
+        file = repo.opener('bookmarks', 'w', atomictemp=True)
+        for refspec, node in refs.iteritems():
+            file.write("%s %s\n" % (hex(node), refspec))
+        file.rename()
+    finally:
+        wlock.release()
 
 def current(repo):
     '''Get the current bookmark
@@ -106,9 +110,13 @@
         return
     if mark not in refs:
         mark = ''
-    file = repo.opener('bookmarks.current', 'w+')
-    file.write(mark)
-    file.close()
+    wlock = repo.wlock()
+    try:
+        file = repo.opener('bookmarks.current', 'w', atomictemp=True)
+        file.write(mark)
+        file.rename()
+    finally:
+        wlock.release()
     repo._bookmarkcurrent = mark
 
 def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False, rename=None):
@@ -242,26 +250,30 @@
         def commit(self, *k, **kw):
             """Add a revision to the repository and
             move the bookmark"""
-            node  = super(bookmark_repo, self).commit(*k, **kw)
-            if node is None:
-                return None
-            parents = repo.changelog.parents(node)
-            if parents[1] == nullid:
-                parents = (parents[0],)
-            marks = parse(repo)
-            update = False
-            for mark, n in marks.items():
-                if ui.configbool('bookmarks', 'track.current'):
-                    if mark == current(repo) and n in parents:
-                        marks[mark] = node
-                        update = True
-                else:
-                    if n in parents:
-                        marks[mark] = node
-                        update = True
-            if update:
-                write(repo, marks)
-            return node
+            wlock = self.wlock() # do both commit and bookmark with lock held
+            try:
+                node  = super(bookmark_repo, self).commit(*k, **kw)
+                if node is None:
+                    return None
+                parents = repo.changelog.parents(node)
+                if parents[1] == nullid:
+                    parents = (parents[0],)
+                marks = parse(repo)
+                update = False
+                for mark, n in marks.items():
+                    if ui.configbool('bookmarks', 'track.current'):
+                        if mark == current(repo) and n in parents:
+                            marks[mark] = node
+                            update = True
+                    else:
+                        if n in parents:
+                            marks[mark] = node
+                            update = True
+                if update:
+                    write(repo, marks)
+                return node
+            finally:
+                wlock.release()
 
         def addchangegroup(self, source, srctype, url, emptyok=False):
             parents = repo.dirstate.parents()
--- a/hgext/children.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/children.py	Sun Jun 21 20:09:03 2009 +0200
@@ -8,6 +8,8 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2, incorporated herein by reference.
 
+'''provides children command to show children changesets'''
+
 from mercurial import cmdutil
 from mercurial.commands import templateopts
 from mercurial.i18n import _
--- a/hgext/churn.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/churn.py	Sun Jun 21 20:09:03 2009 +0200
@@ -120,7 +120,7 @@
 
     It is possible to map alternate email addresses to a main address
     by providing a file using the following format:
-    
+
     <alias email> <actual email>
 
     Such a file may be specified with the --aliases option, otherwise a
--- a/hgext/color.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/color.py	Sun Jun 21 20:09:03 2009 +0200
@@ -29,10 +29,6 @@
 function (aka ANSI escape codes). This module also provides the
 render_text function, which can be used to add effects to any text.
 
-To enable this extension, add this to your .hgrc file:
-[extensions]
-color =
-
 Default effects may be overridden from the .hgrc file:
 
 [color]
--- a/hgext/convert/convcmd.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/convert/convcmd.py	Sun Jun 21 20:09:03 2009 +0200
@@ -80,7 +80,7 @@
         self.authorfile = None
 
         # Record converted revisions persistently: maps source revision
-        # ID to target revision ID (both strings).  (This is how 
+        # ID to target revision ID (both strings).  (This is how
         # incremental conversions work.)
         self.map = mapfile(ui, revmapfile)
 
@@ -297,7 +297,7 @@
             parents = [self.map.get(p, p) for p in parents]
         except KeyError:
             parents = [b[0] for b in pbranches]
-        newnode = self.dest.putcommit(files, copies, parents, commit, 
+        newnode = self.dest.putcommit(files, copies, parents, commit,
                                       self.source, self.map)
         self.source.converted(rev, newnode)
         self.map[rev] = newnode
--- a/hgext/convert/p4.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/convert/p4.py	Sun Jun 21 20:09:03 2009 +0200
@@ -159,7 +159,7 @@
 
             if code == "error":
                 raise IOError(d["generic"], data)
-            
+
             elif code == "stat":
                 p4type = self.re_type.match(d["type"])
                 if p4type:
@@ -173,7 +173,7 @@
                         keywords = self.re_keywords_old
                     elif "k" in flags:
                         keywords = self.re_keywords
-            
+
             elif code == "text" or code == "binary":
                 contents += data
 
--- a/hgext/convert/subversion.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/convert/subversion.py	Sun Jun 21 20:09:03 2009 +0200
@@ -472,7 +472,7 @@
                 # Here/tags/tag.1 discarded as well as its children.
                 # It happens with tools like cvs2svn. Such tags cannot
                 # be represented in mercurial.
-                addeds = dict((p, e.copyfrom_path) for p,e 
+                addeds = dict((p, e.copyfrom_path) for p, e
                               in origpaths.iteritems() if e.action == 'A')
                 badroots = set()
                 for destroot in addeds:
@@ -484,7 +484,7 @@
                         break
 
                 for badroot in badroots:
-                    pendings = [p for p in pendings if p[2] != badroot 
+                    pendings = [p for p in pendings if p[2] != badroot
                                 and not p[2].startswith(badroot + '/')]
 
                 # Tell tag renamings from tag creations
@@ -497,7 +497,7 @@
                     if tagname in tags:
                         # Keep the latest tag value
                         continue
-                    # From revision may be fake, get one with changes                    
+                    # From revision may be fake, get one with changes
                     try:
                         tagid = self.latest(source, sourcerev)
                         if tagid and tagname not in tags:
--- a/hgext/extdiff.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/extdiff.py	Sun Jun 21 20:09:03 2009 +0200
@@ -5,18 +5,14 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2, incorporated herein by reference.
 
-'''
+'''allow external programs to compare revisions
+
 The `extdiff' Mercurial extension allows you to use external programs
 to compare revisions, or revision with working directory. The external diff
 programs are called with a configurable set of options and two
 non-option arguments: paths to directories containing snapshots of
 files to compare.
 
-To enable this extension:
-
-  [extensions]
-  hgext.extdiff =
-
 The `extdiff' extension also allows to configure new diff commands, so
 you do not need to type "hg extdiff -p kdiff3" always.
 
--- a/hgext/gpg.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/gpg.py	Sun Jun 21 20:09:03 2009 +0200
@@ -1,10 +1,10 @@
-# GnuPG signing extension for Mercurial
-#
 # Copyright 2005, 2006 Benoit Boissinot <benoit.boissinot@ens-lyon.org>
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2, incorporated herein by reference.
 
+'''GnuPG signing extension for Mercurial'''
+
 import os, tempfile, binascii
 from mercurial import util, commands, match
 from mercurial import node as hgnode
--- a/hgext/graphlog.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/graphlog.py	Sun Jun 21 20:09:03 2009 +0200
@@ -12,59 +12,32 @@
 revision graph is also shown.
 '''
 
-import os
+import os, sys
 from mercurial.cmdutil import revrange, show_changeset
 from mercurial.commands import templateopts
 from mercurial.i18n import _
 from mercurial.node import nullrev
 from mercurial import bundlerepo, changegroup, cmdutil, commands, extensions
-from mercurial import hg, url, util
-
-def revisions(repo, start, stop):
-    """cset DAG generator yielding (rev, node, [parents]) tuples
+from mercurial import hg, url, util, graphmod
 
-    This generator function walks through the revision history from revision
-    start to revision stop (which must be less than or equal to start).
-    """
-    assert start >= stop
-    cur = start
-    while cur >= stop:
-        ctx = repo[cur]
-        parents = [p.rev() for p in ctx.parents() if p.rev() != nullrev]
-        parents.sort()
-        yield (ctx, parents)
-        cur -= 1
-
-def filerevs(repo, path, start, stop):
-    """file cset DAG generator yielding (rev, node, [parents]) tuples
+ASCIIDATA = 'ASC'
 
-    This generator function walks through the revision history of a single
-    file from revision start to revision stop (which must be less than or
-    equal to start).
-    """
-    assert start >= stop
-    filerev = len(repo.file(path)) - 1
-    while filerev >= 0:
-        fctx = repo.filectx(path, fileid=filerev)
-        parents = [f.linkrev() for f in fctx.parents() if f.path() == path]
-        parents.sort()
-        if fctx.rev() <= start:
-            yield (fctx, parents)
-        if fctx.rev() <= stop:
-            break
-        filerev -= 1
+def asciiformat(ui, repo, revdag, opts):
+    """formats a changelog DAG walk for ASCII output"""
+    showparents = [ctx.node() for ctx in repo[None].parents()]
+    displayer = show_changeset(ui, repo, opts, buffered=True)
+    for (id, type, ctx, parentids) in revdag:
+        if type != graphmod.CHANGESET:
+            continue
+        displayer.show(ctx)
+        lines = displayer.hunk.pop(ctx.rev()).split('\n')[:-1]
+        char = ctx.node() in showparents and '@' or 'o'
+        yield (id, ASCIIDATA, (char, lines), parentids)
 
-def grapher(nodes):
-    """grapher for asciigraph on a list of nodes and their parents
-
-    nodes must generate tuples (node, parents, char, lines) where
-     - parents must generate the parents of node, in sorted order,
-       and max length 2,
-     - char is the char to print as the node symbol, and
-     - lines are the lines to display next to the node.
-    """
+def asciiedges(nodes):
+    """adds edge info to changelog DAG walk suitable for ascii()"""
     seen = []
-    for node, parents, char, lines in nodes:
+    for node, type, data, parents in nodes:
         if node not in seen:
             seen.append(node)
         nodeidx = seen.index(node)
@@ -88,7 +61,7 @@
             edges.append((nodeidx, nodeidx + 1))
         nmorecols = len(nextseen) - ncols
         seen = nextseen
-        yield (char, lines, nodeidx, edges, ncols, nmorecols)
+        yield (nodeidx, type, data, edges, ncols, nmorecols)
 
 def fix_long_right_edges(edges):
     for (i, (start, end)) in enumerate(edges):
@@ -142,14 +115,16 @@
     line.extend(["|", " "] * (n_columns - ni - 1))
     return line
 
-def ascii(ui, grapher):
-    """prints an ASCII graph of the DAG returned by the grapher
+def ascii(ui, dag):
+    """prints an ASCII graph of the DAG
+
+    dag is a generator that emits tuples with the following elements:
 
-    grapher is a generator that emits tuples with the following elements:
-
-      - Character to use as node's symbol.
-      - List of lines to display as the node's text.
       - Column of the current node in the set of ongoing edges.
+      - Type indicator of node data == ASCIIDATA.
+      - Payload: (char, lines):
+        - Character to use as node's symbol.
+        - List of lines to display as the node's text.
       - Edges; a list of (col, next_col) indicating the edges between
         the current node and its parents.
       - Number of columns (ongoing edges) in the current revision.
@@ -160,7 +135,7 @@
     """
     prev_n_columns_diff = 0
     prev_node_index = 0
-    for (node_ch, node_lines, node_index, edges, n_columns, n_columns_diff) in grapher:
+    for (node_index, type, (node_ch, node_lines), edges, n_columns, n_columns_diff) in dag:
 
         assert -2 < n_columns_diff < 2
         if n_columns_diff == -1:
@@ -278,34 +253,19 @@
     if path:
         path = util.canonpath(repo.root, os.getcwd(), path)
     if path: # could be reset in canonpath
-        revdag = filerevs(repo, path, start, stop)
+        revdag = graphmod.filerevs(repo, path, start, stop)
     else:
-        revdag = revisions(repo, start, stop)
+        revdag = graphmod.revisions(repo, start, stop)
 
-    graphdag = graphabledag(ui, repo, revdag, opts)
-    ascii(ui, grapher(graphdag))
+    fmtdag = asciiformat(ui, repo, revdag, opts)
+    ascii(ui, asciiedges(fmtdag))
 
 def graphrevs(repo, nodes, opts):
-    include = set(nodes)
     limit = cmdutil.loglimit(opts)
-    count = 0
-    for node in reversed(nodes):
-        if count >= limit:
-            break
-        ctx = repo[node]
-        parents = [p.rev() for p in ctx.parents() if p.node() in include]
-        parents.sort()
-        yield (ctx, parents)
-        count += 1
-
-def graphabledag(ui, repo, revdag, opts):
-    showparents = [ctx.node() for ctx in repo[None].parents()]
-    displayer = show_changeset(ui, repo, opts, buffered=True)
-    for (ctx, parents) in revdag:
-        displayer.show(ctx)
-        lines = displayer.hunk.pop(ctx.rev()).split('\n')[:-1]
-        char = ctx.node() in showparents and '@' or 'o'
-        yield (ctx.rev(), parents, char, lines)
+    nodes.reverse()
+    if limit < sys.maxint:
+        nodes = nodes[:limit]
+    return graphmod.nodes(repo, nodes)
 
 def goutgoing(ui, repo, dest=None, **opts):
     """show the outgoing changesets alongside an ASCII revision graph
@@ -332,8 +292,8 @@
 
     o = repo.changelog.nodesbetween(o, revs)[0]
     revdag = graphrevs(repo, o, opts)
-    graphdag = graphabledag(ui, repo, revdag, opts)
-    ascii(ui, grapher(graphdag))
+    fmtdag = asciiformat(ui, repo, revdag, opts)
+    ascii(ui, asciiedges(fmtdag))
 
 def gincoming(ui, repo, source="default", **opts):
     """show the incoming changesets alongside an ASCII revision graph
@@ -381,8 +341,8 @@
 
         chlist = other.changelog.nodesbetween(incoming, revs)[0]
         revdag = graphrevs(other, chlist, opts)
-        graphdag = graphabledag(ui, repo, revdag, opts)
-        ascii(ui, grapher(graphdag))
+        fmtdag = asciiformat(ui, repo, revdag, opts)
+        ascii(ui, asciiedges(fmtdag))
 
     finally:
         if hasattr(other, 'close'):
--- a/hgext/hgk.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/hgk.py	Sun Jun 21 20:09:03 2009 +0200
@@ -14,20 +14,8 @@
 hgk consists of two parts: a Tcl script that does the displaying and
 querying of information, and an extension to Mercurial named hgk.py,
 which provides hooks for hgk to get information. hgk can be found in
-the contrib directory, and hgk.py can be found in the hgext directory.
-
-To load the hgext.py extension, add it to your .hgrc file (you have to
-use your global $HOME/.hgrc file, not one in a repository). You can
-specify an absolute path:
-
-  [extensions]
-  hgk=/usr/local/lib/hgk.py
-
-Mercurial can also scan the default python library path for a file
-named 'hgk.py' if you set hgk empty:
-
-  [extensions]
-  hgk=
+the contrib directory, and the extension is shipped in the hgext
+repository, and needs to be enabled.
 
 The hg view command will launch the hgk Tcl script. For this command
 to work, hgk must be in your search path. Alternately, you can specify
--- a/hgext/highlight/__init__.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/highlight/__init__.py	Sun Jun 21 20:09:03 2009 +0200
@@ -13,11 +13,6 @@
 It depends on the Pygments syntax highlighting library:
 http://pygments.org/
 
-To enable the extension add this to hgrc:
-
-[extensions]
-hgext.highlight =
-
 There is a single configuration option:
 
 [web]
@@ -30,10 +25,10 @@
 
 import highlight
 from mercurial.hgweb import webcommands, webutil, common
-from mercurial import extensions
+from mercurial import extensions, encoding
 
 def filerevision_highlight(orig, web, tmpl, fctx):
-    mt = ''.join(tmpl('mimetype', encoding=web.encoding))
+    mt = ''.join(tmpl('mimetype', encoding=encoding.encoding))
     # only pygmentize for mimetype containing 'html' so we both match
     # 'text/html' and possibly 'application/xhtml+xml' in the future
     # so that we don't have to touch the extension when the mimetype
@@ -47,7 +42,7 @@
     return orig(web, tmpl, fctx)
 
 def annotate_highlight(orig, web, req, tmpl):
-    mt = ''.join(tmpl('mimetype', encoding=web.encoding))
+    mt = ''.join(tmpl('mimetype', encoding=encoding.encoding))
     if 'html' in mt:
         fctx = webutil.filectx(web.repo, req)
         style = web.config('web', 'pygments_style', 'colorful')
--- a/hgext/interhg.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/interhg.py	Sun Jun 21 20:09:03 2009 +0200
@@ -14,12 +14,8 @@
 which will be automatically expanded into links or any other
 arbitrary expression, much like InterWiki does.
 
-To enable this extension, add the following lines to your hgrc:
-
-  [extensions]
-  interhg =
-
-A few example patterns (link to bug tracking, etc.):
+A few example patterns (link to bug tracking, etc.) that may
+be used in your hgrc:
 
   [interhg]
   issues = s!issue(\\d+)!<a href="http://bts/issue\\1">issue\\1</a>!
--- a/hgext/keyword.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/keyword.py	Sun Jun 21 20:09:03 2009 +0200
@@ -21,12 +21,6 @@
 #
 # Binary files are not touched.
 #
-# Setup in hgrc:
-#
-#   [extensions]
-#   # enable extension
-#   hgext.keyword =
-#
 # Files to act upon/ignore are specified in the [keyword] section.
 # Customized keyword template mappings in the [keywordmaps] section.
 #
--- a/hgext/mq.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/mq.py	Sun Jun 21 20:09:03 2009 +0200
@@ -543,6 +543,8 @@
 
     def _apply(self, repo, series, list=False, update_status=True,
                strict=False, patchdir=None, merge=None, all_files={}):
+        '''returns (error, hash)
+        error = 1 for unable to read, 2 for patch failed, 3 for patch fuzz'''
         # TODO unify with commands.py
         if not patchdir:
             patchdir = self.path
@@ -559,7 +561,7 @@
             try:
                 ph = patchheader(self.join(patchname))
             except:
-                self.ui.warn(_("Unable to read %s\n") % patchname)
+                self.ui.warn(_("unable to read %s\n") % patchname)
                 err = 1
                 break
 
@@ -607,46 +609,60 @@
 
             if patcherr:
                 self.ui.warn(_("patch failed, rejects left in working dir\n"))
-                err = 1
+                err = 2
                 break
 
             if fuzz and strict:
                 self.ui.warn(_("fuzz found when applying patch, stopping\n"))
-                err = 1
+                err = 3
                 break
         return (err, n)
 
-    def _clean_series(self, patches):
+    def _cleanup(self, patches, numrevs, keep=False):
+        if not keep:
+            r = self.qrepo()
+            if r:
+                r.remove(patches, True)
+            else:
+                for p in patches:
+                    os.unlink(self.join(p))
+
+        if numrevs:
+            del self.applied[:numrevs]
+            self.applied_dirty = 1
+
         for i in sorted([self.find_series(p) for p in patches], reverse=True):
             del self.full_series[i]
         self.parse_series()
         self.series_dirty = 1
 
-    def finish(self, repo, revs):
+    def _revpatches(self, repo, revs):
         firstrev = repo[self.applied[0].rev].rev()
-        appliedbase = 0
         patches = []
-        for rev in sorted(revs):
+        for i, rev in enumerate(revs):
+
             if rev < firstrev:
                 raise util.Abort(_('revision %d is not managed') % rev)
-            base = bin(self.applied[appliedbase].rev)
-            node = repo.changelog.node(rev)
-            if node != base:
-                raise util.Abort(_('cannot delete revision %d above '
-                                   'applied patches') % rev)
-            patches.append(self.applied[appliedbase].name)
-            appliedbase += 1
+
+            ctx = repo[rev]
+            base = bin(self.applied[i].rev)
+            if ctx.node() != base:
+                msg = _('cannot delete revision %d above applied patches')
+                raise util.Abort(msg % rev)
 
-        r = self.qrepo()
-        if r:
-            r.remove(patches, True)
-        else:
-            for p in patches:
-                os.unlink(self.join(p))
+            patch = self.applied[i].name
+            for fmt in ('[mq]: %s', 'imported patch %s'):
+                if ctx.description() == fmt % patch:
+                    msg = _('patch %s finalized without changeset message\n')
+                    repo.ui.status(msg % patch)
+                    break
 
-        del self.applied[:appliedbase]
-        self.applied_dirty = 1
-        self._clean_series(patches)
+            patches.append(patch)
+        return patches
+
+    def finish(self, repo, revs):
+        patches = self._revpatches(repo, sorted(revs))
+        self._cleanup(patches, len(patches))
 
     def delete(self, repo, patches, opts):
         if not patches and not opts.get('rev'):
@@ -663,37 +679,18 @@
                 raise util.Abort(_("patch %s not in series file") % patch)
             realpatches.append(patch)
 
-        appliedbase = 0
+        numrevs = 0
         if opts.get('rev'):
             if not self.applied:
                 raise util.Abort(_('no patches applied'))
             revs = cmdutil.revrange(repo, opts['rev'])
             if len(revs) > 1 and revs[0] > revs[1]:
                 revs.reverse()
-            for rev in revs:
-                if appliedbase >= len(self.applied):
-                    raise util.Abort(_("revision %d is not managed") % rev)
-
-                base = bin(self.applied[appliedbase].rev)
-                node = repo.changelog.node(rev)
-                if node != base:
-                    raise util.Abort(_("cannot delete revision %d above "
-                                       "applied patches") % rev)
-                realpatches.append(self.applied[appliedbase].name)
-                appliedbase += 1
+            revpatches = self._revpatches(repo, revs)
+            realpatches += revpatches
+            numrevs = len(revpatches)
 
-        if not opts.get('keep'):
-            r = self.qrepo()
-            if r:
-                r.remove(realpatches, True)
-            else:
-                for p in realpatches:
-                    os.unlink(self.join(p))
-
-        if appliedbase:
-            del self.applied[:appliedbase]
-            self.applied_dirty = 1
-        self._clean_series(realpatches)
+        self._cleanup(realpatches, numrevs, opts.get('keep'))
 
     def check_toppatch(self, repo):
         if len(self.applied) > 0:
@@ -958,6 +955,7 @@
                 end = start + 1
             else:
                 end = self.series.index(patch, start) + 1
+
             s = self.series[start:end]
             all_files = {}
             try:
@@ -977,13 +975,15 @@
                         util.unlink(repo.wjoin(f))
                 self.ui.warn(_('done\n'))
                 raise
+
             top = self.applied[-1].name
-            if ret[0]:
-                self.ui.write(_("errors during apply, please fix and "
-                                "refresh %s\n") % top)
+            if ret[0] and ret[0] > 1:
+                msg = _("errors during apply, please fix and refresh %s\n")
+                self.ui.write(msg % top)
             else:
                 self.ui.write(_("now at: %s\n") % top)
             return ret[0]
+
         finally:
             wlock.release()
 
--- a/hgext/parentrevspec.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/parentrevspec.py	Sun Jun 21 20:09:03 2009 +0200
@@ -5,8 +5,7 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2, incorporated herein by reference.
 
-'''\
-use suffixes to refer to ancestor revisions
+'''use suffixes to refer to ancestor revisions
 
 This extension allows you to use git-style suffixes to refer to the
 ancestors of a specific revision.
--- a/hgext/patchbomb.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/patchbomb.py	Sun Jun 21 20:09:03 2009 +0200
@@ -28,11 +28,6 @@
 with a diffstat summary and the changeset summary, so you can be sure
 you are sending the right changes.
 
-To enable this extension:
-
-  [extensions]
-  hgext.patchbomb =
-
 To configure other defaults, add a section like this to your hgrc
 file:
 
--- a/hgext/purge.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/purge.py	Sun Jun 21 20:09:03 2009 +0200
@@ -6,10 +6,6 @@
 # This program was inspired by the "cvspurge" script contained in CVS utilities
 # (http://www.red-bean.com/cvsutils/).
 #
-# To enable the "purge" extension put these lines in your ~/.hgrc:
-#  [extensions]
-#  hgext.purge =
-#
 # For help on the usage of "hg purge" use:
 #  hg help purge
 #
@@ -27,6 +23,8 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
+'''enable removing untracked files only'''
+
 from mercurial import util, commands, cmdutil
 from mercurial.i18n import _
 import os, stat
--- a/hgext/share.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/share.py	Sun Jun 21 20:09:03 2009 +0200
@@ -1,10 +1,10 @@
-# Mercurial extension to provide the 'hg share' command
-#
 # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com>
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2, incorporated herein by reference.
 
+'''provides the hg share command'''
+
 import os
 from mercurial.i18n import _
 from mercurial import hg, commands
--- a/hgext/win32mbcs.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/win32mbcs.py	Sun Jun 21 20:09:03 2009 +0200
@@ -33,11 +33,6 @@
  * You should set same encoding for the repository by locale or
    HGENCODING.
 
-To use this extension, enable the extension in .hg/hgrc or ~/.hgrc:
-
-  [extensions]
-  hgext.win32mbcs =
-
 Path encoding conversion are done between Unicode and
 encoding.encoding which is decided by Mercurial from current locale
 setting or HGENCODING.
--- a/hgext/win32text.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/win32text.py	Sun Jun 21 20:09:03 2009 +0200
@@ -4,31 +4,34 @@
 #
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2, incorporated herein by reference.
-#
-# To perform automatic newline conversion, use:
-#
-# [extensions]
-# hgext.win32text =
-# [encode]
-# ** = cleverencode:
-# # or ** = macencode:
-# [decode]
-# ** = cleverdecode:
-# # or ** = macdecode:
-#
-# If not doing conversion, to make sure you do not commit CRLF/CR by
-# accident:
-#
-# [hooks]
-# pretxncommit.crlf = python:hgext.win32text.forbidcrlf
-# # or pretxncommit.cr = python:hgext.win32text.forbidcr
-#
-# To do the same check on a server to prevent CRLF/CR from being
-# pushed or pulled:
-#
-# [hooks]
-# pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
-# # or pretxnchangegroup.cr = python:hgext.win32text.forbidcr
+
+'''LF <-> CRLF/CR translation utilities
+
+To perform automatic newline conversion, use:
+
+[extensions]
+hgext.win32text =
+[encode]
+** = cleverencode:
+# or ** = macencode:
+
+[decode]
+** = cleverdecode:
+# or ** = macdecode:
+
+If not doing conversion, to make sure you do not commit CRLF/CR by accident:
+
+[hooks]
+pretxncommit.crlf = python:hgext.win32text.forbidcrlf
+# or pretxncommit.cr = python:hgext.win32text.forbidcr
+
+To do the same check on a server to prevent CRLF/CR from being
+pushed or pulled:
+
+[hooks]
+pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf
+# or pretxnchangegroup.cr = python:hgext.win32text.forbidcr
+'''
 
 from mercurial.i18n import _
 from mercurial.node import short
--- a/hgext/zeroconf/__init__.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/hgext/zeroconf/__init__.py	Sun Jun 21 20:09:03 2009 +0200
@@ -11,12 +11,6 @@
 the need to configure a server or a service. They can be discovered
 without knowing their actual IP address.
 
-To use the zeroconf extension add the following entry to your hgrc
-file:
-
-[extensions]
-hgext.zeroconf =
-
 To allow other people to discover your repository using run "hg serve"
 in your repository.
 
--- a/i18n/da.po	Sun Jan 25 17:35:38 2009 +0200
+++ b/i18n/da.po	Sun Jun 21 20:09:03 2009 +0200
@@ -17,9 +17,9 @@
 msgstr ""
 "Project-Id-Version: Mercurial\n"
 "Report-Msgid-Bugs-To: <mercurial-devel@selenic.com>\n"
-"POT-Creation-Date: 2009-05-31 19:37+0200\n"
-"PO-Revision-Date: 2009-05-31 19:47+0200\n"
-"Last-Translator:  <mg@daimi.au.dk>\n"
+"POT-Creation-Date: 2009-06-21 19:16+0200\n"
+"PO-Revision-Date: 2009-06-21 19:26+0200\n"
+"Last-Translator:  <mg@lazybytes.net>\n"
 "Language-Team: Danish\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
@@ -48,6 +48,49 @@
 "    aliaser %s:\n"
 "\n"
 
+msgid ""
+"provide simple hooks for access control\n"
+"\n"
+"Authorization is against local user name on system where hook is run, not\n"
+"committer of original changeset (since that is easy to spoof).\n"
+"\n"
+"The acl hook is best to use if you use hgsh to set up restricted shells for\n"
+"authenticated users to only push to / pull from. It's not safe if user has\n"
+"interactive shell access, because they can disable the hook. It's also not\n"
+"safe if remote users share one local account, because then there's no way "
+"to\n"
+"tell remote users apart.\n"
+"\n"
+"To use, configure the acl extension in hgrc like this:\n"
+"\n"
+"  [extensions]\n"
+"  hgext.acl =\n"
+"\n"
+"  [hooks]\n"
+"  pretxnchangegroup.acl = python:hgext.acl.hook\n"
+"\n"
+"  [acl]\n"
+"  sources = serve        # check if source of incoming changes in this list\n"
+"                         # (\"serve\" == ssh or http, \"push\", \"pull\", "
+"\"bundle\")\n"
+"\n"
+"Allow and deny lists have a subtree pattern (default syntax is glob) on the\n"
+"left and user names on right. The deny list is checked before the allow "
+"list.\n"
+"\n"
+"  [acl.allow]\n"
+"  # if acl.allow not present, all users allowed by default\n"
+"  # empty acl.allow = no users allowed\n"
+"  docs/** = doc_writer\n"
+"  .hgtags = release_engineer\n"
+"\n"
+"  [acl.deny]\n"
+"  # if acl.deny not present, no users denied by default\n"
+"  # empty acl.deny = all users allowed\n"
+"  glob pattern = user4, user5\n"
+"   ** = user6\n"
+msgstr ""
+
 #, python-format
 msgid "acl: %s not enabled\n"
 msgstr "acl: %s er ikke slået til\n"
@@ -82,7 +125,7 @@
 msgstr "acl: tillader ændring %s\n"
 
 msgid ""
-"mercurial bookmarks\n"
+"Mercurial bookmarks\n"
 "\n"
 "Mercurial bookmarks are local moveable pointers to changesets. Every\n"
 "bookmark points to a changeset identified by its hash. If you commit a\n"
@@ -99,22 +142,22 @@
 "track.current = True\n"
 "\n"
 "This will cause bookmarks to track the bookmark that you are currently\n"
-"on, and just updates it. This is similar to git's approach of\n"
+"on, and just updates it. This is similar to git's approach to\n"
 "branching.\n"
 msgstr ""
 
 msgid ""
-"mercurial bookmarks\n"
+"Mercurial bookmarks\n"
 "\n"
 "    Bookmarks are pointers to certain commits that move when\n"
 "    commiting. Bookmarks are local. They can be renamed, copied and\n"
 "    deleted. It is possible to use bookmark names in 'hg merge' and\n"
-"    'hg update' to update to a given bookmark.\n"
-"\n"
-"    You can use 'hg bookmark NAME' to set a bookmark on the current\n"
-"    tip with the given name. If you specify a revision using -r REV\n"
-"    (where REV may be an existing bookmark), the bookmark is set to\n"
-"    that revision.\n"
+"    'hg update' to merge and update respectively to a given bookmark.\n"
+"\n"
+"    You can use 'hg bookmark NAME' to set a bookmark on the working\n"
+"    directory's parent revision with the given name. If you specify\n"
+"    a revision using -r REV (where REV may be an existing bookmark),\n"
+"    the bookmark is assigned to that revision.\n"
 "    "
 msgstr ""
 
@@ -336,6 +379,9 @@
 msgid "database error: %s"
 msgstr "databasefejl: %s"
 
+msgid "provides children command to show children changesets"
+msgstr ""
+
 msgid ""
 "show the children of the given or working directory revision\n"
 "\n"
@@ -373,13 +419,17 @@
 msgstr "genererer statistik: %d%%"
 
 msgid ""
-"graph count of revisions grouped by template\n"
-"\n"
-"    Will graph count of changed lines or revisions grouped by template\n"
-"    or alternatively by date, if dateformat is used. In this case it\n"
-"    will override template.\n"
-"\n"
-"    By default statistics are counted for number of changed lines.\n"
+"histogram of changes to the repository\n"
+"\n"
+"    This command will display a histogram representing the number\n"
+"    of changed lines or revisions, grouped according to the given\n"
+"    template. The default template will group changes by author.\n"
+"    The --dateformat option may be used to group the results by\n"
+"    date instead.\n"
+"\n"
+"    Statistics are based on the number of changed lines, or\n"
+"    alternatively the number of matching revisions if the\n"
+"    --changesets option is specified.\n"
 "\n"
 "    Examples:\n"
 "\n"
@@ -395,22 +445,26 @@
 "      # display count of lines changed in every year\n"
 "      hg churn -f '%Y' -s\n"
 "\n"
-"    The map file format used to specify aliases is fairly simple:\n"
+"    It is possible to map alternate email addresses to a main address\n"
+"    by providing a file using the following format:\n"
 "\n"
 "    <alias email> <actual email>\n"
 "\n"
-"    By default .hgchurn in the working directory root will be used, if\n"
-"    it exists. Use the --aliases option to override this.\n"
+"    Such a file may be specified with the --aliases option, otherwise a\n"
+"    .hgchurn file will be looked for in the working directory root.\n"
 "    "
 msgstr ""
-"plot antallet af revisioner grupperet efter et mønster\n"
-"\n"
-"    Plotter antallet af ændrede linier eller antallet af revisioner\n"
-"    grupperet efter et mønster eller alternativt efter dato, hvis\n"
-"    dateformat bruges. I så tilfælde bruges mønstret ikke.\n"
-"\n"
-"    Som udgangspunkt laves der statistik over antallet af ændrede\n"
-"    linier.\n"
+"histogram over ændringer i depotet\n"
+"\n"
+"    Denne kommando vil vise et histogram som repræsenterer antallet af\n"
+"    ændrede linier eller revisioner, grupperet efter en given\n"
+"    skabelon. Standardskabelonen vil gruppere ændringer efter\n"
+"    forfatter. Med --dateformat tilvalget kan resultaterne i stedet\n"
+"    grupperes efter dato.\n"
+"\n"
+"    Statistikken er basseret på antallet af ændrede linier eller\n"
+"    alternativt på antallet af matchende revisioner, hvis --changesets\n"
+"    tilvalget er specificeret.\n"
 "\n"
 "    Eksempler:\n"
 "\n"
@@ -426,12 +480,13 @@
 "      # viser antallet af linier ændret hvert år\n"
 "      hg churn -f '%Y' -s\n"
 "\n"
-"    Formatet for map-filen er rimelig simpelt:\n"
+"    Det er muligt at afbilde alternative e-mail-adresser til\n"
+"    hoved-adresser ved at bruge en fil med følgende format:\n"
 "\n"
 "    <alias email> <faktisk email>\n"
 "\n"
-"    Som standard bruges .hgchurn i arbejdskatalogets rod, hvis denne\n"
-"    findes. Brug --aliases tilvalget for at ændre dette.\n"
+"    En sådan fil kan angivet med --aliases tilvalget. Som standard\n"
+"    bruges .hgchurn i arbejdskatalogets rod, hvis denne findes.\n"
 "    "
 
 #, python-format
@@ -479,11 +534,7 @@
 "function (aka ANSI escape codes). This module also provides the\n"
 "render_text function, which can be used to add effects to any text.\n"
 "\n"
-"To enable this extension, add this to your .hgrc file:\n"
-"[extensions]\n"
-"color =\n"
-"\n"
-"Default effects my be overridden from the .hgrc file:\n"
+"Default effects may be overridden from the .hgrc file:\n"
 "\n"
 "[color]\n"
 "status.modified = blue bold underline red_background\n"
@@ -547,6 +598,18 @@
 "    basename of the source with '-hg' appended. If the destination\n"
 "    repository doesn't exist, it will be created.\n"
 "\n"
+"    By default, all sources except Mercurial will use\n"
+"    --branchsort. Mercurial uses --sourcesort to preserve original\n"
+"    revision numbers order. Sort modes have the following effects:\n"
+"      --branchsort: convert from parent to child revision when\n"
+"        possible, which means branches are usually converted one after\n"
+"        the other. It generates more compact repositories.\n"
+"      --datesort: sort revisions by date. Converted repositories have\n"
+"        good-looking changelogs but are often an order of magnitude\n"
+"        larger than the same ones generated by --branchsort.\n"
+"      --sourcesort: try to preserve source revisions order, only\n"
+"        supported by Mercurial sources.\n"
+"\n"
 "    If <REVMAP> isn't given, it will be put in a default location\n"
 "    (<dest>/.hg/shamap by default). The <REVMAP> is a simple text file\n"
 "    that maps each source commit ID to the destination ID for that\n"
@@ -759,9 +822,15 @@
 msgid "change branch names while converting"
 msgstr "omdøb grene under konverteringen"
 
+msgid "try to sort changesets by branches"
+msgstr "forsøg at sortere ændringer efter gren"
+
 msgid "try to sort changesets by date"
 msgstr "forsøg at sortere ændringer efter dato"
 
+msgid "preserve source changesets order"
+msgstr "bevar kildeændringerne ordning"
+
 msgid "hg convert [OPTION]... SOURCE [DEST [REVMAP]]"
 msgstr ""
 
@@ -855,6 +924,10 @@
 msgstr "%s: ukendt arkivtype"
 
 #, python-format
+msgid "unknown sort mode: %s"
+msgstr "ukendt sortering: %s"
+
+#, python-format
 msgid "cycle detected between %s and %s"
 msgstr ""
 
@@ -898,6 +971,12 @@
 msgid "assuming destination %s\n"
 msgstr ""
 
+msgid "more than one sort mode specified"
+msgstr ""
+
+msgid "--sourcesort is not supported by this data source"
+msgstr ""
+
 msgid ""
 "warning: support for external cvsps is deprecated and will be removed in "
 "Mercurial 1.4\n"
@@ -1252,6 +1331,7 @@
 msgstr ""
 
 msgid ""
+"allow external programs to compare revisions\n"
 "\n"
 "The `extdiff' Mercurial extension allows you to use external programs\n"
 "to compare revisions, or revision with working directory. The external diff\n"
@@ -1259,11 +1339,6 @@
 "non-option arguments: paths to directories containing snapshots of\n"
 "files to compare.\n"
 "\n"
-"To enable this extension:\n"
-"\n"
-"  [extensions]\n"
-"  hgext.extdiff =\n"
-"\n"
 "The `extdiff' extension also allows to configure new diff commands, so\n"
 "you do not need to type \"hg extdiff -p kdiff3\" always.\n"
 "\n"
@@ -1295,7 +1370,7 @@
 
 #, python-format
 msgid "making snapshot of %d files from rev %s\n"
-msgstr ""
+msgstr "laver øjebliksbillede af %d filer fra rev %s\n"
 
 #, python-format
 msgid "making snapshot of %d files from working directory\n"
@@ -1436,6 +1511,9 @@
 msgid "hg fetch [SOURCE]"
 msgstr ""
 
+msgid "GnuPG signing extension for Mercurial"
+msgstr ""
+
 msgid "error while verifying signature"
 msgstr ""
 
@@ -1551,7 +1629,7 @@
 msgstr ""
 
 msgid "limit number of changes displayed"
-msgstr ""
+msgstr "begræns antaln viste ændringer"
 
 msgid "show patch"
 msgstr ""
@@ -1620,22 +1698,10 @@
 "distributed with Mercurial.)\n"
 "\n"
 "hgk consists of two parts: a Tcl script that does the displaying and\n"
-"querying of information, and an extension to mercurial named hgk.py,\n"
+"querying of information, and an extension to Mercurial named hgk.py,\n"
 "which provides hooks for hgk to get information. hgk can be found in\n"
-"the contrib directory, and hgk.py can be found in the hgext directory.\n"
-"\n"
-"To load the hgext.py extension, add it to your .hgrc file (you have to\n"
-"use your global $HOME/.hgrc file, not one in a repository). You can\n"
-"specify an absolute path:\n"
-"\n"
-"  [extensions]\n"
-"  hgk=/usr/local/lib/hgk.py\n"
-"\n"
-"Mercurial can also scan the default python library path for a file\n"
-"named 'hgk.py' if you set hgk empty:\n"
-"\n"
-"  [extensions]\n"
-"  hgk=\n"
+"the contrib directory, and the extension is shipped in the hgext\n"
+"repository, and needs to be enabled.\n"
 "\n"
 "The hg view command will launch the hgk Tcl script. For this command\n"
 "to work, hgk must be in your search path. Alternately, you can specify\n"
@@ -1741,11 +1807,6 @@
 "It depends on the Pygments syntax highlighting library:\n"
 "http://pygments.org/\n"
 "\n"
-"To enable the extension add this to hgrc:\n"
-"\n"
-"[extensions]\n"
-"hgext.highlight =\n"
-"\n"
 "There is a single configuration option:\n"
 "\n"
 "[web]\n"
@@ -1773,16 +1834,16 @@
 msgstr ""
 
 msgid "run server in background"
-msgstr ""
+msgstr "kører serveren i baggrunden"
 
 msgid "used internally by daemon mode"
-msgstr ""
+msgstr "brugt internt i daemon mode"
 
 msgid "minutes to sit idle before exiting"
 msgstr ""
 
 msgid "name of file to write process ID to"
-msgstr ""
+msgstr "navn på fil at skrive process ID til"
 
 msgid "hg inserve [OPT]..."
 msgstr ""
@@ -1808,6 +1869,9 @@
 msgid "failed to contact inotify server: %s\n"
 msgstr ""
 
+msgid "received empty answer from inotify server"
+msgstr ""
+
 #, python-format
 msgid "(inotify: received response from incompatible server version %d)\n"
 msgstr ""
@@ -1927,11 +1991,21 @@
 msgid "finished setup\n"
 msgstr ""
 
-msgid "polling: no timeout\n"
-msgstr ""
-
-#, python-format
-msgid "polling: %sms timeout\n"
+msgid ""
+"expand expressions into changelog and summaries\n"
+"\n"
+"This extension allows the use of a special syntax in summaries,\n"
+"which will be automatically expanded into links or any other\n"
+"arbitrary expression, much like InterWiki does.\n"
+"\n"
+"A few example patterns (link to bug tracking, etc.) that may\n"
+"be used in your hgrc:\n"
+"\n"
+"  [interhg]\n"
+"  issues = s!issue(\\d+)!<a href=\"http://bts/issue\\1\">issue\\1</a>!\n"
+"  bugzilla = s!((?:bug|b=|(?=#?\\d{4,}))(?:\\s*#?)(\\d+))!<a..=\\2\">\\1</a>!"
+"i\n"
+"  boldify = s!(^|\\s)#(\\d+)\\b! <b>#\\2</b>!\n"
 msgstr ""
 
 #, python-format
@@ -1943,7 +2017,7 @@
 msgstr ""
 
 msgid ""
-"keyword expansion in local repositories\n"
+"keyword expansion in tracked files\n"
 "\n"
 "This extension expands RCS/CVS-like or self-customized $Keywords$ in\n"
 "tracked text files selected by your configuration.\n"
@@ -2009,7 +2083,7 @@
 "print [keywordmaps] configuration and an expansion example\n"
 "\n"
 "    Show current, custom, or default keyword template maps and their\n"
-"    expansion.\n"
+"    expansions.\n"
 "\n"
 "    Extend current configuration by specifying maps as arguments and\n"
 "    optionally by reading from an additional hgrc file.\n"
@@ -2044,7 +2118,7 @@
 msgstr ""
 
 msgid ""
-"expand keywords in working directory\n"
+"expand keywords in the working directory\n"
 "\n"
 "    Run after (re)enabling keyword expansion.\n"
 "\n"
@@ -2062,7 +2136,7 @@
 msgstr ""
 
 msgid ""
-"revert expanded keywords in working directory\n"
+"revert expanded keywords in the working directory\n"
 "\n"
 "    Run before changing/disabling active keywords or if you experience\n"
 "    problems with \"hg import\" or \"hg merge\".\n"
@@ -2232,8 +2306,8 @@
 msgstr "anvender %s\n"
 
 #, python-format
-msgid "Unable to read %s\n"
-msgstr ""
+msgid "unable to read %s\n"
+msgstr "kan ikke læse %s\n"
 
 #, python-format
 msgid "imported patch %s\n"
@@ -2265,6 +2339,10 @@
 msgid "cannot delete revision %d above applied patches"
 msgstr "kan ikke slette revision %d ovenover anvendte rettelser"
 
+#, python-format
+msgid "patch %s finalized without changeset message\n"
+msgstr ""
+
 msgid "qdelete requires at least one revision or patch name"
 msgstr ""
 
@@ -2483,7 +2561,7 @@
 "    -r/--rev parameter. At least one patch or revision is required.\n"
 "\n"
 "    With --rev, mq will stop managing the named revisions (converting\n"
-"    them to regular mercurial changesets). The qfinish command should\n"
+"    them to regular Mercurial changesets). The qfinish command should\n"
 "    be used as an alternative for qdelete -r, as the latter option is\n"
 "    deprecated.\n"
 "\n"
@@ -2548,7 +2626,7 @@
 "    Source patch repository is looked for in <src>/.hg/patches by\n"
 "    default. Use -p <url> to change.\n"
 "\n"
-"    The patch directory must be a nested mercurial repository, as\n"
+"    The patch directory must be a nested Mercurial repository, as\n"
 "    would be created by qinit -c.\n"
 "    "
 msgstr ""
@@ -2894,7 +2972,7 @@
 msgstr ""
 
 msgid "use pull protocol to copy metadata"
-msgstr ""
+msgstr "brug træk-protokol til at kopiere metadata"
 
 msgid "do not update the new working directories"
 msgstr ""
@@ -2953,8 +3031,8 @@
 msgid "import file in patch directory"
 msgstr ""
 
-msgid "patch file name"
-msgstr "patch navn"
+msgid "name of patch file"
+msgstr "navn på rettelsesfil"
 
 msgid "overwrite existing files"
 msgstr ""
@@ -3294,11 +3372,6 @@
 "with a diffstat summary and the changeset summary, so you can be sure\n"
 "you are sending the right changes.\n"
 "\n"
-"To enable this extension:\n"
-"\n"
-"  [extensions]\n"
-"  hgext.patchbomb =\n"
-"\n"
 "To configure other defaults, add a section like this to your hgrc\n"
 "file:\n"
 "\n"
@@ -3439,10 +3512,10 @@
 msgstr ""
 
 msgid "send patches as attachments"
-msgstr ""
+msgstr "send lapper som vedhæftede filer"
 
 msgid "send patches as inline attachments"
-msgstr ""
+msgstr "send lapper som integreret tekst"
 
 msgid "email addresses of blind carbon copy recipients"
 msgstr ""
@@ -3451,7 +3524,7 @@
 msgstr ""
 
 msgid "add diffstat output to messages"
-msgstr ""
+msgstr "tilføj diffstat resultat til beskeder"
 
 msgid "use the given date as the sending date"
 msgstr ""
@@ -3486,7 +3559,7 @@
 msgid "send changes not in target as a binary bundle"
 msgstr ""
 
-msgid "file name of the bundle attachment"
+msgid "name of the bundle attachment file"
 msgstr ""
 
 msgid "a revision to send"
@@ -3504,6 +3577,9 @@
 msgid "hg email [OPTION]... [DEST]..."
 msgstr ""
 
+msgid "enable removing untracked files only"
+msgstr ""
+
 msgid ""
 "removes files not tracked by Mercurial\n"
 "\n"
@@ -3551,7 +3627,7 @@
 msgid "purge ignored files too"
 msgstr ""
 
-msgid "print the file names instead of deleting them"
+msgid "print filenames instead of deleting them"
 msgstr ""
 
 msgid "end filenames with NUL, for use with xargs (implies -p/--print)"
@@ -3740,14 +3816,14 @@
 msgstr ""
 
 msgid "this modifies a binary file (all or nothing)\n"
-msgstr ""
+msgstr "dette ændrer en binær fil (alt eller intet)\n"
 
 msgid "this is a binary file\n"
-msgstr ""
+msgstr "dette er en binær fil\n"
 
 #, python-format
 msgid "%d hunks, %d lines changed\n"
-msgstr ""
+msgstr "%d stumper, %d linjer ændret\n"
 
 msgid "[Ynsfdaq?]"
 msgstr ""
@@ -3801,14 +3877,14 @@
 msgstr ""
 
 msgid "user quit"
-msgstr ""
+msgstr "user quit"
 
 #, python-format
 msgid "examine changes to %s?"
 msgstr ""
 
 msgid " and "
-msgstr ""
+msgstr " og "
 
 #, python-format
 msgid "record this change to %r?"
@@ -3855,17 +3931,17 @@
 
 #, python-format
 msgid "backup %r as %r\n"
-msgstr ""
+msgstr "sikkerhedskopier %r som %r\n"
 
 msgid "applying patch\n"
-msgstr ""
+msgstr "tilføjer lap\n"
 
 msgid "patch failed to apply"
-msgstr ""
+msgstr "lap kunne ikke tilføjes"
 
 #, python-format
 msgid "restoring %r to %r\n"
-msgstr ""
+msgstr "gendanner %r som %r\n"
 
 msgid "hg record [OPTION]... [FILE]..."
 msgstr ""
@@ -3873,6 +3949,26 @@
 msgid "hg qrecord [OPTION]... PATCH [FILE]..."
 msgstr ""
 
+msgid "provides the hg share command"
+msgstr ""
+
+msgid ""
+"create a new shared repository (experimental)\n"
+"\n"
+"    Initialize a new repository and working directory that shares its\n"
+"    history with another repository.\n"
+"\n"
+"    NOTE: actions that change history such as rollback or moving the\n"
+"    source may confuse sharers.\n"
+"    "
+msgstr ""
+
+msgid "do not create a working copy"
+msgstr "opret ikke en arbejdskopi"
+
+msgid "[-U] SOURCE [DEST]"
+msgstr ""
+
 msgid ""
 "patch transplanting tool\n"
 "\n"
@@ -4044,13 +4140,8 @@
 " * You should set same encoding for the repository by locale or\n"
 "   HGENCODING.\n"
 "\n"
-"To use this extension, enable the extension in .hg/hgrc or ~/.hgrc:\n"
-"\n"
-"  [extensions]\n"
-"  hgext.win32mbcs =\n"
-"\n"
 "Path encoding conversion are done between Unicode and\n"
-"encoding.encoding which is decided by mercurial from current locale\n"
+"encoding.encoding which is decided by Mercurial from current locale\n"
 "setting or HGENCODING.\n"
 "\n"
 msgstr ""
@@ -4066,6 +4157,36 @@
 msgid "[win32mbcs] activated with encoding: %s\n"
 msgstr ""
 
+msgid ""
+"LF <-> CRLF/CR translation utilities\n"
+"\n"
+"To perform automatic newline conversion, use:\n"
+"\n"
+"[extensions]\n"
+"hgext.win32text =\n"
+"[encode]\n"
+"** = cleverencode:\n"
+"# or ** = macencode:\n"
+"\n"
+"[decode]\n"
+"** = cleverdecode:\n"
+"# or ** = macdecode:\n"
+"\n"
+"If not doing conversion, to make sure you do not commit CRLF/CR by "
+"accident:\n"
+"\n"
+"[hooks]\n"
+"pretxncommit.crlf = python:hgext.win32text.forbidcrlf\n"
+"# or pretxncommit.cr = python:hgext.win32text.forbidcr\n"
+"\n"
+"To do the same check on a server to prevent CRLF/CR from being\n"
+"pushed or pulled:\n"
+"\n"
+"[hooks]\n"
+"pretxnchangegroup.crlf = python:hgext.win32text.forbidcrlf\n"
+"# or pretxnchangegroup.cr = python:hgext.win32text.forbidcr\n"
+msgstr ""
+
 #, python-format
 msgid ""
 "WARNING: %s already has %s line endings\n"
@@ -4102,18 +4223,12 @@
 msgstr ""
 
 msgid ""
-"zeroconf support for mercurial repositories\n"
+"zeroconf support for Mercurial repositories\n"
 "\n"
 "Zeroconf enabled repositories will be announced in a network without\n"
 "the need to configure a server or a service. They can be discovered\n"
 "without knowing their actual IP address.\n"
 "\n"
-"To use the zeroconf extension add the following entry to your hgrc\n"
-"file:\n"
-"\n"
-"[extensions]\n"
-"hgext.zeroconf =\n"
-"\n"
 "To allow other people to discover your repository using run \"hg serve\"\n"
 "in your repository.\n"
 "\n"
@@ -4189,7 +4304,7 @@
 msgstr "der er specificeret for mange revisioner"
 
 #, python-format
-msgid "invalid format spec '%%%s' in output file name"
+msgid "invalid format spec '%%%s' in output filename"
 msgstr ""
 
 #, python-format
@@ -4341,23 +4456,7 @@
 msgid "%s:%s copy source revision cannot be found!\n"
 msgstr ""
 
-msgid "can only follow copies/renames for explicit file names"
-msgstr ""
-
-#, python-format
-msgid "file %s not found!"
-msgstr "filen %s blev ikke fundet!"
-
-#, python-format
-msgid "no match under directory %s!"
-msgstr ""
-
-#, python-format
-msgid "can't commit %s: unsupported file type!"
-msgstr ""
-
-#, python-format
-msgid "file %s not tracked!"
+msgid "can only follow copies/renames for explicit filenames"
 msgstr ""
 
 msgid "HG: Enter commit message.  Lines beginning with 'HG:' are removed."
@@ -4445,33 +4544,35 @@
 msgstr ""
 
 msgid ""
-"show changeset information per file line\n"
+"show changeset information by line for each file\n"
 "\n"
 "    List changes in files, showing the revision id responsible for\n"
 "    each line\n"
 "\n"
-"    This command is useful to discover who did a change or when a\n"
-"    change took place.\n"
+"    This command is useful for discovering when a change was made and\n"
+"    by whom.\n"
 "\n"
 "    Without the -a/--text option, annotate will avoid processing files\n"
-"    it detects as binary. With -a, annotate will generate an\n"
-"    annotation anyway, probably with undesirable results.\n"
+"    it detects as binary. With -a, annotate will annotate the file\n"
+"    anyway, although the results will probably be neither useful\n"
+"    nor desirable.\n"
 "    "
 msgstr ""
-"vis information om ændringer pr linie\n"
+"vis information om ændringer pr linie for hver fil\n"
 "\n"
 "    Vis ændringer i filer ved at vise revisions ID'et som er\n"
 "    ansvarligt for hver linie\n"
 "\n"
-"    Denne kommando er nyttig til at opdage hvem der lavede en ændring\n"
-"    og hvornår en ændring blev foretaget.\n"
+"    Denne kommando er nyttig til at opdage hvornår en ændring blev\n"
+"    foretaget og af hvem.\n"
 "\n"
 "    Uden -a/--text tilvalget vil annotate undgå at behandle filer som\n"
 "    den detekterer som binære. Med -a vil annotate generere en\n"
-"    annotering alligevel, sandsynligvis med et uønsket resultat.\n"
+"    annotering alligevel, selvom resultatet sandsynligvis vil være\n"
+"    hverken brugbart eller ønskværdigt.\n"
 "    "
 
-msgid "at least one file name or pattern required"
+msgid "at least one filename or pattern is required"
 msgstr ""
 
 msgid "at least one of -n/-c is required for -l"
@@ -4482,7 +4583,7 @@
 msgstr ""
 
 msgid ""
-"create unversioned archive of a repository revision\n"
+"create an unversioned archive of a repository revision\n"
 "\n"
 "    By default, the revision used is the parent of the working\n"
 "    directory; use -r/--rev to specify a different revision.\n"
@@ -4522,9 +4623,9 @@
 "    Commit the backed out changes as a new changeset. The new\n"
 "    changeset is a child of the backed out changeset.\n"
 "\n"
-"    If you back out a changeset other than the tip, a new head is\n"
+"    If you backout a changeset other than the tip, a new head is\n"
 "    created. This head will be the new tip and you should merge this\n"
-"    backout changeset with another head (current one by default).\n"
+"    backout changeset with another head.\n"
 "\n"
 "    The --merge option remembers the parent of the working directory\n"
 "    before starting the backout, then merges the new head with that\n"
@@ -4559,14 +4660,14 @@
 msgid "please specify a revision to backout"
 msgstr ""
 
-msgid "cannot back out change on a different branch"
-msgstr "kan ikke bakke en ændring på en anden gren ud"
-
-msgid "cannot back out a change with no parents"
-msgstr "kan ikke bakke en ændring ud uden forældre"
-
-msgid "cannot back out a merge changeset without --parent"
-msgstr ""
+msgid "cannot backout change on a different branch"
+msgstr "kan ikke omgøre en ændring på en anden gren"
+
+msgid "cannot backout a change with no parents"
+msgstr "kan ikke omgøre en ændring uden forældre"
+
+msgid "cannot backout a merge changeset without --parent"
+msgstr "kan ikke omgøre en sammenføjning uden --parent"
 
 #, python-format
 msgid "%s is not a parent of %s"
@@ -4601,18 +4702,18 @@
 "    bad, then mark the latest changeset which is free from the problem\n"
 "    as good. Bisect will update your working directory to a revision\n"
 "    for testing (unless the -U/--noupdate option is specified). Once\n"
-"    you have performed tests, mark the working directory as bad or\n"
-"    good and bisect will either update to another candidate changeset\n"
+"    you have performed tests, mark the working directory as good or\n"
+"    bad, and bisect will either update to another candidate changeset\n"
 "    or announce that it has found the bad revision.\n"
 "\n"
 "    As a shortcut, you can also use the revision argument to mark a\n"
 "    revision as good or bad without checking it out first.\n"
 "\n"
-"    If you supply a command it will be used for automatic bisection.\n"
-"    Its exit status will be used as flag to mark revision as bad or\n"
-"    good. In case exit status is 0 the revision is marked as good, 125\n"
-"    - skipped, 127 (command not found) - bisection will be aborted;\n"
-"    any other status bigger than 0 will mark revision as bad.\n"
+"    If you supply a command, it will be used for automatic bisection.\n"
+"    Its exit status will be used to mark revisions as good or bad:\n"
+"    status 0 means good, 125 means to skip the revision, 127\n"
+"    (command not found) will abort the bisection, and any other\n"
+"    non-zero exit status means the revision is bad.\n"
 "    "
 msgstr ""
 
@@ -4641,6 +4742,10 @@
 msgstr ""
 
 #, python-format
+msgid "cannot find executable: %s"
+msgstr "kan ikke finde program: %s"
+
+#, python-format
 msgid "failed to execute %s"
 msgstr ""
 
@@ -4649,8 +4754,8 @@
 msgstr "%s dræbt"
 
 #, python-format
-msgid "Changeset %s: %s\n"
-msgstr "Ændring: %s: %s\n"
+msgid "Changeset %d:%s: %s\n"
+msgstr "Ændring %d:%s: %s\n"
 
 #, python-format
 msgid "Testing changeset %s:%s (%s changesets remaining, ~%s tests)\n"
@@ -4660,12 +4765,13 @@
 "set or show the current branch name\n"
 "\n"
 "    With no argument, show the current branch name. With one argument,\n"
-"    set the working directory branch name (the branch does not exist\n"
-"    in the repository until the next commit). It is recommended to use\n"
-"    the 'default' branch as your primary development branch.\n"
+"    set the working directory branch name (the branch will not exist\n"
+"    in the repository until the next commit). Standard practice\n"
+"    recommends that primary development take place on the 'default'\n"
+"    branch.\n"
 "\n"
 "    Unless -f/--force is specified, branch will not let you set a\n"
-"    branch name that shadows an existing branch.\n"
+"    branch name that already exists, even if it's inactive.\n"
 "\n"
 "    Use -C/--clean to reset the working directory branch to that of\n"
 "    the parent of the working directory, negating a previous branch\n"
@@ -4769,8 +4875,7 @@
 "\n"
 "    It is possible to specify an ssh:// URL as the destination, but no\n"
 "    .hg/hgrc and working directory will be created on the remote side.\n"
-"    Look at the help text for URLs for important details about ssh://\n"
-"    URLs.\n"
+"    Please see 'hg help urls' for important details about ssh:// URLs.\n"
 "\n"
 "    For efficiency, hardlinks are used for cloning whenever the source\n"
 "    and destination are on the same filesystem (note this applies only\n"
@@ -4817,7 +4922,7 @@
 "\n"
 "    Det er muligt at specificere en ssh:// URL som destination, men\n"
 "    der vil ikke bliver oprettet nogen .hg/hgrc fil eller noget\n"
-"    arbejdskatalog på den anden side. Se hjælpeteksten for URLer for\n"
+"    arbejdskatalog på den anden side. Se venligst 'hg help urls' for\n"
 "    vigtige detaljer om ssh:// URLer.\n"
 "\n"
 "    Af effektivitetsgrunde bruges hårde lænker ved kloning når kilden\n"
@@ -4846,13 +4951,13 @@
 "\n"
 "    Commit changes to the given files into the repository. Unlike a\n"
 "    centralized RCS, this operation is a local operation. See hg push\n"
-"    for means to actively distribute your changes.\n"
+"    for a way to actively distribute your changes.\n"
 "\n"
 "    If a list of files is omitted, all changes reported by \"hg status\"\n"
 "    will be committed.\n"
 "\n"
 "    If you are committing the result of a merge, do not provide any\n"
-"    file names or -I/-X filters.\n"
+"    filenames or -I/-X filters.\n"
 "\n"
 "    If no commit message is specified, the configured editor is\n"
 "    started to prompt you for a message.\n"
@@ -4893,7 +4998,7 @@
 "    the source must be a single file.\n"
 "\n"
 "    By default, this command copies the contents of files as they\n"
-"    stand in the working directory. If invoked with -A/--after, the\n"
+"    exist in the working directory. If invoked with -A/--after, the\n"
 "    operation is recorded, but no copying is performed.\n"
 "\n"
 "    This command takes effect with the next commit. To undo a copy\n"
@@ -4905,7 +5010,7 @@
 msgstr ""
 
 msgid "There is no Mercurial repository here (.hg not found)"
-msgstr "Der er ikke noget Mercurial arkiv her (fandt ikke .hg)"
+msgstr "Der er intet Mercurial depot her (.hg ikke fundet)"
 
 msgid "either two or three arguments required"
 msgstr "kræver enten to eller tre argumenter"
@@ -4949,8 +5054,8 @@
 "    With multiple arguments, print names and values of all config\n"
 "    items with matching section names.\n"
 "\n"
-"    With the --debug flag, the source (filename and line number) is\n"
-"    printed for each config item.\n"
+"    With --debug, the source (filename and line number) is printed\n"
+"    for each config item.\n"
 "    "
 msgstr ""
 
@@ -4985,7 +5090,7 @@
 msgid "dump the contents of an index file"
 msgstr ""
 
-msgid "dump an index DAG as a .dot file"
+msgid "dump an index DAG as a graphviz dot file"
 msgstr ""
 
 msgid "test Mercurial installation"
@@ -5153,7 +5258,7 @@
 "    diff anyway, probably with undesirable results.\n"
 "\n"
 "    Use the -g/--git option to generate diffs in the git extended diff\n"
-"    format. Read the diffs help topic for more information.\n"
+"    format. See 'hg help diffs' for more information.\n"
 "\n"
 "    With the --switch-parent option, the diff will be against the\n"
 "    second parent. It can be useful to review a merge.\n"
@@ -5188,7 +5293,7 @@
 "    annotering alligevel, sandsynligvis med et uønsket resultat.\n"
 "\n"
 "    Brug -g/--git tilvalget for at generere ændringer i det udvidede\n"
-"    git diff-format. For mere information, læs hg help diffs.\n"
+"    git diff-format. Se 'hg help diffs' for mere information.\n"
 "\n"
 "    Med --switch-parent tilvalget vil ændringerne blive beregnet i\n"
 "    forhold til den anden forælder. Dette kan være nyttigt til at\n"
@@ -5231,21 +5336,30 @@
 "\n"
 "    With no arguments, show all repository head changesets.\n"
 "\n"
-"    If branch or revisions names are given this will show the heads of\n"
-"    the specified branches or the branches those revisions are tagged\n"
-"    with.\n"
-"\n"
 "    Repository \"heads\" are changesets that don't have child\n"
 "    changesets. They are where development generally takes place and\n"
 "    are the usual targets for update and merge operations.\n"
 "\n"
-"    Branch heads are changesets that have a given branch tag, but have\n"
-"    no child changesets with that tag. They are usually where\n"
-"    development on the given branch takes place.\n"
+"    If one or more REV is given, the \"branch heads\" will be shown for\n"
+"    the named branch associated with that revision. The name of the\n"
+"    branch is called the revision's branch tag.\n"
+"\n"
+"    Branch heads are revisions on a given named branch that do not have\n"
+"    any children on the same branch. A branch head could be a true head\n"
+"    or it could be the last changeset on a branch before a new branch\n"
+"    was created. If none of the branch heads are true heads, the branch\n"
+"    is considered inactive.\n"
+"\n"
+"    If STARTREV is specified only those heads (or branch heads) that\n"
+"    are descendants of STARTREV will be displayed.\n"
 "    "
 msgstr ""
 
 #, python-format
+msgid "no open branch heads on branch %s\n"
+msgstr "ingen åbne gren-hoveder på gren %s\n"
+
+#, python-format
 msgid "no changes on branch %s containing %s are reachable from %s\n"
 msgstr ""
 
@@ -5256,14 +5370,14 @@
 msgid ""
 "show help for a given topic or a help overview\n"
 "\n"
-"    With no arguments, print a list of commands and short help.\n"
+"    With no arguments, print a list of commands with short help messages.\n"
 "\n"
 "    Given a topic, extension, or command name, print help for that\n"
 "    topic."
 msgstr ""
 
 msgid "global options:"
-msgstr ""
+msgstr "globale indstillinger:"
 
 msgid "use \"hg help\" for the full list of commands"
 msgstr "brug \"hg help\" for den fulde liste af kommandoer"
@@ -5294,7 +5408,7 @@
 "aliases: %s\n"
 msgstr ""
 "\n"
-"aliaser %s:\n"
+"aliasser: %s\n"
 
 msgid "(no help text available)"
 msgstr "(ingen hjælpetekst tilgængelig)"
@@ -5305,25 +5419,15 @@
 msgid "no commands defined\n"
 msgstr "ingen kommandoer defineret\n"
 
-msgid ""
-"\n"
-"enabled extensions:\n"
-"\n"
-msgstr ""
-"\n"
-"aktiverede udvidelser:\n"
-"\n"
-
-#, python-format
-msgid " %s   %s\n"
-msgstr ""
+msgid "enabled extensions:"
+msgstr "aktiverede udvidelser:"
 
 msgid "no help text available"
 msgstr "ingen hjælpetekst tilgængelig"
 
 #, python-format
 msgid "%s extension - %s\n"
-msgstr ""
+msgstr "%s udvidelse - %s\n"
 
 msgid "Mercurial Distributed SCM\n"
 msgstr "Mercurial Distribueret SCM\n"
@@ -5350,7 +5454,8 @@
 "    With no revision, print a summary of the current state of the\n"
 "    repository.\n"
 "\n"
-"    With a path, do a lookup in another repository.\n"
+"    Specifying a path to a repository root or Mercurial bundle will\n"
+"    cause lookup to operate on that repository/bundle.\n"
 "\n"
 "    This summary identifies the repository state using one or two\n"
 "    parent hash identifiers, followed by a \"+\" if there are\n"
@@ -5368,8 +5473,8 @@
 "    will abort unless given the -f/--force flag.\n"
 "\n"
 "    You can import a patch straight from a mail message. Even patches\n"
-"    as attachments work (body part must be type text/plain or\n"
-"    text/x-patch to be used). From and Subject headers of email\n"
+"    as attachments work (to use the body part, it must have type\n"
+"    text/plain or text/x-patch). From and Subject headers of email\n"
 "    message are used as default committer and commit message. All\n"
 "    text/plain body parts before first diff are added to commit\n"
 "    message.\n"
@@ -5388,8 +5493,8 @@
 "    With -s/--similarity, hg will attempt to discover renames and\n"
 "    copies in the patch in the same way as 'addremove'.\n"
 "\n"
-"    To read a patch from standard input, use patch name \"-\". See 'hg\n"
-"    help dates' for a list of formats valid for -d/--date.\n"
+"    To read a patch from standard input, use \"-\" as the patch name.\n"
+"    See 'hg help dates' for a list of formats valid for -d/--date.\n"
 "    "
 msgstr ""
 
@@ -5407,8 +5512,8 @@
 "meddelse:\n"
 "%s\n"
 
-msgid "not a mercurial patch"
-msgstr ""
+msgid "not a Mercurial patch"
+msgstr "ikke en Mercurial patch"
 
 msgid "patch is damaged or loses information"
 msgstr ""
@@ -5417,8 +5522,8 @@
 "show new changesets found in source\n"
 "\n"
 "    Show new changesets found in the specified path/URL or the default\n"
-"    pull location. These are the changesets that would be pulled if a\n"
-"    pull was requested.\n"
+"    pull location. These are the changesets that would have been pulled\n"
+"    if a pull at the time you issued this command.\n"
 "\n"
 "    For remote repository, using --bundle avoids downloading the\n"
 "    changesets twice if the incoming is followed by a pull.\n"
@@ -5431,7 +5536,7 @@
 "create a new repository in the given directory\n"
 "\n"
 "    Initialize a new repository in the given directory. If the given\n"
-"    directory does not exist, it is created.\n"
+"    directory does not exist, it will be created.\n"
 "\n"
 "    If no directory is given, the current directory is used.\n"
 "\n"
@@ -5454,20 +5559,20 @@
 msgid ""
 "locate files matching specific patterns\n"
 "\n"
-"    Print all files under Mercurial control whose names match the\n"
-"    given patterns.\n"
-"\n"
-"    This command searches the entire repository by default. To search\n"
-"    just the current directory and its subdirectories, use\n"
-"    \"--include .\".\n"
-"\n"
-"    If no patterns are given to match, this command prints all file\n"
-"    names.\n"
+"    Print files under Mercurial control in the working directory whose\n"
+"    names match the given patterns.\n"
+"\n"
+"    By default, this command searches all directories in the working\n"
+"    directory. To search just the current directory and its\n"
+"    subdirectories, use \"--include .\".\n"
+"\n"
+"    If no patterns are given to match, this command prints the names\n"
+"    of all files under Mercurial control in the working directory.\n"
 "\n"
 "    If you want to feed the output of this command into the \"xargs\"\n"
 "    command, use the -0 option to both this command and \"xargs\". This\n"
 "    will avoid the problem of \"xargs\" treating single filenames that\n"
-"    contain white space as multiple filenames.\n"
+"    contain whitespace as multiple filenames.\n"
 "    "
 msgstr ""
 
@@ -5478,8 +5583,8 @@
 "    project.\n"
 "\n"
 "    File history is shown without following rename or copy history of\n"
-"    files. Use -f/--follow with a file name to follow history across\n"
-"    renames and copies. --follow without a file name will only show\n"
+"    files. Use -f/--follow with a filename to follow history across\n"
+"    renames and copies. --follow without a filename will only show\n"
 "    ancestors or descendants of the starting revision. --follow-first\n"
 "    only follows the first parent of merge revisions.\n"
 "\n"
@@ -5489,16 +5594,15 @@
 "\n"
 "    See 'hg help dates' for a list of formats valid for -d/--date.\n"
 "\n"
-"    By default this command outputs: changeset id and hash, tags,\n"
-"    non-trivial parents, user, date and time, and a summary for each\n"
-"    commit. When the -v/--verbose switch is used, the list of changed\n"
-"    files and full commit message is shown.\n"
+"    By default this command prints revision number and changeset id,\n"
+"    tags, non-trivial parents, user, date and time, and a summary for\n"
+"    each commit. When the -v/--verbose switch is used, the list of\n"
+"    changed files and full commit message are shown.\n"
 "\n"
 "    NOTE: log -p/--patch may generate unexpected diff output for merge\n"
 "    changesets, as it will only compare the merge changeset against\n"
-"    its first parent. Also, the files: list will only reflect files\n"
-"    that are different from BOTH parents.\n"
-"\n"
+"    its first parent. Also, only files different from BOTH parents\n"
+"    will appear in files:.\n"
 "    "
 msgstr ""
 
@@ -5507,40 +5611,39 @@
 "\n"
 "    Print a list of version controlled files for the given revision.\n"
 "    If no revision is given, the first parent of the working directory\n"
-"    is used, or the null revision if none is checked out.\n"
-"\n"
-"    With -v flag, print file permissions, symlink and executable bits.\n"
-"    With --debug flag, print file revision hashes.\n"
+"    is used, or the null revision if no revision is checked out.\n"
+"\n"
+"    With -v, print file permissions, symlink and executable bits.\n"
+"    With --debug, print file revision hashes.\n"
 "    "
 msgstr ""
 
 msgid ""
 "merge working directory with another revision\n"
 "\n"
-"    The contents of the current working directory is updated with all\n"
-"    changes made in the requested revision since the last common\n"
-"    predecessor revision.\n"
+"    The current working directory is updated with all changes made in\n"
+"    the requested revision since the last common predecessor revision.\n"
 "\n"
 "    Files that changed between either parent are marked as changed for\n"
 "    the next commit and a commit must be performed before any further\n"
-"    updates are allowed. The next commit has two parents.\n"
+"    updates to the repository are allowed. The next commit will have\n"
+"    two parents.\n"
 "\n"
 "    If no revision is specified, the working directory's parent is a\n"
 "    head revision, and the current branch contains exactly one other\n"
 "    head, the other head is merged with by default. Otherwise, an\n"
-"    explicit revision to merge with must be provided.\n"
+"    explicit revision with which to merge with must be provided.\n"
 "    "
 msgstr ""
 "sammenføj arbejdskataloget med en anden revision\n"
 "\n"
-"    Indholdet af det nuværende arbejdskatalog opdateres med alle\n"
-"    ændringer lavet i den ønskede revision siden den sidste fælles\n"
-"    foregående revision.\n"
+"    Det nuværende arbejdskatalog opdateres med alle ændringer lavet i\n"
+"    den ønskede revision siden den sidste fælles foregående revision.\n"
 "\n"
 "    Filer som ændrede sig i forhold til en af forældrene bliver\n"
-"    markeret som ændret med hensyn til næste arkivering, og\n"
-"    arkiveringen skal laves før yderligere opdateringer er tilladt.\n"
-"    Den næste arkiverede ændring får to forældre.\n"
+"    markeret som ændret med hensyn til næste arkivering, og en\n"
+"    arkivering skal laves før yderligere opdateringer er tilladt. Den\n"
+"    næste arkiverede ændring får to forældre.\n"
 "\n"
 "    Hvis ingen revision angives og arbejdskatalogets forælder er en\n"
 "    hovedrevision og den nuværende gren indeholder præcis et andet\n"
@@ -5584,9 +5687,9 @@
 "\n"
 "    Print the working directory's parent revisions. If a revision is\n"
 "    given via -r/--rev, the parent of that revision will be printed.\n"
-"    If a file argument is given, revision in which the file was last\n"
-"    changed (before the working directory revision or the argument to\n"
-"    --rev if given) is printed.\n"
+"    If a file argument is given, the revision in which the file was\n"
+"    last changed (before the working directory revision or the\n"
+"    argument to --rev if given) is printed.\n"
 "    "
 msgstr ""
 "vis forældrene til arbejdskataloget eller en revision\n"
@@ -5598,7 +5701,7 @@
 "    --rev, hvis givet).\n"
 "    "
 
-msgid "can only specify an explicit file name"
+msgid "can only specify an explicit filename"
 msgstr ""
 
 #, python-format
@@ -5609,7 +5712,7 @@
 "show aliases for remote repositories\n"
 "\n"
 "    Show definition of symbolic path name NAME. If no name is given,\n"
-"    show definition of available names.\n"
+"    show definition of all available names.\n"
 "\n"
 "    Path names are defined in the [paths] section of /etc/mercurial/hgrc\n"
 "    and $HOME/.hgrc. If run inside a repository, .hg/hgrc is used, too.\n"
@@ -5633,14 +5736,17 @@
 msgid ""
 "pull changes from the specified source\n"
 "\n"
-"    Pull changes from a remote repository to the local one.\n"
+"    Pull changes from a remote repository to a local one.\n"
 "\n"
 "    This finds all changes from the repository at the specified path\n"
-"    or URL and adds them to the local repository. By default, this\n"
-"    does not update the copy of the project in the working directory.\n"
-"\n"
-"    Use hg incoming if you want to see what will be added by the next\n"
-"    pull without actually adding the changes to the repository.\n"
+"    or URL and adds them to a local repository (the current one unless\n"
+"    -R is specified). By default, this does not update the copy of the\n"
+"    project in the working directory.\n"
+"\n"
+"    Use hg incoming if you want to see what would have been added by a\n"
+"    pull at the time you issued this command. If you then decide to\n"
+"    added those changes to the repository, you should use pull -r X\n"
+"    where X is the last changeset listed by hg incoming.\n"
 "\n"
 "    If SOURCE is omitted, the 'default' path will be used.\n"
 "    See 'hg help urls' for more information.\n"
@@ -5648,15 +5754,17 @@
 msgstr ""
 "hent ændringer fra den angivne kilde\n"
 "\n"
-"    Hiver ændringer fra et fjert arkiv til det lokale.\n"
+"    Hiver ændringer fra et fjert arkiv til et lokalt.\n"
 "\n"
 "    Dette finder alle ændringer fra arkivet på den specificerede sti\n"
-"    eller URL og tilføjer dem til det lokale arkiv. Som standard\n"
-"    opdateres arbejdskataloget ikke.\n"
-"\n"
-"    Brug hg incoming hvis du vil se hvad der vil blive tilføjet til\n"
-"    arkivet ved næste pull, men uden rent faktisk at tilføje\n"
-"    ændringerne til arkivet.\n"
+"    eller URL og tilføjer dem til et lokalt arkiv (det nuværende arkiv\n"
+"    med mindre -R er angivet). Som standard opdateres arbejdskataloget\n"
+"    ikke.\n"
+"\n"
+"    Brug hg incoming for at se hvad der ville være blevet tilføjet på\n"
+"    det tidspunkt du udførte kommandoen. Hvis du derefter beslutter at\n"
+"    tilføje disse ændringer til arkivet, så bør du bruge pull -r X\n"
+"    hvor X er den sidste ændring nævnt af hg incoming.\n"
 "\n"
 "    Hvis KILDE udelades, så bruges 'default' stien.\n"
 "    Se 'hg help urls' for mere information.\n"
@@ -5674,14 +5782,13 @@
 "\n"
 "    By default, push will refuse to run if it detects the result would\n"
 "    increase the number of remote heads. This generally indicates the\n"
-"    the client has forgotten to pull and merge before pushing.\n"
+"    user forgot to pull and merge before pushing.\n"
 "\n"
 "    If -r/--rev is used, the named revision and all its ancestors will\n"
 "    be pushed to the remote repository.\n"
 "\n"
-"    Look at the help text for URLs for important details about ssh://\n"
+"    Please see 'hg help urls' for important details about ssh://\n"
 "    URLs. If DESTINATION is omitted, a default path will be used.\n"
-"    See 'hg help urls' for more information.\n"
 "    "
 msgstr ""
 "skub ændringer til den angivne destination\n"
@@ -5695,15 +5802,14 @@
 "\n"
 "    Som standard vil push nægte af køre hvis den detekterer at den vil\n"
 "    øge antallet af hoveder i destinationen. Dette indikerer normalt\n"
-"    at klienten har glemt at henge og sammenføje ændringerne før\n"
+"    at brugeren har glemt at hente og sammenføje ændringerne før\n"
 "    skubningen.\n"
 "\n"
 "    Hvis -r/--rev bruges, så vil den navngivne revision og alle dets\n"
 "    forfædre bliver skubbet til det andet arkiv.\n"
 "\n"
-"    Se hjælpeteksten for URL'er for vigtige detaljer om ssh:// URL'er.\n"
+"    Se venligst 'hg help urls' for vigtige detaljer om ssh:// URL'er.\n"
 "    Hvis DESTINATION udelades vil en standard sti blive brugt.\n"
-"    Se 'hg help urls' for mere information.\n"
 "    "
 
 #, python-format
@@ -5730,13 +5836,13 @@
 "    entire project history. -A/--after can be used to remove only\n"
 "    files that have already been deleted, -f/--force can be used to\n"
 "    force deletion, and -Af can be used to remove files from the next\n"
-"    revision without deleting them.\n"
+"    revision without deleting them from the working directory.\n"
 "\n"
 "    The following table details the behavior of remove for different\n"
 "    file states (columns) and option combinations (rows). The file\n"
-"    states are Added, Clean, Modified and Missing (as reported by hg\n"
-"    status). The actions are Warn, Remove (from branch) and Delete\n"
-"    (from disk).\n"
+"    states are Added [A], Clean [C], Modified [M] and Missing [!]\n"
+"    (as reported by hg status). The actions are Warn, Remove (from\n"
+"    branch) and Delete (from disk).\n"
 "\n"
 "           A  C  M  !\n"
 "    none   W  RD W  R\n"
@@ -5756,13 +5862,13 @@
 "    projektets historie. -A/--after kan bruges til kun at fjerne filer\n"
 "    som allerede er slettet, -f/--force kan bruges for at gennemtvinge\n"
 "    en sletning, og -Af kan bruges til at fjerne filer fra næste\n"
-"    revision uden at slette dem.\n"
+"    revision uden at slette dem fra arbejdskataloget.\n"
 "\n"
 "    Den følgende tabel viser opførslen af remove for forskellige\n"
-"    tilstande af filer (søjler) og kombinationer af tilvalg (rækker).\n"
-"    Filtilstandene er Added, Clean, Modified og Missing (som\n"
-"    rapporteret af hg status). Handlingerne er Warn, Remove (fra gren)\n"
-"    og Delete (fra disk).\n"
+"    filtilstande (søjler) og kombinationer af tilvalg (rækker). Mulige\n"
+"    filtilstande er tilføjet [A], ren [C], ændret [M] og manglende [!]\n"
+"    (som rapporteret af hg status). Handlingerne er Warn, Remove (fra\n"
+"    gren) og Delete (fra disk).\n"
 "\n"
 "           A  C  M  !\n"
 "    none   W  RD W  R\n"
@@ -5821,9 +5927,9 @@
 "    will be overwritten if the merge is retried with resolve. The\n"
 "    -m/--mark switch should be used to mark the file as resolved.\n"
 "\n"
-"    This command will also allow listing resolved files and manually\n"
-"    marking and unmarking files as resolved. All files must be marked\n"
-"    as resolved before the new commits are permitted.\n"
+"    This command also allows listing resolved files and manually\n"
+"    indicating whether or not files are resolved. All files must be\n"
+"    marked as resolved before a commit is permitted.\n"
 "\n"
 "    The codes used to show the status of files are:\n"
 "    U = unresolved\n"
@@ -5915,7 +6021,8 @@
 "    This command should be used with care. There is only one level of\n"
 "    rollback, and there is no way to undo a rollback. It will also\n"
 "    restore the dirstate at the time of the last transaction, losing\n"
-"    any dirstate changes since that time.\n"
+"    any dirstate changes since that time. This command does not alter\n"
+"    the working directory.\n"
 "\n"
 "    Transactions are used to encapsulate the effects of all commands\n"
 "    that create new changesets or propagate existing changesets into a\n"
@@ -5972,10 +6079,10 @@
 "\n"
 "    Show status of files in the repository. If names are given, only\n"
 "    files that match are shown. Files that are clean or ignored or\n"
-"    source of a copy/move operation, are not listed unless -c/--clean,\n"
-"    -i/--ignored, -C/--copies or -A/--all is given. Unless options\n"
-"    described with \"show only ...\" are given, the options -mardu are\n"
-"    used.\n"
+"    the source of a copy/move operation, are not listed unless\n"
+"    -c/--clean, -i/--ignored, -C/--copies or -A/--all are given.\n"
+"    Unless options described with \"show only ...\" are given, the\n"
+"    options -mardu are used.\n"
 "\n"
 "    Option -q/--quiet hides untracked (unknown and ignored) files\n"
 "    unless explicitly requested with -u/--unknown or -i/--ignored.\n"
@@ -5986,7 +6093,8 @@
 "    to one merge parent.\n"
 "\n"
 "    If one revision is given, it is used as the base revision.\n"
-"    If two revisions are given, the difference between them is shown.\n"
+"    If two revisions are given, the differences between them are\n"
+"    shown.\n"
 "\n"
 "    The codes used to show the status of files are:\n"
 "    M = modified\n"
@@ -5996,7 +6104,7 @@
 "    ! = missing (deleted by non-hg command, but still tracked)\n"
 "    ? = not tracked\n"
 "    I = ignored\n"
-"      = the previous added file was copied from here\n"
+"      = origin of the previous file listed as A (added)\n"
 "    "
 msgstr ""
 "vis ændrede filer i arbejdskataloget\n"
@@ -6029,7 +6137,7 @@
 "    ! = mangler (slettet af en ikke-hg kommando, men følges stadig)\n"
 "    ? = følges ikke\n"
 "    I = ignoreret\n"
-"      = den foregående fil blev kopieret herfra\n"
+"      = den foregående fil markeret som A (tilføjet) stammer herfra\n"
 "    "
 
 msgid ""
@@ -6078,7 +6186,7 @@
 
 #, python-format
 msgid "Removed tag %s"
-msgstr ""
+msgstr "Mærke %s er fjernet"
 
 #, python-format
 msgid "tag '%s' already exists (use -f to force)"
@@ -6104,9 +6212,9 @@
 msgid ""
 "show the tip revision\n"
 "\n"
-"    The tip revision (usually just called the tip) is the most\n"
-"    recently added changeset in the repository, the most recently\n"
-"    changed head.\n"
+"    The tip revision (usually just called the tip) is the changeset\n"
+"    most recently added to the repository (and therefore the most\n"
+"    recently changed head).\n"
 "\n"
 "    If you have just made a commit, that commit will be the tip. If\n"
 "    you have just pulled changes from another repository, the tip of\n"
@@ -6139,7 +6247,8 @@
 "\n"
 "    When there are uncommitted changes, use option -C/--clean to\n"
 "    discard them, forcibly replacing the state of the working\n"
-"    directory with the requested revision.\n"
+"    directory with the requested revision. Alternately, use -c/--check\n"
+"    to abort.\n"
 "\n"
 "    When there are uncommitted changes and option -C/--clean is not\n"
 "    used, and the parent revision and requested revision are on the\n"
@@ -6168,7 +6277,8 @@
 "\n"
 "    Hvis der er uarkiverede ændringer kan -C/--clean tilvalget bruges\n"
 "    for at kassere dem og sætte tilstanden af arbejdskataloget lig\n"
-"    tilstanden i den ønskede revision.\n"
+"    tilstanden i den ønskede revision. Alternativt, brug -c/--check\n"
+"    for at afbryde.\n"
 "\n"
 "    Hvis der er uarkiverede ændringer, og -C/--clean tilvalget ikke\n"
 "    bruges, og forældrerevisionen og den ønskede revision begge er på\n"
@@ -6183,6 +6293,9 @@
 "    Se 'hg help dates' for en liste af gyldige formater til -d/--date.\n"
 "    "
 
+msgid "uncommitted local changes"
+msgstr ""
+
 msgid ""
 "verify the integrity of the repository\n"
 "\n"
@@ -6210,7 +6323,7 @@
 msgstr ""
 
 msgid "repository root directory or symbolic path name"
-msgstr ""
+msgstr "depotrodfolder eller symbolsk stinavn"
 
 msgid "change working directory"
 msgstr "skift arbejdskatalog"
@@ -6222,7 +6335,7 @@
 msgstr "undertryk output"
 
 msgid "enable additional output"
-msgstr ""
+msgstr "aktiver yderlig output"
 
 msgid "set/override config option"
 msgstr ""
@@ -6231,7 +6344,7 @@
 msgstr ""
 
 msgid "start debugger"
-msgstr ""
+msgstr "start debugger"
 
 msgid "set the charset encoding"
 msgstr ""
@@ -6252,7 +6365,7 @@
 msgstr ""
 
 msgid "display help and exit"
-msgstr ""
+msgstr "vis hjælp og exit"
 
 msgid "do not perform actions, just print output"
 msgstr "udfør ingen handlinger, udskriv kun outputttet"
@@ -6276,7 +6389,7 @@
 msgstr "læs arkiveringsbeskeden fra <fil>"
 
 msgid "record datecode as commit date"
-msgstr ""
+msgstr "noter dato som integrationsdato"
 
 msgid "record the specified user as committer"
 msgstr ""
@@ -6465,10 +6578,10 @@
 msgstr "[KOMMANDO]"
 
 msgid "show the command options"
-msgstr ""
+msgstr "vis kommando-flag"
 
 msgid "[-o] CMD"
-msgstr ""
+msgstr "[-o] KOMMANDO"
 
 msgid "try extended date formats"
 msgstr ""
@@ -6506,6 +6619,9 @@
 msgid "[OPTION]..."
 msgstr ""
 
+msgid "revision to check"
+msgstr "revision som skal undersøges"
+
 msgid "[OPTION]... [-r REV1 [-r REV2]] [FILE]..."
 msgstr ""
 
@@ -6545,7 +6661,10 @@
 msgid "show only the active heads from open branches"
 msgstr ""
 
-msgid "[-r REV] [REV]..."
+msgid "show normal and closed heads"
+msgstr "vis normale og lukkede hoveder"
+
+msgid "[-r STARTREV] [REV]..."
 msgstr ""
 
 msgid "[TOPIC]"
@@ -6734,10 +6853,10 @@
 msgstr ""
 
 msgid "name of access log file to write to"
-msgstr ""
+msgstr "navn på adgangslogfilen der skrives til"
 
 msgid "name of error log file to write to"
-msgstr ""
+msgstr "navn på fejlllog fil der skrives til"
 
 msgid "port to listen on (default: 8000)"
 msgstr ""
@@ -6746,7 +6865,7 @@
 msgstr ""
 
 msgid "prefix path to serve from (default: server root)"
-msgstr ""
+msgstr "prefiks sti at udstille fra (default: server-rod)"
 
 msgid "name to show in web pages (default: working directory)"
 msgstr ""
@@ -6755,19 +6874,19 @@
 msgstr ""
 
 msgid "for remote clients"
-msgstr ""
+msgstr "for fjernklienter"
 
 msgid "web templates to use"
-msgstr ""
+msgstr "web-skabelon"
 
 msgid "template style to use"
-msgstr ""
+msgstr "skabelon-stil"
 
 msgid "use IPv6 in addition to IPv4"
 msgstr "brug IPv6 og IPv4"
 
 msgid "SSL certificate file"
-msgstr "SSL-certifikatfil"
+msgstr "SSL certifikatfil"
 
 msgid "show untrusted configuration options"
 msgstr ""
@@ -6835,6 +6954,9 @@
 msgid "overwrite locally modified files (no backup)"
 msgstr "overskrev lokalt modificerede filer (uden sikkerhedskopi)"
 
+msgid "check for uncommitted changes"
+msgstr ""
+
 msgid "[-C] [-d DATE] [[-r] REV]"
 msgstr "[-C] [-d DATO] [[-r] REV]"
 
@@ -6916,7 +7038,7 @@
 msgstr ""
 
 #, python-format
-msgid "%s: unsupported file type (type is %s)\n"
+msgid "unsupported file type (type is %s)"
 msgstr ""
 
 #, python-format
@@ -6988,7 +7110,7 @@
 msgstr "afbrudt: fejl: %s\n"
 
 msgid "broken pipe\n"
-msgstr "afbrudt pipe"
+msgstr "afbrudt pipe\n"
 
 msgid "interrupted!\n"
 msgstr "standset!\n"
@@ -7054,8 +7176,8 @@
 "Option -R has to be separated from other options (e.g. not -qR) and --"
 "repository may only be abbreviated as --repo!"
 msgstr ""
-"Tilvalget -R skal adskilles fra andre tilvalg (fx ikke -qR) og --"
-"repository må kun forkortes som --repo!"
+"Tilvalget -R skal adskilles fra andre tilvalg (fx ikke -qR) og --repository "
+"må kun forkortes som --repo!"
 
 #, python-format
 msgid "Time: real %.3f secs (user %.3f+%.3f sys %.3f+%.3f)\n"
@@ -7066,7 +7188,7 @@
 msgstr "arkiv '%s' er ikke lokalt"
 
 msgid "invalid arguments"
-msgstr "ugyldige argumenter"
+msgstr "ugyldige parametre"
 
 #, python-format
 msgid "unrecognized profiling format '%s' - Ignored\n"
@@ -7120,7 +7242,7 @@
 msgstr ""
 
 msgid "l"
-msgstr ""
+msgstr "l"
 
 #, python-format
 msgid "merging %s and %s to %s\n"
@@ -7164,6 +7286,45 @@
 msgid "unknown bisect kind %s"
 msgstr ""
 
+msgid ""
+"\n"
+"    Mercurial has a mechanism for adding new features through the\n"
+"    use of extensions. Extensions may bring new commands, or new\n"
+"    hooks, or change Mercurial's behavior.\n"
+"\n"
+"    Extensions are not loaded by default for a variety of reasons,\n"
+"    they may be meant for advanced users or provide potentially\n"
+"    dangerous commands (e.g. mq and rebase allow history to be\n"
+"    rewritten), they might not be ready for prime-time yet, or\n"
+"    they may alter Mercurial's behavior. It is thus up to the user\n"
+"    to activate extensions as desired.\n"
+"\n"
+"    To enable the \"foo\" extension, either shipped with Mercurial\n"
+"    or in the Python search path, create an entry for it in your\n"
+"    hgrc, like this:\n"
+"\n"
+"      [extensions]\n"
+"      foo =\n"
+"\n"
+"    You may also specify the full path to an extension:\n"
+"\n"
+"      [extensions]\n"
+"      myfeature = ~/.hgext/myfeature.py\n"
+"\n"
+"    To explicitly disable an extension enabled in an hgrc of broader\n"
+"    scope, prepend its path with !:\n"
+"\n"
+"      [extensions]\n"
+"      # disabling extension bar residing in /ext/path\n"
+"      hgext.bar = !/path/to/extension/bar.py\n"
+"      # ditto, but no path was supplied for extension baz\n"
+"      hgext.baz = !\n"
+"    "
+msgstr ""
+
+msgid "disabled extensions:"
+msgstr "deaktiverede udvidelser:"
+
 msgid "Date Formats"
 msgstr "Datoformater"
 
@@ -7647,6 +7808,18 @@
 "    "
 msgstr ""
 
+msgid "Using additional features"
+msgstr "Brug af yderligere funktioner"
+
+msgid "can only share local repositories"
+msgstr ""
+
+msgid "destination already exists"
+msgstr "destinationen eksisterer allerede"
+
+msgid "updating working directory\n"
+msgstr "opdaterer arbejdskatalog\n"
+
 #, python-format
 msgid "destination directory: %s\n"
 msgstr ""
@@ -7667,9 +7840,6 @@
 msgid "clone from remote to remote not supported"
 msgstr ""
 
-msgid "updating working directory\n"
-msgstr "opdaterer arbejdskatalog\n"
-
 msgid "updated"
 msgstr "opdateret"
 
@@ -7858,6 +8028,10 @@
 msgstr "betingelse '%s' er ikke understøttet"
 
 #, python-format
+msgid ".hg/sharedpath points to nonexistent directory %s"
+msgstr ".hg/sharedpath peger på et ikke-eksisterende katalog %s"
+
+#, python-format
 msgid "%r cannot be used in a tag name"
 msgstr "%r kan ikke bruges i et mærkatnavnet"
 
@@ -7876,10 +8050,6 @@
 msgstr ""
 
 #, python-format
-msgid "tag '%s' refers to unknown node"
-msgstr "mærkaten '%s' henviser til en ukendt knude"
-
-#, python-format
 msgid "working directory has unknown parent '%s'!"
 msgstr "arbejdsbiblioteket har ukendt forældre '%s'!"
 
@@ -7933,9 +8103,14 @@
 msgid "cannot partially commit a merge (do not specify files or patterns)"
 msgstr ""
 
-#, python-format
-msgid "%s not tracked!\n"
-msgstr "%s følges ikke\n"
+msgid "file not found!"
+msgstr "filen blev ikke fundet!"
+
+msgid "no match under directory!"
+msgstr "ingen træffer under kataloget!"
+
+msgid "file not tracked!"
+msgstr "filen følges ikke!"
 
 msgid "nothing changed\n"
 msgstr "ingen ændringer\n"
@@ -7944,6 +8119,10 @@
 msgstr ""
 
 #, python-format
+msgid "committing subrepository %s\n"
+msgstr "arkiverer underarkiv %s\n"
+
+#, python-format
 msgid "trouble committing %s!\n"
 msgstr "problem ved arkivering %s!\n"
 
@@ -7974,6 +8153,10 @@
 msgstr "%s eksisterer stadig!\n"
 
 #, python-format
+msgid "%s not tracked!\n"
+msgstr "%s følges ikke\n"
+
+#, python-format
 msgid "%s not removed!\n"
 msgstr "%s ikke fjernet!\n"
 
@@ -8189,17 +8372,6 @@
 msgid "case-folding collision between %s and %s"
 msgstr ""
 
-msgid "resolving manifests\n"
-msgstr ""
-
-#, python-format
-msgid " overwrite %s partial %s\n"
-msgstr ""
-
-#, python-format
-msgid " ancestor %s local %s remote %s\n"
-msgstr ""
-
 #, python-format
 msgid ""
 " conflicting flags for %s\n"
@@ -8215,6 +8387,17 @@
 msgid "Sym&link"
 msgstr ""
 
+msgid "resolving manifests\n"
+msgstr ""
+
+#, python-format
+msgid " overwrite %s partial %s\n"
+msgstr ""
+
+#, python-format
+msgid " ancestor %s local %s remote %s\n"
+msgstr ""
+
 #, python-format
 msgid ""
 " local changed %s which remote deleted\n"
@@ -8270,16 +8453,20 @@
 msgstr "intet at sammenføje (brug 'hg update' eller kontroller 'hg heads')"
 
 msgid "outstanding uncommitted changes (use 'hg status' to list changes)"
-msgstr "udestående uarkiverede ændringer (brug 'hg status' for at se ændringer)"
+msgstr ""
+"udestående uarkiverede ændringer (brug 'hg status' for at se ændringer)"
 
 msgid "crosses branches (use 'hg merge' or 'hg update -C' to discard changes)"
-msgstr "krydser grene (brug 'hg merge' eller 'hg update -C' for at kassere ændringerne)"
+msgstr ""
+"krydser grene (brug 'hg merge' eller 'hg update -C' for at kassere "
+"ændringerne)"
 
 msgid "crosses branches (use 'hg merge' or 'hg update -C')"
 msgstr "krydser grene (brug 'hg merge' eller 'hg update -C')"
 
 msgid "crosses named branches (use 'hg update -C' to discard changes)"
-msgstr "krydser navngivne grene (brug 'hg update -C' for at kassere ændringerne)"
+msgstr ""
+"krydser navngivne grene (brug 'hg update -C' for at kassere ændringerne)"
 
 #, python-format
 msgid "cannot create %s: destination already exists"
@@ -8363,6 +8550,10 @@
 msgstr ""
 
 #, python-format
+msgid "Unsupported line endings type: %s"
+msgstr "Linieendelse %s understøttes ikke"
+
+#, python-format
 msgid "no valid hunks found; trying with %r instead\n"
 msgstr ""
 
@@ -8486,6 +8677,43 @@
 msgid "sending %s (%d bytes)\n"
 msgstr ""
 
+#, python-format
+msgid ""
+" subrepository sources for %s differ\n"
+"use (l)ocal source (%s) or (r)emote source (%s)?"
+msgstr ""
+
+#, fuzzy
+msgid "&Remote"
+msgstr "fjernsystem: "
+
+msgid "r"
+msgstr ""
+
+#, python-format
+msgid ""
+" local changed subrepository %s which remote removed\n"
+"use (c)hanged version or (d)elete?"
+msgstr ""
+
+#, python-format
+msgid ""
+" remote changed subrepository %s which local removed\n"
+"use (c)hanged version or (d)elete?"
+msgstr ""
+
+#, python-format
+msgid "removing subrepo %s\n"
+msgstr "fjerner underarkiv %s\n"
+
+#, python-format
+msgid "pulling subrepo %s\n"
+msgstr "hiver fra underarkiv %s\n"
+
+#, python-format
+msgid "pushing subrepo %s\n"
+msgstr "skubber til underarkiv %s\n"
+
 msgid "unmatched quotes"
 msgstr ""
 
@@ -8552,7 +8780,7 @@
 msgstr "brugernavn %s indeholder et linieskift\n"
 
 msgid "unrecognized response\n"
-msgstr ""
+msgstr "svar ikke genkendt\n"
 
 msgid "response expected"
 msgstr "svar forventet"
--- a/mercurial/bdiff.c	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/bdiff.c	Sun Jun 21 20:09:03 2009 +0200
@@ -18,6 +18,10 @@
 # define inline
 #endif
 
+#ifdef __linux
+# define inline __inline
+#endif
+
 #ifdef _WIN32
 #ifdef _MSC_VER
 #define inline __inline
--- a/mercurial/commands.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/commands.py	Sun Jun 21 20:09:03 2009 +0200
@@ -1230,16 +1230,14 @@
                 for i in xrange(blo, bhi):
                     yield ('+', b[i])
 
-    prev = {}
-    def display(fn, rev, states, prevstates):
+    def display(fn, r, pstates, states):
         datefunc = ui.quiet and util.shortdate or util.datestr
         found = False
         filerevmatches = {}
-        r = prev.get(fn, -1)
         if opts.get('all'):
-            iter = difflinestates(states, prevstates)
+            iter = difflinestates(pstates, states)
         else:
-            iter = [('', l) for l in prevstates]
+            iter = [('', l) for l in states]
         for change, l in iter:
             cols = [fn, str(r)]
             if opts.get('line_number'):
@@ -1261,8 +1259,8 @@
             found = True
         return found
 
-    fstate = {}
     skip = {}
+    revfiles = {}
     get = util.cachefunc(lambda r: repo[r].changeset())
     changeiter, matchfn = cmdutil.walkchangerevs(ui, repo, pats, get, opts)
     found = False
@@ -1270,46 +1268,58 @@
     for st, rev, fns in changeiter:
         if st == 'window':
             matches.clear()
+            revfiles.clear()
         elif st == 'add':
             ctx = repo[rev]
-            matches[rev] = {}
+            pctx = ctx.parents()[0]
+            parent = pctx.rev()
+            matches.setdefault(rev, {})
+            matches.setdefault(parent, {})
+            files = revfiles.setdefault(rev, [])
             for fn in fns:
-                if fn in skip:
-                    continue
+                flog = getfile(fn)
                 try:
-                    grepbody(fn, rev, getfile(fn).read(ctx.filenode(fn)))
-                    fstate.setdefault(fn, [])
-                    if follow:
-                        copied = getfile(fn).renamed(ctx.filenode(fn))
-                        if copied:
-                            copies.setdefault(rev, {})[fn] = copied[0]
+                    fnode = ctx.filenode(fn)
                 except error.LookupError:
-                    pass
+                    continue
+
+                copied = flog.renamed(fnode)
+                copy = follow and copied and copied[0]
+                if copy:
+                    copies.setdefault(rev, {})[fn] = copy
+                if fn in skip:
+                    if copy:
+                        skip[copy] = True
+                    continue
+                files.append(fn)
+
+                if not matches[rev].has_key(fn):
+                    grepbody(fn, rev, flog.read(fnode))
+
+                pfn = copy or fn
+                if not matches[parent].has_key(pfn):
+                    try:
+                        fnode = pctx.filenode(pfn)
+                        grepbody(pfn, parent, flog.read(fnode))
+                    except error.LookupError:
+                        pass
         elif st == 'iter':
-            for fn, m in sorted(matches[rev].items()):
+            parent = repo[rev].parents()[0].rev()
+            for fn in sorted(revfiles.get(rev, [])):
+                states = matches[rev][fn]
                 copy = copies.get(rev, {}).get(fn)
                 if fn in skip:
                     if copy:
                         skip[copy] = True
                     continue
-                if fn in prev or fstate[fn]:
-                    r = display(fn, rev, m, fstate[fn])
+                pstates = matches.get(parent, {}).get(copy or fn, [])
+                if pstates or states:
+                    r = display(fn, rev, pstates, states)
                     found = found or r
                     if r and not opts.get('all'):
                         skip[fn] = True
                         if copy:
                             skip[copy] = True
-                fstate[fn] = m
-                if copy:
-                    fstate[copy] = m
-                prev[fn] = rev
-
-    for fn, state in sorted(fstate.items()):
-        if fn in skip:
-            continue
-        if fn not in copies.get(prev[fn], {}):
-            found = display(fn, rev, {}, state) or found
-    return (not found and 1) or 0
 
 def heads(ui, repo, *branchrevs, **opts):
     """show current repository heads or show branch heads
@@ -1473,18 +1483,9 @@
             else:
                 ui.write(' %-*s   %s\n' % (m, f, h[f]))
 
-        exts = list(extensions.extensions())
-        if exts and name != 'shortlist':
-            ui.write(_('\nenabled extensions:\n\n'))
-            maxlength = 0
-            exthelps = []
-            for ename, ext in exts:
-                doc = (gettext(ext.__doc__) or _('(no help text available)'))
-                ename = ename.split('.')[-1]
-                maxlength = max(len(ename), maxlength)
-                exthelps.append((ename, doc.splitlines(0)[0].strip()))
-            for ename, text in exthelps:
-                ui.write(_(' %s   %s\n') % (ename.ljust(maxlength), text))
+        if name != 'shortlist':
+            exts, maxlength = extensions.enabled()
+            ui.write(help.listexts(_('enabled extensions:'), exts, maxlength))
 
         if not ui.quiet:
             addglobalopts(True)
@@ -2108,7 +2109,7 @@
                                'use "hg update" or merge with an explicit rev'))
         node = parent == bheads[0] and bheads[-1] or bheads[0]
 
-    if opts.get('show'):
+    if opts.get('preview'):
         p1 = repo['.']
         p2 = repo[node]
         common = p1.ancestor(p2)
@@ -2281,7 +2282,6 @@
 
     Please see 'hg help urls' for important details about ssh://
     URLs. If DESTINATION is omitted, a default path will be used.
-    See 'hg help urls' for more information.
     """
     dest, revs, checkout = hg.parseurl(
         ui.expandpath(dest or 'default-push', dest or 'default'), opts.get('rev'))
@@ -2670,7 +2670,8 @@
     This command should be used with care. There is only one level of
     rollback, and there is no way to undo a rollback. It will also
     restore the dirstate at the time of the last transaction, losing
-    any dirstate changes since that time.
+    any dirstate changes since that time. This command does not alter
+    the working directory.
 
     Transactions are used to encapsulate the effects of all commands
     that create new changesets or propagate existing changesets into a
@@ -2718,9 +2719,9 @@
 
     baseui = repo and repo.baseui or ui
     optlist = ("name templates style address port prefix ipv6"
-               " accesslog errorlog webdir_conf certificate")
+               " accesslog errorlog webdir_conf certificate encoding")
     for o in optlist.split():
-        if opts[o]:
+        if opts.get(o, None):
             baseui.setconfig("web", o, str(opts[o]))
             if (repo is not None) and (repo.ui != baseui):
                 repo.ui.setconfig("web", o, str(opts[o]))
@@ -2965,7 +2966,7 @@
 
     return postincoming(ui, repo, modheads, opts.get('update'), None)
 
-def update(ui, repo, node=None, rev=None, clean=False, date=None):
+def update(ui, repo, node=None, rev=None, clean=False, date=None, check=False):
     """update working directory
 
     Update the repository's working directory to the specified
@@ -2981,7 +2982,8 @@
 
     When there are uncommitted changes, use option -C/--clean to
     discard them, forcibly replacing the state of the working
-    directory with the requested revision.
+    directory with the requested revision. Alternately, use -c/--check
+    to abort.
 
     When there are uncommitted changes and option -C/--clean is not
     used, and the parent revision and requested revision are on the
@@ -3001,6 +3003,12 @@
     if not rev:
         rev = node
 
+    if not clean and check:
+        # we could use dirty() but we can ignore merge and branch trivia
+        c = repo[None]
+        if c.modified() or c.added() or c.removed():
+            raise util.Abort(_("uncommitted local changes"))
+
     if date:
         if rev:
             raise util.Abort(_("you can't specify a revision and a date"))
@@ -3358,7 +3366,7 @@
         (merge,
          [('f', 'force', None, _('force a merge with outstanding changes')),
           ('r', 'rev', '', _('revision to merge')),
-          ('S', 'show', None,
+          ('P', 'preview', None,
            _('review revisions to merge (no merge is performed)'))],
          _('[-f] [[-r] REV]')),
     "outgoing|out":
@@ -3492,6 +3500,7 @@
     "^update|up|checkout|co":
         (update,
          [('C', 'clean', None, _('overwrite locally modified files (no backup)')),
+          ('c', 'check', None, _('check for uncommitted changes')),
           ('d', 'date', '', _('tipmost revision matching date')),
           ('r', 'rev', '', _('revision'))],
          _('[-C] [-d DATE] [[-r] REV]')),
--- a/mercurial/dispatch.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/dispatch.py	Sun Jun 21 20:09:03 2009 +0200
@@ -224,7 +224,6 @@
     # but only if they have been defined prior to the current definition.
     for alias, definition in ui.configitems('alias'):
         aliasdef = cmdalias(alias, definition, cmdtable)
-        
         cmdtable[alias] = (aliasdef, aliasdef.opts, aliasdef.help)
         if aliasdef.norepo:
             commands.norepo += ' %s' % alias
--- a/mercurial/extensions.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/extensions.py	Sun Jun 21 20:09:03 2009 +0200
@@ -5,9 +5,9 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2, incorporated herein by reference.
 
-import imp, os
-import util, cmdutil
-from i18n import _
+import imp, os, sys
+import util, cmdutil, help
+from i18n import _, gettext
 
 _extensions = {}
 _order = []
@@ -117,3 +117,61 @@
     origfn = getattr(container, funcname)
     setattr(container, funcname, wrap)
     return origfn
+
+def disabled():
+    '''find disabled extensions from hgext
+    returns a dict of {name: desc}, and the max name length'''
+
+    import hgext
+    extpath = os.path.dirname(os.path.abspath(hgext.__file__))
+
+    exts = {}
+    maxlength = 0
+    for e in os.listdir(extpath):
+
+        if e.endswith('.py'):
+            name = e.rsplit('.', 1)[0]
+            path = os.path.join(extpath, e)
+        else:
+            name = e
+            path = os.path.join(extpath, e, '__init__.py')
+            if not os.path.exists(path):
+                continue
+
+        if name in exts or name in _order or name == '__init__':
+            continue
+
+        try:
+            file = open(path)
+        except IOError:
+            continue
+        else:
+            doc = help.moduledoc(file)
+            file.close()
+
+        if doc: # extracting localized synopsis
+            exts[name] = gettext(doc).splitlines()[0]
+        else:
+            exts[name] = _('(no help text available)')
+
+        if len(name) > maxlength:
+            maxlength = len(name)
+
+    return exts, maxlength
+
+def enabled():
+    '''return a dict of {name: desc} of extensions, and the max name length'''
+
+    if not enabled:
+        return {}, 0
+
+    exts = {}
+    maxlength = 0
+    exthelps = []
+    for ename, ext in extensions():
+        doc = (gettext(ext.__doc__) or _('(no help text available)'))
+        ename = ename.split('.')[-1]
+        maxlength = max(len(ename), maxlength)
+        exts[ename] = doc.splitlines(0)[0].strip()
+
+    return exts, maxlength
--- a/mercurial/filemerge.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/filemerge.py	Sun Jun 21 20:09:03 2009 +0200
@@ -195,8 +195,8 @@
     elif tool == 'internal:dump':
         a = repo.wjoin(fd)
         util.copyfile(a, a + ".local")
-        repo.wwrite(a + ".other", fco.data(), fco.flags())
-        repo.wwrite(a + ".base", fca.data(), fca.flags())
+        repo.wwrite(fd + ".other", fco.data(), fco.flags())
+        repo.wwrite(fd + ".base", fca.data(), fca.flags())
         return 1 # unresolved
     else:
         args = _toolstr(ui, tool, "args", '$local $base $other')
--- a/mercurial/graphmod.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/graphmod.py	Sun Jun 21 20:09:03 2009 +0200
@@ -6,70 +6,114 @@
 # This software may be used and distributed according to the terms of the
 # GNU General Public License version 2, incorporated herein by reference.
 
-from node import nullrev
+"""supports walking the history as DAGs suitable for graphical output
 
-def graph(repo, start_rev, stop_rev):
-    """incremental revision grapher
+The most basic format we use is that of::
+
+  (id, type, data, [parentids])
 
-    This generator function walks through the revision history from
-    revision start_rev to revision stop_rev (which must be less than
-    or equal to start_rev) and for each revision emits tuples with the
-    following elements:
+The node and parent ids are arbitrary integers which identify a node in the
+context of the graph returned. Type is a constant specifying the node type.
+Data depends on type.
+"""
+
+from mercurial.node import nullrev
+
+CHANGESET = 'C'
 
-      - Current node
-      - Column and color for the current node
-      - Edges; a list of (col, next_col, color) indicating the edges between
-        the current node and its parents.
-      - First line of the changeset description
-      - The changeset author
-      - The changeset date/time
+def revisions(repo, start, stop):
+    """cset DAG generator yielding (id, CHANGESET, ctx, [parentids]) tuples
+
+    This generator function walks through the revision history from revision
+    start to revision stop (which must be less than or equal to start). It
+    returns a tuple for each node. The node and parent ids are arbitrary
+    integers which identify a node in the context of the graph returned.
     """
+    cur = start
+    while cur >= stop:
+        ctx = repo[cur]
+        parents = [p.rev() for p in ctx.parents() if p.rev() != nullrev]
+        yield (cur, CHANGESET, ctx, sorted(parents))
+        cur -= 1
 
-    if start_rev == nullrev and not stop_rev:
-        return
+def filerevs(repo, path, start, stop):
+    """file cset DAG generator yielding (id, CHANGESET, ctx, [parentids]) tuples
 
-    assert start_rev >= stop_rev
-    assert stop_rev >= 0
-    curr_rev = start_rev
-    revs = []
-    cl = repo.changelog
-    colors = {}
-    new_color = 1
+    This generator function walks through the revision history of a single
+    file from revision start down to revision stop.
+    """
+    filerev = len(repo.file(path)) - 1
+    while filerev >= 0:
+        fctx = repo.filectx(path, fileid=filerev)
+        parents = [f.linkrev() for f in fctx.parents() if f.path() == path]
+        rev = fctx.rev()
+        if rev <= start:
+            yield (rev, CHANGESET, fctx, sorted(parents))
+        if rev <= stop:
+            break
+        filerev -= 1
+
+def nodes(repo, nodes):
+    """cset DAG generator yielding (id, CHANGESET, ctx, [parentids]) tuples
+
+    This generator function walks the given nodes. It only returns parents
+    that are in nodes, too.
+    """
+    include = set(nodes)
+    for node in nodes:
+        ctx = repo[node]
+        parents = [p.rev() for p in ctx.parents() if p.node() in include]
+        yield (ctx.rev(), CHANGESET, ctx, sorted(parents))
+
+def colored(dag):
+    """annotates a DAG with colored edge information
 
-    while curr_rev >= stop_rev:
-        # Compute revs and next_revs
-        if curr_rev not in revs:
-            revs.append(curr_rev) # new head
-            colors[curr_rev] = new_color
-            new_color += 1
+    For each DAG node this function emits tuples::
+
+      (id, type, data, (col, color), [(col, nextcol, color)])
+
+    with the following new elements:
 
-        idx = revs.index(curr_rev)
-        color = colors.pop(curr_rev)
-        next = revs[:]
+      - Tuple (col, color) with column and color index for the current node
+      - A list of tuples indicating the edges between the current node and its
+        parents.
+    """
+    seen = []
+    colors = {}
+    newcolor = 1
+    for (cur, type, data, parents) in dag:
 
-        # Add parents to next_revs
-        parents = [x for x in cl.parentrevs(curr_rev) if x != nullrev]
+        # Compute seen and next
+        if cur not in seen:
+            seen.append(cur) # new head
+            colors[cur] = newcolor
+            newcolor += 1
+
+        col = seen.index(cur)
+        color = colors.pop(cur)
+        next = seen[:]
+
+        # Add parents to next
         addparents = [p for p in parents if p not in next]
-        next[idx:idx + 1] = addparents
+        next[col:col + 1] = addparents
 
         # Set colors for the parents
         for i, p in enumerate(addparents):
             if not i:
                 colors[p] = color
             else:
-                colors[p] = new_color
-                new_color += 1
+                colors[p] = newcolor
+                newcolor += 1
 
         # Add edges to the graph
         edges = []
-        for col, r in enumerate(revs):
-            if r in next:
-                edges.append((col, next.index(r), colors[r]))
-            elif r == curr_rev:
+        for ecol, eid in enumerate(seen):
+            if eid in next:
+                edges.append((ecol, next.index(eid), colors[eid]))
+            elif eid == cur:
                 for p in parents:
-                    edges.append((col, next.index(p), colors[p]))
+                    edges.append((ecol, next.index(p), colors[p]))
 
         # Yield and move on
-        yield (repo[curr_rev], (idx, color), edges)
-        revs = next
-        curr_rev -= 1
+        yield (cur, type, data, (col, color), edges)
+        seen = next
--- a/mercurial/help.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/help.py	Sun Jun 21 20:09:03 2009 +0200
@@ -6,6 +6,90 @@
 # GNU General Public License version 2, incorporated herein by reference.
 
 from i18n import _
+import extensions
+
+
+def moduledoc(file):
+    '''return the top-level python documentation for the given file
+
+    Loosely inspired by pydoc.source_synopsis(), but rewritten to handle \'''
+    as well as """ and to return the whole text instead of just the synopsis'''
+    result = []
+
+    line = file.readline()
+    while line[:1] == '#' or not line.strip():
+        line = file.readline()
+        if not line: break
+
+    start = line[:3]
+    if start == '"""' or start == "'''":
+        line = line[3:]
+        while line:
+            if line.rstrip().endswith(start):
+                line = line.split(start)[0]
+                if line:
+                    result.append(line)
+                break
+            elif not line:
+                return None # unmatched delimiter
+            result.append(line)
+            line = file.readline()
+    else:
+        return None
+
+    return ''.join(result)
+
+def listexts(header, exts, maxlength):
+    '''return a text listing of the given extensions'''
+    if not exts:
+        return ''
+    result = '\n%s\n\n' % header
+    for name, desc in sorted(exts.iteritems()):
+        result += ' %s   %s\n' % (name.ljust(maxlength), desc)
+    return result
+
+def extshelp():
+    doc = _(r'''
+    Mercurial has a mechanism for adding new features through the
+    use of extensions. Extensions may bring new commands, or new
+    hooks, or change Mercurial's behavior.
+
+    Extensions are not loaded by default for a variety of reasons,
+    they may be meant for advanced users or provide potentially
+    dangerous commands (e.g. mq and rebase allow history to be
+    rewritten), they might not be ready for prime-time yet, or
+    they may alter Mercurial's behavior. It is thus up to the user
+    to activate extensions as desired.
+
+    To enable the "foo" extension, either shipped with Mercurial
+    or in the Python search path, create an entry for it in your
+    hgrc, like this:
+
+      [extensions]
+      foo =
+
+    You may also specify the full path to an extension:
+
+      [extensions]
+      myfeature = ~/.hgext/myfeature.py
+
+    To explicitly disable an extension enabled in an hgrc of broader
+    scope, prepend its path with !:
+
+      [extensions]
+      # disabling extension bar residing in /ext/path
+      hgext.bar = !/path/to/extension/bar.py
+      # ditto, but no path was supplied for extension baz
+      hgext.baz = !
+    ''')
+
+    exts, maxlength = extensions.enabled()
+    doc += listexts(_('enabled extensions:'), exts, maxlength)
+
+    exts, maxlength = extensions.disabled()
+    doc += listexts(_('disabled extensions:'), exts, maxlength)
+
+    return doc
 
 helptable = (
     (["dates"], _("Date Formats"),
@@ -418,4 +502,5 @@
       The push command will look for a path named 'default-push', and
       prefer it over 'default' if both are defined.
     ''')),
+    (["extensions"], _("Using additional features"), extshelp),
 )
--- a/mercurial/hgweb/hgweb_mod.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/hgweb/hgweb_mod.py	Sun Jun 21 20:09:03 2009 +0200
@@ -64,7 +64,8 @@
             self.maxshortchanges = int(self.config("web", "maxshortchanges", 60))
             self.maxfiles = int(self.config("web", "maxfiles", 10))
             self.allowpull = self.configbool("web", "allowpull", True)
-            self.encoding = self.config("web", "encoding", encoding.encoding)
+            encoding.encoding = self.config("web", "encoding",
+                                            encoding.encoding)
 
     def run(self):
         if not os.environ.get('GATEWAY_INTERFACE', '').startswith("CGI/1."):
@@ -81,28 +82,6 @@
 
         self.refresh()
 
-        # process this if it's a protocol request
-        # protocol bits don't need to create any URLs
-        # and the clients always use the old URL structure
-
-        cmd = req.form.get('cmd', [''])[0]
-        if cmd and cmd in protocol.__all__:
-            try:
-                if cmd in perms:
-                    try:
-                        self.check_perm(req, perms[cmd])
-                    except ErrorResponse, inst:
-                        if cmd == 'unbundle':
-                            req.drain()
-                        raise
-                method = getattr(protocol, cmd)
-                return method(self.repo, req)
-            except ErrorResponse, inst:
-                req.respond(inst, protocol.HGTYPE)
-                if not inst.message:
-                    return []
-                return '0\n%s\n' % inst.message,
-
         # work with CGI variables to create coherent structure
         # use SCRIPT_NAME, PATH_INFO and QUERY_STRING as well as our REPO_NAME
 
@@ -122,6 +101,30 @@
             query = req.env['QUERY_STRING'].split('&', 1)[0]
             query = query.split(';', 1)[0]
 
+        # process this if it's a protocol request
+        # protocol bits don't need to create any URLs
+        # and the clients always use the old URL structure
+
+        cmd = req.form.get('cmd', [''])[0]
+        if cmd and cmd in protocol.__all__:
+            if query:
+                raise ErrorResponse(HTTP_NOT_FOUND)
+            try:
+                if cmd in perms:
+                    try:
+                        self.check_perm(req, perms[cmd])
+                    except ErrorResponse, inst:
+                        if cmd == 'unbundle':
+                            req.drain()
+                        raise
+                method = getattr(protocol, cmd)
+                return method(self.repo, req)
+            except ErrorResponse, inst:
+                req.respond(inst, protocol.HGTYPE)
+                if not inst.message:
+                    return []
+                return '0\n%s\n' % inst.message,
+
         # translate user-visible url structure to internal structure
 
         args = query.split('/', 2)
@@ -160,7 +163,7 @@
 
         try:
             tmpl = self.templater(req)
-            ctype = tmpl('mimetype', encoding=self.encoding)
+            ctype = tmpl('mimetype', encoding=encoding.encoding)
             ctype = templater.stringify(ctype)
 
             # check read permissions non-static content
@@ -219,7 +222,7 @@
         # some functions for the templater
 
         def header(**map):
-            yield tmpl('header', encoding=self.encoding, **map)
+            yield tmpl('header', encoding=encoding.encoding, **map)
 
         def footer(**map):
             yield tmpl("footer", **map)
--- a/mercurial/hgweb/hgwebdir_mod.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	Sun Jun 21 20:09:03 2009 +0200
@@ -70,6 +70,8 @@
         elif isinstance(self.conf, dict):
             paths = self.conf.items()
 
+        encoding.encoding = self.ui.config('web', 'encoding',
+                                           encoding.encoding)
         self.motd = self.ui.config('web', 'motd')
         self.style = self.ui.config('web', 'style', 'paper')
         self.stripecount = self.ui.config('web', 'stripes', 1)
--- a/mercurial/hgweb/protocol.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/hgweb/protocol.py	Sun Jun 21 20:09:03 2009 +0200
@@ -162,8 +162,10 @@
                 sys.stderr = sys.stdout = cStringIO.StringIO()
 
                 try:
-                    url = 'remote:%s:%s' % (proto,
-                                            req.env.get('REMOTE_HOST', ''))
+                    url = 'remote:%s:%s:%s' % (
+                          proto,
+                          urllib.quote(req.env.get('REMOTE_HOST', '')),
+                          urllib.quote(req.env.get('REMOTE_USER', '')))
                     try:
                         ret = repo.addchangegroup(gen, 'serve', url)
                     except util.Abort, inst:
--- a/mercurial/hgweb/webcommands.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/hgweb/webcommands.py	Sun Jun 21 20:09:03 2009 +0200
@@ -668,10 +668,13 @@
     count = len(web.repo)
     changenav = webutil.revnavgen(rev, revcount, count, web.repo.changectx)
 
-    tree = list(graphmod.graph(web.repo, rev, downrev))
+    dag = graphmod.revisions(web.repo, rev, downrev)
+    tree = list(graphmod.colored(dag))
     canvasheight = (len(tree) + 1) * bg_height - 27;
     data = []
-    for (ctx, vtx, edges) in tree:
+    for (id, type, ctx, vtx, edges) in tree:
+        if type != graphmod.CHANGESET:
+            continue
         node = short(ctx.node())
         age = templatefilters.age(ctx.date())
         desc = templatefilters.firstline(ctx.description())
--- a/mercurial/localrepo.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/localrepo.py	Sun Jun 21 20:09:03 2009 +0200
@@ -262,7 +262,7 @@
                     warn(_("node '%s' is not well formed") % node)
                     continue
                 if bin_n not in self.changelog.nodemap:
-                    warn(_("tag '%s' refers to unknown node") % key)
+                    # silently ignore as pull -r might cause this
                     continue
 
                 h = []
@@ -290,11 +290,24 @@
                 globaltags[k] = an, ah
                 tagtypes[k] = tagtype
 
-        # read the tags file from each head, ending with the tip
+        seen = set()
         f = None
-        for rev, node, fnode in self._hgtagsnodes():
-            f = (f and f.filectx(fnode) or
-                 self.filectx('.hgtags', fileid=fnode))
+        ctxs = []
+        for node in self.heads():
+            try:
+                fnode = self[node].filenode('.hgtags')
+            except error.LookupError:
+                continue
+            if fnode not in seen:
+                seen.add(fnode)
+                if not f:
+                    f = self.filectx('.hgtags', fileid=fnode)
+                else:
+                    f = f.filectx(fnode)
+                ctxs.append(f)
+
+        # read the tags file from each head, ending with the tip
+        for f in reversed(ctxs):
             readtags(f.data().splitlines(), f, "global")
 
         try:
@@ -328,22 +341,6 @@
 
         return self._tagstypecache.get(tagname)
 
-    def _hgtagsnodes(self):
-        last = {}
-        ret = []
-        for node in reversed(self.heads()):
-            c = self[node]
-            rev = c.rev()
-            try:
-                fnode = c.filenode('.hgtags')
-            except error.LookupError:
-                continue
-            ret.append((rev, node, fnode))
-            if fnode in last:
-                ret[last[fnode]] = None
-            last[fnode] = len(ret) - 1
-        return [item for item in ret if item]
-
     def tagslist(self):
         '''return a list of tags ordered by revision'''
         l = []
--- a/mercurial/patch.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/patch.py	Sun Jun 21 20:09:03 2009 +0200
@@ -972,7 +972,7 @@
 def applydiff(ui, fp, changed, strip=1, sourcefile=None, reverse=False,
               eol=None):
     """
-    Reads a patch from fp and tries to apply it. 
+    Reads a patch from fp and tries to apply it.
 
     The dict 'changed' is filled in with all of the filenames changed
     by the patch. Returns 0 for a clean patch, -1 if any rejects were
@@ -1137,7 +1137,7 @@
         eol = {'strict': None, 'crlf': '\r\n', 'lf': '\n'}[eolmode.lower()]
     except KeyError:
         raise util.Abort(_('Unsupported line endings type: %s') % eolmode)
-            
+
     try:
         fp = file(patchobj, 'rb')
     except TypeError:
--- a/mercurial/url.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/mercurial/url.py	Sun Jun 21 20:09:03 2009 +0200
@@ -109,7 +109,9 @@
             return (user, passwd)
 
         if not user:
-            user, passwd = self._readauthtoken(authuri)
+            auth = self.readauthtoken(authuri)
+            if auth:
+                user, passwd = auth.get('username'), auth.get('password')
         if not user or not passwd:
             if not self.ui.interactive():
                 raise util.Abort(_('http authorization required'))
@@ -132,7 +134,7 @@
         msg = _('http auth: user %s, password %s\n')
         self.ui.debug(msg % (user, passwd and '*' * len(passwd) or 'not set'))
 
-    def _readauthtoken(self, uri):
+    def readauthtoken(self, uri):
         # Read configuration
         config = dict()
         for key, val in self.ui.configitems('auth'):
@@ -143,7 +145,7 @@
         # Find the best match
         scheme, hostpath = uri.split('://', 1)
         bestlen = 0
-        bestauth = None, None
+        bestauth = None
         for auth in config.itervalues():
             prefix = auth.get('prefix')
             if not prefix: continue
@@ -155,7 +157,7 @@
             if (prefix == '*' or hostpath.startswith(prefix)) and \
                 len(prefix) > bestlen and scheme in schemes:
                 bestlen = len(prefix)
-                bestauth = auth.get('username'), auth.get('password')
+                bestauth = auth
         return bestauth
 
 class proxyhandler(urllib2.ProxyHandler):
@@ -411,8 +413,38 @@
         send = _gen_sendfile(httplib.HTTPSConnection)
 
     class httpshandler(keepalive.KeepAliveHandler, urllib2.HTTPSHandler):
+        def __init__(self, ui):
+            keepalive.KeepAliveHandler.__init__(self)
+            urllib2.HTTPSHandler.__init__(self)
+            self.ui = ui
+            self.pwmgr = passwordmgr(self.ui)
+
         def https_open(self, req):
-            return self.do_open(httpsconnection, req)
+            self.auth = self.pwmgr.readauthtoken(req.get_full_url())
+            return self.do_open(self._makeconnection, req)
+
+        def _makeconnection(self, host, port=443, *args, **kwargs):
+            keyfile = None
+            certfile = None
+
+            if args: # key_file
+                keyfile = args.pop(0)
+            if args: # cert_file
+                certfile = args.pop(0)
+
+            # if the user has specified different key/cert files in
+            # hgrc, we prefer these
+            if self.auth and 'key' in self.auth and 'cert' in self.auth:
+                keyfile = self.auth['key']
+                certfile = self.auth['cert']
+
+            # let host port take precedence
+            if ':' in host and '[' not in host or ']:' in host:
+                host, port = host.rsplit(':', 1)
+                if '[' in host:
+                    host = host[1:-1]
+
+            return httpsconnection(host, port, keyfile, certfile, *args, **kwargs)
 
 # In python < 2.5 AbstractDigestAuthHandler raises a ValueError if
 # it doesn't know about the auth type requested.  This can happen if
@@ -460,7 +492,7 @@
     '''
     handlers = [httphandler()]
     if has_https:
-        handlers.append(httpshandler())
+        handlers.append(httpshandler(ui))
 
     handlers.append(proxyhandler(ui))
 
--- a/tests/run-tests.py	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/run-tests.py	Sun Jun 21 20:09:03 2009 +0200
@@ -16,7 +16,7 @@
 # If you change this script, it is recommended that you ensure you
 # haven't broken it by running it in various modes with a representative
 # sample of test scripts.  For example:
-# 
+#
 #  1) serial, no coverage, temp install:
 #      ./run-tests.py test-s*
 #  2) serial, no coverage, local hg:
--- a/tests/test-convert.out	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-convert.out	Sun Jun 21 20:09:03 2009 +0200
@@ -271,5 +271,5 @@
 emptydir does not look like a monotone repo
 emptydir does not look like a GNU Arch repo
 emptydir does not look like a Bazaar repo
-emptydir does not look like a P4 repo
+cannot find required "p4" tool
 abort: emptydir: missing or unsupported repository
--- a/tests/test-debugcomplete.out	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-debugcomplete.out	Sun Jun 21 20:09:03 2009 +0200
@@ -169,14 +169,14 @@
 export: output, switch-parent, text, git, nodates
 init: ssh, remotecmd
 log: follow, follow-first, date, copies, keyword, rev, removed, only-merges, user, only-branch, prune, patch, git, limit, no-merges, style, template, include, exclude
-merge: force, rev, show
+merge: force, rev, preview
 parents: rev, style, template
 pull: update, force, rev, ssh, remotecmd
 push: force, rev, ssh, remotecmd
 remove: after, force, include, exclude
 serve: accesslog, daemon, daemon-pipefds, errorlog, port, address, prefix, name, webdir-conf, pid-file, stdio, templates, style, ipv6, certificate
 status: all, modified, added, removed, deleted, clean, unknown, ignored, no-status, copies, print0, rev, include, exclude
-update: clean, date, rev
+update: clean, check, date, rev
 addremove: similarity, include, exclude, dry-run
 archive: no-decode, prefix, rev, type, include, exclude
 backout: merge, parent, rev, include, exclude, message, logfile, date, user
--- a/tests/test-double-merge	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-double-merge	Sun Jun 21 20:09:03 2009 +0200
@@ -20,7 +20,7 @@
 hg ci -m 'change foo' -d "1000000 0"
 
 # we get conflicts that shouldn't be there
-hg merge -S
+hg merge -P
 hg merge --debug
 
 echo "-- foo --"
--- a/tests/test-globalopts.out	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-globalopts.out	Sun Jun 21 20:09:03 2009 +0200
@@ -208,6 +208,7 @@
  diffs        Diff Formats
  templating   Template Usage
  urls         URL Paths
+ extensions   Using additional features
 
 use "hg -v help" to show aliases and global options
 Mercurial Distributed SCM
@@ -273,6 +274,7 @@
  diffs        Diff Formats
  templating   Template Usage
  urls         URL Paths
+ extensions   Using additional features
 
 use "hg -v help" to show aliases and global options
 %% not tested: --debugger
--- a/tests/test-grep	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-grep	Sun Jun 21 20:09:03 2009 +0200
@@ -73,3 +73,25 @@
 # Used to crash here
 hg grep -r 1 octarine
 
+# Issue337: grep did not compared changesets by their revision numbers
+# instead of following parent-child relationships.
+cd ..
+echo % issue 337
+hg init issue337
+cd issue337
+
+echo white > color
+hg commit -A -m "0 white"
+
+echo red > color
+hg commit -A -m "1 red"
+
+hg update 0
+echo black > color
+hg commit -A -m "2 black"
+
+hg update --clean 1
+echo blue > color
+hg commit -A -m "3 blue"
+
+hg grep --all red
--- a/tests/test-grep.out	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-grep.out	Sun Jun 21 20:09:03 2009 +0200
@@ -38,6 +38,13 @@
 noeol:4:no infinite loo
 % issue 685
 adding color
+colour:1:octarine
 color:0:octarine
 colour:1:octarine
-colour:1:octarine
+% issue 337
+adding color
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+created new head
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+color:3:-:red
+color:1:+:red
--- a/tests/test-hardlinks-safety.out	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-hardlinks-safety.out	Sun Jun 21 20:09:03 2009 +0200
@@ -15,6 +15,8 @@
 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo
 %
 foo
+patch foo finalized without changeset message
+patch bar finalized without changeset message
 %%%
 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo
 430ed4828a74fa4047bc816a25500f7472ab4bfe bar
--- a/tests/test-help.out	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-help.out	Sun Jun 21 20:09:03 2009 +0200
@@ -99,6 +99,7 @@
  diffs        Diff Formats
  templating   Template Usage
  urls         URL Paths
+ extensions   Using additional features
 
 use "hg -v help" to show aliases and global options
  add          add the specified files on the next commit
@@ -160,6 +161,7 @@
  diffs        Diff Formats
  templating   Template Usage
  urls         URL Paths
+ extensions   Using additional features
 hg add [OPTION]... [FILE]...
 
 add the specified files on the next commit
--- a/tests/test-merge-default	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-merge-default	Sun Jun 21 20:09:03 2009 +0200
@@ -31,7 +31,7 @@
 hg commit -mm1
 
 echo % should succeed - 2 heads
-hg merge -S
+hg merge -P
 hg merge
 hg commit -mm2
 
--- a/tests/test-merge1	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-merge1	Sun Jun 21 20:09:03 2009 +0200
@@ -30,7 +30,7 @@
 hg commit -m "commit #2" -d "1000000 0"
 echo This is file b1 > b
 echo %% no merges expected
-hg merge -S 1
+hg merge -P 1
 hg merge 1
 hg diff --nodates
 hg status
--- a/tests/test-mq-qdelete.out	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-mq-qdelete.out	Sun Jun 21 20:09:03 2009 +0200
@@ -13,9 +13,12 @@
 b
 series
 status
+patch a finalized without changeset message
 1 [mq]: a
 0 base
 abort: cannot delete revision 3 above applied patches
+patch d finalized without changeset message
+patch e finalized without changeset message
 f
 4 [mq]: f
 3 [mq]: e
@@ -32,11 +35,14 @@
 applying c
 patch c is empty
 now at: c
+patch a finalized without changeset message
+patch b finalized without changeset message
 c
 3 imported patch c
 2 [mq]: b
 1 [mq]: a
 0 base
+patch c finalized without changeset message
 3 imported patch c
 2 [mq]: b
 1 [mq]: a
--- a/tests/test-mq-qimport.out	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-mq-qimport.out	Sun Jun 21 20:09:03 2009 +0200
@@ -27,3 +27,5 @@
 adding another.diff to series file
 applying another.diff
 now at: another.diff
+patch b.diff finalized without changeset message
+patch another.diff finalized without changeset message
--- a/tests/test-mq-qpush-fail	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-mq-qpush-fail	Sun Jun 21 20:09:03 2009 +0200
@@ -45,3 +45,12 @@
 
 echo '% bar should be gone; other unknown/ignored files should still be around'
 hg status -A
+
+echo '% preparing qpush of a missing patch'
+hg qpop -a
+hg qpush
+rm .hg/patches/patch2
+echo '% now we expect the push to fail, but it should NOT complain about patch1'
+hg qpush
+
+true # happy ending
--- a/tests/test-mq-qpush-fail.out	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-mq-qpush-fail.out	Sun Jun 21 20:09:03 2009 +0200
@@ -19,3 +19,11 @@
 ? untracked-file
 I .hgignore
 C foo
+% preparing qpush of a missing patch
+no patches applied
+applying patch1
+now at: patch1
+% now we expect the push to fail, but it should NOT complain about patch1
+applying patch2
+unable to read patch2
+now at: patch1
--- a/tests/test-tags.out	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-tags.out	Sun Jun 21 20:09:03 2009 +0200
@@ -26,14 +26,12 @@
 .hgtags@c071f74ab5eb, line 2: cannot parse entry
 .hgtags@c071f74ab5eb, line 4: node 'foo' is not well formed
 .hgtags@4ca6f1b1a68c, line 2: node 'x' is not well formed
-localtags, line 1: tag 'invalid' refers to unknown node
 tip                                8:4ca6f1b1a68c
 first                              0:0acdaf898367
 changeset:   8:4ca6f1b1a68c
 .hgtags@c071f74ab5eb, line 2: cannot parse entry
 .hgtags@c071f74ab5eb, line 4: node 'foo' is not well formed
 .hgtags@4ca6f1b1a68c, line 2: node 'x' is not well formed
-localtags, line 1: tag 'invalid' refers to unknown node
 tag:         tip
 parent:      3:b2ef3841386b
 user:        test
--- a/tests/test-up-issue1456	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-up-issue1456	Sun Jun 21 20:09:03 2009 +0200
@@ -10,7 +10,7 @@
 hg ci -m1
 hg co -q 0
 echo dirty > foo
-sleep 1
+hg up -c
 hg up -q
 cat foo
 hg st -A
--- a/tests/test-up-issue1456.out	Sun Jan 25 17:35:38 2009 +0200
+++ b/tests/test-up-issue1456.out	Sun Jun 21 20:09:03 2009 +0200
@@ -1,3 +1,4 @@
+abort: uncommitted local changes
 dirty
 M foo
 % validate update of standalone execute bit change