changeset 9850:004bf1d6e6af

Merge with i18n
author Matt Mackall <mpm@selenic.com>
date Thu, 12 Nov 2009 14:34:07 -0600
parents d1043c2ffe6c (diff) 6cb1b9b91142 (current diff)
children 9e7b2c49d25d 917cf6bb6d0c 20f95fc4c58e
files
diffstat 41 files changed, 624 insertions(+), 211 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/bash_completion	Thu Nov 12 16:51:32 2009 -0200
+++ b/contrib/bash_completion	Thu Nov 12 14:34:07 2009 -0600
@@ -355,6 +355,14 @@
     _hg_ext_mq_patchlist $qcmd
 }
 
+_hg_cmd_qfinish()
+{
+    if [[ "$prev" = @(-a|--applied) ]]; then
+	return
+    fi
+    _hg_ext_mq_patchlist qapplied
+}
+
 _hg_cmd_qsave()
 {
     if [[ "$prev" = @(-n|--name) ]]; then
--- a/contrib/buildrpm	Thu Nov 12 16:51:32 2009 -0200
+++ b/contrib/buildrpm	Thu Nov 12 14:34:07 2009 -0600
@@ -2,71 +2,109 @@
 #
 # Build a Mercurial RPM in place.
 #
-# Bryan O'Sullivan <bos@serpentine.com>
-#
 # Tested on
-# - Fedora 10
+# - Fedora 8 (with docutils 0.5)
 # - Fedora 11
-# - Centos 5.3 (with Fedora EPEL repo for asciidoc)
+# - OpenSuse 11.2
 
-HG="`dirname $0`/../hg"
-PYTHONPATH="`dirname $0`/../mercurial/pure"
+cd "`dirname $0`/.."
+HG="$PWD/hg"
+PYTHONPATH="$PWD/mercurial/pure"
 export PYTHONPATH
 
-root="`$HG root 2>/dev/null`"
 specfile=contrib/mercurial.spec
-
-if [ -z "$root" ]; then
-    echo 'You are not inside a Mercurial repository!' 1>&2
-    exit 1
-fi
-
-rpmdir=/tmp/"`basename $root | sed 's/ /_/'`"-rpm # FIXME: Insecure /tmp handling
-
-cd "$root"
-rm -rf $rpmdir
-mkdir -p $rpmdir/RPMS
-$HG clone "$root" $rpmdir/BUILD
-
 if [ ! -f $specfile ]; then
     echo "Cannot find $specfile!" 1>&2
     exit 1
 fi
 
-tmpspec=/tmp/`basename "$specfile"`.$$ # FIXME: Insecure /tmp handling
-# Use the most recent tag as the version.
-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 | 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`
+if [ ! -d .hg ]; then
+    echo 'You are not inside a Mercurial repository!' 1>&2
+    exit 1
+fi
+
+if $HG id -i | grep '+$' > /dev/null 2>&1; then
+    echo -n "Your local changes will NOT be in the RPM. Continue [y/n] ? "
+    read answer
+    if echo $answer | grep -iv '^y'; then
+        exit
+    fi
+fi
+
+rpmdir="$PWD/rpmbuild"
+
+rm -rf $rpmdir
+mkdir -p $rpmdir/SOURCES $rpmdir/SPECS $rpmdir/RPMS $rpmdir/SRPMS $rpmdir/BUILD
 
-# Beat up the spec file
-sed -e 's,^Source:.*,Source: /dev/null,' \
-    -e "s,^Version:.*,Version: $version," \
+# make setup.py build the version string
+python setup.py build_py -c -d .
+hgversion=`$HG version | sed -ne 's/.*(version \(.*\))$/\1/p'`
+
+if echo $hgversion | grep -- '-' > /dev/null 2>&1; then
+    # nightly build case, version is like 1.3.1+250-20b91f91f9ca
+    version=`echo $hgversion | cut -d- -f1`
+    release=`echo $hgversion | cut -d- -f2 | sed -e 's/+.*//'`
+else
+    # official tag, version is like 1.3.1
+    version=`echo $hgversion | sed -e 's/+.*//'`
+    release='0'
+fi
+
+$HG archive -t tgz $rpmdir/SOURCES/mercurial-$version.tar.gz
+rpmspec=$rpmdir/SPECS/mercurial-$version.spec
+
+sed -e "s,^Version:.*,Version: $version," \
     -e "s,^Release:.*,Release: $release," \
-    -e "s,^%prep.*,Changeset: $tip\n\0," \
-    -e 's,^%setup.*,,' \
-    $specfile > $tmpspec
+    $specfile > $rpmspec
+
+echo >> $rpmspec
+echo "%changelog" >> $rpmspec
 
-cat <<EOF >> $tmpspec
-%changelog
-* `LANG=en_US date +'%a %b %d %Y'` `$HG showconfig ui.username` $version-$release
-- Automatically built via $0
+if echo $version | grep '+' > /dev/null 2>&1; then
+    latesttag="`echo $version | sed -e 's/+.*//'`"
+    $HG log -r .:"$latesttag" -fM \
+        --template '{date|hgdate}\t{author}\t{desc|firstline}\n' | python -c '
+import sys, time
+
+def datestr(date, format):
+    return time.strftime(format, time.gmtime(float(date[0]) - date[1]))
 
-EOF
-$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 /' \
-        -e '/^\* [MTWFS][a-z][a-z] /{s/ [012][0-9]:[0-9][0-9]:[0-9][0-9] [+-][0-9]\{4\}//}' \
-   >> $tmpspec
+changelog = []
+for l in sys.stdin.readlines():
+    tok = l.split("\t")
+    hgdate = tuple(int(v) for v in tok[0].split())
+    changelog.append((datestr(hgdate, "%F"), tok[1], hgdate, tok[2]))
+prevtitle = ""
+for l in sorted(changelog, reverse=True):
+    title = "* %s %s" % (datestr(l[2], "%a %b %d %Y"), l[1])
+    if prevtitle != title:
+        prevtitle = title
+        print
+        print title
+    print "- %s" % l[3].strip()
+' >> $rpmspec
+
+else
 
-rpmbuild --define "_topdir $rpmdir" -bb $tmpspec
+    $HG log \
+         --template '{date|hgdate}\t{author}\t{desc|firstline}\n' \
+         .hgtags | python -c '
+import sys, time
+
+def datestr(date, format):
+    return time.strftime(format, time.gmtime(float(date[0]) - date[1]))
+
+for l in sys.stdin.readlines():
+    tok = l.split("\t")
+    hgdate = tuple(int(v) for v in tok[0].split())
+    print "* %s %s\n- %s" % (datestr(hgdate, "%a %b %d %Y"), tok[1], tok[2])
+' >> $rpmspec
+
+fi
+
+rpmbuild --define "_topdir $rpmdir" -ba $rpmspec --clean
 if [ $? = 0 ]; then
-    rm -rf $tmpspec $rpmdir/BUILD
-    mv $rpmdir/RPMS/*/* $rpmdir && rm -r $rpmdir/RPMS
     echo
     echo "Packages are in $rpmdir:"
-    ls -l $rpmdir/*.rpm
+    ls -l $rpmdir/*RPMS/*
 fi
--- a/contrib/perf.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/contrib/perf.py	Thu Nov 12 14:34:07 2009 -0600
@@ -4,7 +4,7 @@
 from mercurial import cmdutil, match, commands
 import time, os, sys
 
-def timer(func):
+def timer(func, title=None):
     results = []
     begin = time.time()
     count = 0
@@ -21,6 +21,8 @@
             break
         if cstop - begin > 10 and count >= 3:
             break
+    if title:
+        sys.stderr.write("! %s\n" % title)
     if r:
         sys.stderr.write("! result: %s\n" % r)
     m = min(results)
@@ -113,6 +115,23 @@
                                ' {author|person}: {desc|firstline}\n'))
     ui.popbuffer()
 
+def perfdiffwd(ui, repo):
+    """Profile diff of working directory changes"""
+    options = {
+        'w': 'ignore_all_space',
+        'b': 'ignore_space_change',
+        'B': 'ignore_blank_lines',
+        }
+
+    for diffopt in ('', 'w', 'b', 'B', 'wB'):
+        opts = dict((options[c], '1') for c in diffopt)
+        def d():
+            ui.pushbuffer()
+            commands.diff(ui, repo, **opts)
+            ui.popbuffer()
+        title = 'diffopts: %s' % (diffopt and ('-' + diffopt) or 'none')
+        timer(d, title)
+
 cmdtable = {
     'perflookup': (perflookup, []),
     'perfparents': (perfparents, []),
@@ -127,5 +146,6 @@
     'perfdirstatedirs': (perfdirstate, []),
     'perflog': (perflog, []),
     'perftemplating': (perftemplating, []),
+    'perfdiffwd': (perfdiffwd, []),
 }
 
--- a/doc/hgignore.5.txt	Thu Nov 12 16:51:32 2009 -0200
+++ b/doc/hgignore.5.txt	Thu Nov 12 14:34:07 2009 -0600
@@ -33,7 +33,7 @@
 root directory, or any prefix path of that path, is matched against
 any pattern in ``.hgignore``.
 
-For example, say we have an an untracked file, ``file.c``, at
+For example, say we have an untracked file, ``file.c``, at
 ``a/b/file.c`` inside our repository. Mercurial will ignore ``file.c``
 if any pattern in ``.hgignore`` matches ``a/b/file.c``, ``a/b`` or ``a``.
 
--- a/doc/hgrc.5.txt	Thu Nov 12 16:51:32 2009 -0200
+++ b/doc/hgrc.5.txt	Thu Nov 12 14:34:07 2009 -0600
@@ -146,8 +146,8 @@
 
     <name>.<argument> = <value>
 
-where <name> is used to group arguments into authentication entries.
-Example::
+where ``<name>`` is used to group arguments into authentication
+entries. Example::
 
     foo.prefix = hg.intevation.org/mercurial
     foo.username = foo
@@ -203,10 +203,10 @@
 directory only, use the pattern ``*.txt``. To match any file ending
 in ``.c`` anywhere in the repository, use the pattern ``**.c``.
 
-The filter command can start with a specifier, either "pipe:" or
-"tempfile:". If no specifier is given, "pipe:" is used by default.
+The filter command can start with a specifier, either ``pipe:`` or
+``tempfile:``. If no specifier is given, ``pipe:`` is used by default.
 
-A "pipe:" command must accept data on stdin and return the transformed
+A ``pipe:`` command must accept data on stdin and return the transformed
 data on stdout.
 
 Pipe example::
@@ -221,9 +221,9 @@
   # can safely omit "pipe:", because it's the default)
   *.gz = gzip
 
-A "tempfile:" command is a template. The string INFILE is replaced
+A ``tempfile:`` command is a template. The string ``INFILE`` is replaced
 with the name of a temporary file that contains the data to be
-filtered by the command. The string OUTFILE is replaced with the name
+filtered by the command. The string ``OUTFILE`` is replaced with the name
 of an empty temporary file, where the filtered data must be written by
 the command.
 
@@ -256,7 +256,7 @@
 
 (defaults are deprecated. Don't use them. Use aliases instead)
 
-Use the [defaults] section to define command defaults, i.e. the
+Use the ``[defaults]`` section to define command defaults, i.e. the
 default options/arguments to pass to the specified commands.
 
 The following example makes ``hg log`` run in verbose mode, and ``hg
@@ -306,12 +306,12 @@
     Optional. Comma-separated list of blind carbon copy recipients'
     email addresses. Cannot be set interactively.
 ``method``
-    Optional. Method to use to send email messages. If value is "smtp"
+    Optional. Method to use to send email messages. If value is ``smtp``
     (default), use SMTP (see the SMTP_ section for configuration).
     Otherwise, use as name of program to run that acts like sendmail
-    (takes "-f" option for sender, list of recipients on command line,
-    message on stdin). Normally, setting this to "sendmail" or
-    "/usr/sbin/sendmail" is enough to use sendmail to send messages.
+    (takes ``-f`` option for sender, list of recipients on command line,
+    message on stdin). Normally, setting this to ``sendmail`` or
+    ``/usr/sbin/sendmail`` is enough to use sendmail to send messages.
 ``charsets``
     Optional. Comma-separated list of character sets considered
     convenient for recipients. Addresses, headers, and parts not
@@ -482,6 +482,8 @@
 Example ``.hg/hgrc``::
 
   [hooks]
+  # update working directory after adding changesets
+  changegroup.update = hg update
   # do not use the site-wide hook
   incoming =
   incoming.email = /my/email/hook
@@ -588,7 +590,7 @@
 
 Python hooks are run within the Mercurial process. Each hook is
 called with at least three keyword arguments: a ui object (keyword
-"ui"), a repository object (keyword "repo"), and a "hooktype"
+``ui``), a repository object (keyword ``repo``), and a ``hooktype``
 keyword that tells what kind of hook is used. Arguments listed as
 environment variables above are passed as keyword arguments, with no
 ``HG_`` prefix, and names in lower case.
--- a/doc/style.css	Thu Nov 12 16:51:32 2009 -0200
+++ b/doc/style.css	Thu Nov 12 14:34:07 2009 -0600
@@ -1,5 +1,5 @@
 /*
- * Styles for man pages, which suit with http://mercurial.selenic.com/
+ * Styles for man pages, which match with http://mercurial.selenic.com/
  *
  * Color scheme & layout are borrowed from
  * http://mercurial.selenic.com/css/styles.css
@@ -12,7 +12,6 @@
     margin: 0;
     padding: 0;
     font-family: sans-serif;
-    color: #111;
 }
 
 .document {
@@ -72,7 +71,7 @@
 a:visited { color: #5c9caf; }
 a:link.toc-backref, a:visited.toc-backref {
     text-decoration: none;
-    color: #111;  /* `inherit' not supported by IE6 */
+    color: inherit;  /* NOTE: `inherit' is not supported by IE6 */
 }
 
 div.admonition, div.attention, div.caution,
@@ -84,9 +83,13 @@
     margin: 1em;
 }
 
+div.note {
+    border-color: #fcc200;
+}
+
 
 /*
- * The following styles are from docutils'.
+ * The following styles are from Docutils.
  * Please refine if necessary.
  */
 
--- a/hgext/convert/monotone.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/hgext/convert/monotone.py	Thu Nov 12 14:34:07 2009 -0600
@@ -102,8 +102,13 @@
     def mtngetcerts(self, rev):
         certs = {"author":"<missing>", "date":"<missing>",
             "changelog":"<missing>", "branch":"<missing>"}
-        cert_list = self.mtnrun("certs", rev).split('\n\n      key "')
-        for e in cert_list:
+        certlist = self.mtnrun("certs", rev)
+        # mtn < 0.45:
+        #   key "test@selenic.com"
+        # mtn >= 0.45:
+        #   key [ff58a7ffb771907c4ff68995eada1c4da068d328]
+        certlist = re.split('\n\n      key ["\[]', certlist)
+        for e in certlist:
             m = self.cert_re.match(e)
             if m:
                 name, value = m.groups()
--- a/hgext/convert/subversion.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/hgext/convert/subversion.py	Thu Nov 12 14:34:07 2009 -0600
@@ -8,6 +8,7 @@
 import cPickle as pickle
 import tempfile
 import urllib
+import urllib2
 
 from mercurial import strutil, util, encoding
 from mercurial.i18n import _
@@ -22,7 +23,6 @@
 from common import commandline, converter_source, converter_sink, mapfile
 
 try:
-    raise ImportError("SVN support disabled due to license incompatibility")
     from svn.core import SubversionException, Pool
     import svn
     import svn.client
@@ -137,7 +137,7 @@
 # Check to see if the given path is a local Subversion repo. Verify this by
 # looking for several svn-specific files and directories in the given
 # directory.
-def filecheck(path, proto):
+def filecheck(ui, path, proto):
     for x in ('locks', 'hooks', 'format', 'db', ):
         if not os.path.exists(os.path.join(path, x)):
             return False
@@ -146,15 +146,28 @@
 # Check to see if a given path is the root of an svn repo over http. We verify
 # this by requesting a version-controlled URL we know can't exist and looking
 # for the svn-specific "not found" XML.
-def httpcheck(path, proto):
-    return ('<m:human-readable errcode="160013">' in
-            urllib.urlopen('%s://%s/!svn/ver/0/.svn' % (proto, path)).read())
+def httpcheck(ui, path, proto):
+    try:
+        opener = urllib2.build_opener()
+        rsp = opener.open('%s://%s/!svn/ver/0/.svn' % (proto, path))
+        data = rsp.read()        
+    except urllib2.HTTPError, inst:
+        if inst.code != 404:
+            # Except for 404 we cannot know for sure this is not an svn repo
+            ui.warn(_('svn: cannot probe remote repository, assume it could be '
+                      'a subversion repository. Use --source if you know better.\n'))
+            return True
+        data = inst.fp.read()
+    except:
+        # Could be urllib2.URLError if the URL is invalid or anything else.
+        return False
+    return '<m:human-readable errcode="160013">' in data
 
 protomap = {'http': httpcheck,
             'https': httpcheck,
             'file': filecheck,
             }
-def issvnurl(url):
+def issvnurl(ui, url):
     try:
         proto, path = url.split('://', 1)
         if proto == 'file':
@@ -166,7 +179,7 @@
         path = path.replace(os.sep, '/')
     check = protomap.get(proto, lambda p, p2: False)
     while '/' in path:
-        if check(path, proto):
+        if check(ui, path, proto):
             return True
         path = path.rsplit('/', 1)[0]
     return False
@@ -192,7 +205,7 @@
         if not (url.startswith('svn://') or url.startswith('svn+ssh://') or
                 (os.path.exists(url) and
                  os.path.exists(os.path.join(url, '.svn'))) or
-                issvnurl(url)):
+                issvnurl(ui, url)):
             raise NoRepo("%s does not look like a Subversion repo" % url)
 
         try:
--- a/hgext/mq.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/hgext/mq.py	Thu Nov 12 14:34:07 2009 -0600
@@ -2090,7 +2090,8 @@
     With arguments, set guards for the named patch.
     NOTE: Specifying negative guards now requires '--'.
 
-    To set guards on another patch:
+    To set guards on another patch::
+
       hg qguard -- other.patch +2.6.17 -stable
     '''
     def status(idx):
@@ -2336,7 +2337,7 @@
     qselect to tell mq which guards to use. A patch will be pushed if
     it has no guards or any positive guards match the currently
     selected guard, but will not be pushed if any negative guards
-    match the current guard. For example:
+    match the current guard. For example::
 
         qguard foo.patch -stable    (negative guard)
         qguard bar.patch +stable    (positive guard)
--- a/hgext/pager.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/hgext/pager.py	Thu Nov 12 14:34:07 2009 -0600
@@ -35,10 +35,13 @@
   ignore = version, help, update
 
 You can also enable the pager only for certain commands using
-pager.attend::
+pager.attend. Below is the default list of commands to be paged::
 
   [pager]
-  attend = log
+  attend = annotate, cat, diff, export, glog, log, qdiff
+
+Setting pager.attend to an empty value will cause all commands to be
+paged.
 
 If pager.attend is present, pager.ignore will be ignored.
 
@@ -53,7 +56,7 @@
     def pagecmd(orig, ui, options, cmd, cmdfunc):
         p = ui.config("pager", "pager", os.environ.get("PAGER"))
         if p and sys.stdout.isatty() and '--debugger' not in sys.argv:
-            attend = ui.configlist('pager', 'attend')
+            attend = ui.configlist('pager', 'attend', attended)
             if (cmd in attend or
                 (cmd not in ui.configlist('pager', 'ignore') and not attend)):
                 sys.stderr = sys.stdout = util.popen(p, "wb")
@@ -62,3 +65,5 @@
         return orig(ui, options, cmd, cmdfunc)
 
     extensions.wrapfunction(dispatch, '_runcommand', pagecmd)
+
+attended = ['annotate', 'cat', 'diff', 'export', 'glog', 'log', 'qdiff']
--- a/hgext/patchbomb.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/hgext/patchbomb.py	Thu Nov 12 14:34:07 2009 -0600
@@ -451,7 +451,10 @@
             ui.status(_('Writing '), subj, ' ...\n')
             fp = open(opts.get('mbox'), 'In-Reply-To' in m and 'ab+' or 'wb+')
             generator = email.Generator.Generator(fp, mangle_from_=True)
-            date = time.ctime(start_time[0])
+            # Should be time.asctime(), but Windows prints 2-characters day
+            # of month instead of one. Make them print the same thing.
+            date = time.strftime('%a %b %d %H:%M:%S %Y',
+                                 time.localtime(start_time[0]))
             fp.write('From %s %s\n' % (sender_addr, date))
             generator.flatten(m, 0)
             fp.write('\n\n')
--- a/hgext/rebase.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/hgext/rebase.py	Thu Nov 12 14:34:07 2009 -0600
@@ -27,17 +27,19 @@
     oldancestor = ancestor.ancestor
 
     def newancestor(a, b, pfunc):
-        ancestor.ancestor = oldancestor
         if b == rev:
             return repo[rev].parents()[0].rev()
-        return ancestor.ancestor(a, b, pfunc)
+        return oldancestor(a, b, pfunc)
 
     if not first:
         ancestor.ancestor = newancestor
     else:
         repo.ui.debug("first revision, do not change ancestor\n")
-    stats = merge.update(repo, rev, True, True, False)
-    return stats
+    try:
+        stats = merge.update(repo, rev, True, True, False)
+        return stats
+    finally:
+        ancestor.ancestor = oldancestor
 
 def rebase(ui, repo, **opts):
     """move changeset (and descendants) to a different branch
--- a/hgext/record.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/hgext/record.py	Thu Nov 12 14:34:07 2009 -0600
@@ -275,7 +275,8 @@
         - ? (help)
         - q (quit)
 
-        else, input is returned to the caller.
+        Returns True/False and sets reps_all and resp_file as
+        appropriate.
         """
         if resp_all[0] is not None:
             return resp_all[0]
@@ -299,17 +300,17 @@
                     if l: ui.write(l.strip(), '\n')
                 continue
             elif r == 0: # yes
-                ret = 'y'
+                ret = True
             elif r == 1: # no
-                ret = 'n'
+                ret = False
             elif r == 2: # Skip
-                ret = resp_file[0] = 'n'
+                ret = resp_file[0] = False
             elif r == 3: # file (Record remaining)
-                ret = resp_file[0] = 'y'
+                ret = resp_file[0] = True
             elif r == 4: # done, skip remaining
-                ret = resp_all[0] = 'n'
+                ret = resp_all[0] = False
             elif r == 5: # all
-                ret = resp_all[0] = 'y'
+                ret = resp_all[0] = True
             elif r == 6: # quit
                 raise util.Abort(_('user quit'))
             return ret
@@ -330,7 +331,7 @@
                 chunk.pretty(ui)
             r = prompt(_('examine changes to %s?') %
                        _(' and ').join(map(repr, chunk.files())))
-            if r == _('y'):
+            if r:
                 applied[chunk.filename()] = [chunk]
                 if chunk.allhunks():
                     applied[chunk.filename()] += consumefile()
@@ -344,7 +345,7 @@
                                       chunk.filename()) \
                            or  prompt(_('record change %d/%d to %r?') %
                                       (pos, total, chunk.filename()))
-            if r == _('y'):
+            if r:
                 if fixoffset:
                     chunk = copy.copy(chunk)
                     chunk.toline += fixoffset
--- a/mercurial/commands.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/mercurial/commands.py	Thu Nov 12 14:34:07 2009 -0600
@@ -612,8 +612,8 @@
     by listing each changeset (tag, or branch name) with -r/--rev.
     If -r/--rev is used, the cloned repository will contain only a subset
     of the changesets of the source repository. Only the set of changesets
-    defined by all -r/--rev options (including their direct and indirect
-    parent changesets) will be pulled into the destination repository.
+    defined by all -r/--rev options (including all their ancestors)
+    will be pulled into the destination repository.
     No subsequent changesets (including subsequent tags) will be present
     in the destination.
 
@@ -1551,12 +1551,6 @@
             else:
                 ui.write(' %-*s   %s\n' % (m, f, util.wrap(h[f], m + 4)))
 
-        if name != 'shortlist':
-            exts, maxlength = extensions.enabled()
-            text = help.listexts(_('enabled extensions:'), exts, maxlength)
-            if text:
-                ui.write("\n%s\n" % minirst.format(text, textwidth))
-
         if not ui.quiet:
             addglobalopts(True)
 
@@ -1627,6 +1621,11 @@
             header = _('list of commands:\n\n')
 
         helplist(header)
+        if name != 'shortlist':
+            exts, maxlength = extensions.enabled()
+            text = help.listexts(_('enabled extensions:'), exts, maxlength)
+            if text:
+                ui.write("\n%s\n" % minirst.format(text, textwidth))
 
     # list all option lists
     opt_output = []
@@ -3149,11 +3148,13 @@
     The following rules apply when the working directory contains
     uncommitted changes:
 
-    1. If neither -c/--check nor -C/--clean is specified, uncommitted
-       changes are merged into the requested changeset, and the merged result
-       is left uncommitted. Updating and merging will occur only if the
-       requested changeset is an ancestor or descendant of the parent
-       changeset. Otherwise, the update is aborted and the uncommitted changes
+    1. If neither -c/--check nor -C/--clean is specified, and if
+       the requested changeset is an ancestor or descendant of
+       the working directory's parent, the uncommitted changes
+       are merged into the requested changeset and the merged
+       result is left uncommitted. If the requested changeset is
+       not an ancestor or descendant (that is, it is on another
+       branch), the update is aborted and the uncommitted changes
        are preserved.
 
     2. With the -c/--check option, the update is aborted and the
--- a/mercurial/context.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/mercurial/context.py	Thu Nov 12 14:34:07 2009 -0600
@@ -164,7 +164,11 @@
         """
         return the ancestor context of self and c2
         """
-        n = self._repo.changelog.ancestor(self._node, c2._node)
+        # deal with workingctxs
+        n2 = c2._node
+        if n2 == None:
+            n2 = c2._parents[0]._node
+        n = self._repo.changelog.ancestor(self._node, n2)
         return changectx(self._repo, n)
 
     def walk(self, match):
--- a/mercurial/dispatch.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/mercurial/dispatch.py	Thu Nov 12 14:34:07 2009 -0600
@@ -279,7 +279,8 @@
                 raise IndexError
             ui.setconfig(section, name, value)
         except (IndexError, ValueError):
-            raise util.Abort(_('malformed --config option: %s') % cfg)
+            raise util.Abort(_('malformed --config option: %r '
+                               '(use --config section.name=value)') % cfg)
 
 def _earlygetopt(aliases, args):
     """Return list of values for an option (or aliases).
--- a/mercurial/hgweb/hgweb_mod.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/mercurial/hgweb/hgweb_mod.py	Thu Nov 12 14:34:07 2009 -0600
@@ -237,14 +237,17 @@
         # figure out which style to use
 
         vars = {}
-        style = self.config("web", "style", "paper")
-        if 'style' in req.form:
-            style = req.form['style'][0]
+        styles = (
+            req.form.get('style', [None])[0],
+            self.config('web', 'style'),
+            'paper',
+        )
+        style, mapfile = templater.stylemap(styles, self.templatepath)
+        if style == styles[0]:
             vars['style'] = style
 
         start = req.url[-1] == '?' and '&' or '?'
         sessionvars = webutil.sessionvars(vars, start)
-        mapfile = templater.stylemap(style, self.templatepath)
 
         if not self.reponame:
             self.reponame = (self.config("web", "name")
--- a/mercurial/hgweb/hgwebdir_mod.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/mercurial/hgweb/hgwebdir_mod.py	Thu Nov 12 14:34:07 2009 -0600
@@ -315,18 +315,21 @@
             url += '/'
 
         vars = {}
-        style = self.style
-        if 'style' in req.form:
-            vars['style'] = style = req.form['style'][0]
+        styles = (
+            req.form.get('style', [None])[0],
+            config('web', 'style'),
+            'paper'
+        )
+        style, mapfile = templater.stylemap(styles)
+        if style == styles[0]:
+            vars['style'] = style
+        
         start = url[-1] == '?' and '&' or '?'
         sessionvars = webutil.sessionvars(vars, start)
-
         staticurl = config('web', 'staticurl') or url + 'static/'
         if not staticurl.endswith('/'):
             staticurl += '/'
 
-        style = 'style' in req.form and req.form['style'][0] or self.style
-        mapfile = templater.stylemap(style)
         tmpl = templater.templater(mapfile,
                                    defaults={"header": header,
                                              "footer": footer,
--- a/mercurial/localrepo.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/mercurial/localrepo.py	Thu Nov 12 14:34:07 2009 -0600
@@ -1564,7 +1564,8 @@
 
         if revs is None:
             # use the fast path, no race possible on push
-            cg = self._changegroup(common.keys(), 'push')
+            nodes = self.changelog.findmissing(common.keys())
+            cg = self._changegroup(nodes, 'push')
         else:
             cg = self.changegroupsubset(update, revs, 'push')
         return cg, remote_heads
@@ -1622,28 +1623,26 @@
         the linkrev.
         """
 
+        # Set up some initial variables
+        # Make it easy to refer to self.changelog
+        cl = self.changelog
+        # msng is short for missing - compute the list of changesets in this
+        # changegroup.
+        if not bases:
+            bases = [nullid]
+        msng_cl_lst, bases, heads = cl.nodesbetween(bases, heads)
+
         if extranodes is None:
             # can we go through the fast path ?
             heads.sort()
             allheads = self.heads()
             allheads.sort()
             if heads == allheads:
-                common = []
-                # parents of bases are known from both sides
-                for n in bases:
-                    for p in self.changelog.parents(n):
-                        if p != nullid:
-                            common.append(p)
-                return self._changegroup(common, source)
+                return self._changegroup(msng_cl_lst, source)
 
+        # slow path
         self.hook('preoutgoing', throw=True, source=source)
 
-        # Set up some initial variables
-        # Make it easy to refer to self.changelog
-        cl = self.changelog
-        # msng is short for missing - compute the list of changesets in this
-        # changegroup.
-        msng_cl_lst, bases, heads = cl.nodesbetween(bases, heads)
         self.changegroupinfo(msng_cl_lst, source)
         # Some bases may turn out to be superfluous, and some heads may be
         # too.  nodesbetween will return the minimal set of bases and heads
@@ -1903,7 +1902,7 @@
         # to avoid a race we use changegroupsubset() (issue1320)
         return self.changegroupsubset(basenodes, self.heads(), source)
 
-    def _changegroup(self, common, source):
+    def _changegroup(self, nodes, source):
         """Compute the changegroup of all nodes that we have that a recipient
         doesn't.  Return a chunkbuffer object whose read() method will return
         successive changegroup chunks.
@@ -1911,12 +1910,11 @@
         This is much easier than the previous function as we can assume that
         the recipient has any changenode we aren't sending them.
 
-        common is the set of common nodes between remote and self"""
+        nodes is the set of nodes to send"""
 
         self.hook('preoutgoing', throw=True, source=source)
 
         cl = self.changelog
-        nodes = cl.findmissing(common)
         revset = set([cl.rev(n) for n in nodes])
         self.changegroupinfo(nodes, source)
 
--- a/mercurial/mdiff.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/mercurial/mdiff.py	Thu Nov 12 14:34:07 2009 -0600
@@ -57,13 +57,13 @@
 
 defaultopts = diffopts()
 
-def wsclean(opts, text):
+def wsclean(opts, text, blank=True):
     if opts.ignorews:
         text = re.sub('[ \t]+', '', text)
     elif opts.ignorewsamount:
         text = re.sub('[ \t]+', ' ', text)
         text = re.sub('[ \t]+\n', '\n', text)
-    if opts.ignoreblanklines:
+    if blank and opts.ignoreblanklines:
         text = re.sub('\n+', '', text)
     return text
 
@@ -183,6 +183,10 @@
     # below finds the spaces between those matching sequences and translates
     # them into diff output.
     #
+    if opts.ignorews or opts.ignorewsamount:
+        t1 = wsclean(opts, t1, False)
+        t2 = wsclean(opts, t2, False)
+
     diff = bdiff.blocks(t1, t2)
     hunk = None
     for i, s1 in enumerate(diff):
@@ -208,7 +212,7 @@
         if not old and not new:
             continue
 
-        if opts.ignorews or opts.ignorewsamount or opts.ignoreblanklines:
+        if opts.ignoreblanklines:
             if wsclean(opts, "".join(old)) == wsclean(opts, "".join(new)):
                 continue
 
--- a/mercurial/templater.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/mercurial/templater.py	Thu Nov 12 14:34:07 2009 -0600
@@ -220,7 +220,7 @@
 
     return normpaths
 
-def stylemap(style, paths=None):
+def stylemap(styles, paths=None):
     """Return path to mapfile for a given style.
 
     Searches mapfile in the following locations:
@@ -234,12 +234,20 @@
     elif isinstance(paths, str):
         paths = [paths]
 
-    locations = style and [os.path.join(style, "map"), "map-" + style] or []
-    locations.append("map")
-    for path in paths:
-        for location in locations:
-            mapfile = os.path.join(path, location)
-            if os.path.isfile(mapfile):
-                return mapfile
+    if isinstance(styles, str):
+        styles = [styles]
+
+    for style in styles:
+    	
+        if not style:
+            continue
+        locations = [os.path.join(style, 'map'), 'map-' + style]
+        locations.append('map')
+
+        for path in paths:
+            for location in locations:
+                mapfile = os.path.join(path, location)
+                if os.path.isfile(mapfile):
+                    return style, mapfile
 
     raise RuntimeError("No hgweb templates found in %r" % paths)
--- a/setup.py	Thu Nov 12 16:51:32 2009 -0200
+++ b/setup.py	Thu Nov 12 14:34:07 2009 -0600
@@ -97,7 +97,7 @@
 except ImportError:
     pass
 
-def runcmd(cmd):
+def runcmd(cmd, env):
     p = subprocess.Popen(cmd, stdout=subprocess.PIPE,
                          stderr=subprocess.PIPE, env=env)
     out, err = p.communicate()
@@ -127,7 +127,7 @@
         # error 0xc0150004. See: http://bugs.python.org/issue3440
         env['SystemRoot'] = os.environ['SystemRoot']
     cmd = [sys.executable, 'hg', 'id', '-i', '-t']
-    l = runcmd(cmd).split()
+    l = runcmd(cmd, env).split()
     while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags
         l.pop()
     if len(l) > 1: # tag found
@@ -137,7 +137,7 @@
     elif len(l) == 1: # no tag found
         cmd = [sys.executable, 'hg', 'parents', '--template',
                '{latesttag}+{latesttagdistance}-']
-        version = runcmd(cmd) + l[0]
+        version = runcmd(cmd, env) + l[0]
     if version.endswith('+'):
         version += time.strftime('%Y%m%d')
 elif os.path.exists('.hg_archival.txt'):
--- a/tests/hghave	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/hghave	Thu Nov 12 14:34:07 2009 -0600
@@ -121,14 +121,15 @@
     return matchoutput('git --version 2>&1', r'^git version')
 
 def has_rst2html():
-    return matchoutput('rst2html --version 2>&1', r'^rst2html \(Docutils') or \
-        matchoutput('rst2html.py --version 2>&1', r'^rst2html.py \(Docutils')
+    for name in ('rst2html', 'rst2html.py'):
+        name = name + ' --version 2>&1'
+        if matchoutput(name, r'^rst2html(?:\.py)? \(Docutils'):
+            return True
+    return False
 
 def has_svn():
-    #return matchoutput('svn --version 2>&1', r'^svn, version') and \
-        #matchoutput('svnadmin --version 2>&1', r'^svnadmin, version')
-    # disabled until licensing issue is resolved
-    return False
+    return matchoutput('svn --version 2>&1', r'^svn, version') and \
+        matchoutput('svnadmin --version 2>&1', r'^svnadmin, version')
 
 def has_svn_bindings():
     try:
--- a/tests/test-bundle	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-bundle	Thu Nov 12 14:34:07 2009 -0600
@@ -146,4 +146,23 @@
 hg -R ../all.hg diff -r tip
 cd ..
 
+echo "====== bundle single branch"
+hg init branchy
+cd branchy
+echo a >a
+hg ci -Ama
+echo b >b
+hg ci -Amb
+echo b1 >b1
+hg ci -Amb1
+hg up 0
+echo c >c
+hg ci -Amc
+echo c1 >c1
+hg ci -Amc1
+hg clone -q .#tip part
+echo "== bundling via incoming"
+hg in -R part --bundle incoming.hg --template "{node}\n" .
+echo "== bundling"
+hg bundle bundle.hg part --debug
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-bundle-vs-outgoing	Thu Nov 12 14:34:07 2009 -0600
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+# this structure seems to tickle a bug in bundle's search for
+# changesets, so first we have to recreate it
+#
+# o  8
+# |
+# | o  7
+# | |
+# | o  6
+# |/|
+# o |  5
+# | |
+# o |  4
+# | |
+# | o  3
+# | |
+# | o  2
+# |/
+# o  1
+# |
+# o  0
+
+mkrev()
+{
+    revno=$1
+    echo "rev $revno"
+    echo "rev $revno" > foo.txt
+    hg -q ci -m"rev $revno"
+}
+
+set -e
+echo "% setup test repo1"
+hg init repo1
+cd repo1
+echo "rev 0" > foo.txt
+hg ci -Am"rev 0"
+mkrev 1
+
+# first branch
+mkrev 2
+mkrev 3
+
+# back to rev 1 to create second branch
+hg up -r1
+mkrev 4
+mkrev 5
+
+# merge first branch to second branch
+hg up -C -r5
+HGMERGE=internal:local hg merge
+echo "merge rev 5, rev 3" > foo.txt
+hg ci -m"merge first branch to second branch"
+
+# one more commit following the merge
+mkrev 7
+
+# back to "second branch" to make another head
+hg up -r5
+mkrev 8
+
+echo "[extensions]" >> $HGRCPATH
+echo "graphlog=" >> $HGRCPATH
+
+echo "% the story so far"
+hg glog --template "{rev}\n"
+
+# check that "hg outgoing" really does the right thing
+echo "% sanity check of outgoing: expect revs 4 5 6 7 8"
+hg clone -r3 . ../repo2
+# this should (and does) report 5 outgoing revisions: 4 5 6 7 8
+hg outgoing --template "{rev}\n" ../repo2
+
+echo "% test bundle (destination repo): expect 5 revisions"
+# this should bundle the same 5 revisions that outgoing reported, but it
+# actually bundles 7
+hg bundle foo.bundle ../repo2
+
+echo "% test bundle (base revision): expect 5 revisions"
+# this should (and does) give exactly the same result as bundle
+# with a destination repo... i.e. it's wrong too
+hg bundle --base 3 foo.bundle
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-bundle-vs-outgoing.out	Thu Nov 12 14:34:07 2009 -0600
@@ -0,0 +1,53 @@
+% setup test repo1
+adding foo.txt
+rev 1
+rev 2
+rev 3
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+rev 4
+rev 5
+0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+0 files updated, 1 files merged, 0 files removed, 0 files unresolved
+(branch merge, don't forget to commit)
+rev 7
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+rev 8
+% the story so far
+@  8
+|
+| o  7
+| |
+| o  6
+|/|
+o |  5
+| |
+o |  4
+| |
+| o  3
+| |
+| o  2
+|/
+o  1
+|
+o  0
+
+% sanity check of outgoing: expect revs 4 5 6 7 8
+requesting all changes
+adding changesets
+adding manifests
+adding file changes
+added 4 changesets with 4 changes to 1 files
+updating to branch default
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+comparing with ../repo2
+searching for changes
+4
+5
+6
+7
+8
+% test bundle (destination repo): expect 5 revisions
+searching for changes
+5 changesets found
+% test bundle (base revision): expect 5 revisions
+5 changesets found
--- a/tests/test-bundle.out	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-bundle.out	Thu Nov 12 14:34:07 2009 -0600
@@ -326,3 +326,23 @@
 -1
 -2
 -3
+====== bundle single branch
+adding a
+adding b
+adding b1
+0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+adding c
+created new head
+adding c1
+== bundling via incoming
+comparing with .
+searching for changes
+d2ae7f538514cd87c17547b0de4cea71fe1af9fb
+5ece8e77363e2b5269e27c66828b72da29e4341a
+== bundling
+searching for changes
+common changesets up to c0025332f9ed
+2 changesets found
+list of changesets:
+d2ae7f538514cd87c17547b0de4cea71fe1af9fb
+5ece8e77363e2b5269e27c66828b72da29e4341a
--- a/tests/test-convert-hg-svn.out	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-convert-hg-svn.out	Thu Nov 12 14:34:07 2009 -0600
@@ -19,7 +19,7 @@
 sorting...
 converting...
 % new hg rev
-updating working directory
+updating to branch default
 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 % echo hg to svn
 scanning source...
--- a/tests/test-diff-ignore-whitespace.out	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-diff-ignore-whitespace.out	Thu Nov 12 14:34:07 2009 -0600
@@ -181,11 +181,9 @@
 --- a/foo
 +++ b/foo
 @@ -1,2 +1,3 @@
--hello world
--goodbye world
-+hello  world
+ hello world
 + 	
-+goodbye world 
+ goodbye world
 hg diff -Bb
 >>> four diffs showing changed whitespace <<<
 hg diff
@@ -212,18 +210,16 @@
 +++ b/foo
 @@ -1,2 +1,2 @@
 -hello world
--goodbye world
 +helloworld
-+goodbye	world 
+ goodbye world
 hg diff -Bb
 diff -r 540c40a65b78 foo
 --- a/foo
 +++ b/foo
 @@ -1,2 +1,2 @@
 -hello world
--goodbye world
 +helloworld
-+goodbye	world 
+ goodbye world
 hg diff -w
 >>> five diffs showing changed whitespace <<<
 hg diff
@@ -256,34 +252,30 @@
 +++ b/foo
 @@ -1,2 +1,5 @@
 -hello world
--goodbye world
 +helloworld
 +
 +
 +
-+goodbye	world 
+ goodbye world
 hg diff -Bb
 diff -r 540c40a65b78 foo
 --- a/foo
 +++ b/foo
 @@ -1,2 +1,5 @@
 -hello world
--goodbye world
 +helloworld
 +
 +
 +
-+goodbye	world 
+ goodbye world
 hg diff -w
 diff -r 540c40a65b78 foo
 --- a/foo
 +++ b/foo
 @@ -1,2 +1,5 @@
--hello world
--goodbye world
-+helloworld
+ hello world
 +
 +
 +
-+goodbye	world 
+ goodbye world
 hg diff -wB
--- a/tests/test-extension.out	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-extension.out	Thu Nov 12 14:34:07 2009 -0600
@@ -50,10 +50,6 @@
  foo:
       yet another foo command
 
-enabled extensions:
-
- debugextension   only debugcommands
-
 global options:
  -R --repository      repository root directory or name of overlay bundle file
     --cwd             change working directory
@@ -80,10 +76,6 @@
  foo:
       yet another foo command
 
-enabled extensions:
-
- debugextension   only debugcommands
-
 global options:
  -R --repository      repository root directory or name of overlay bundle file
     --cwd             change working directory
--- a/tests/test-globalopts.out	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-globalopts.out	Thu Nov 12 14:34:07 2009 -0600
@@ -107,11 +107,11 @@
 
 %% --config
 quuxfoo
-abort: malformed --config option: 
-abort: malformed --config option: a.b
-abort: malformed --config option: a
-abort: malformed --config option: a.=
-abort: malformed --config option: .b=
+abort: malformed --config option: '' (use --config section.name=value)
+abort: malformed --config option: 'a.b' (use --config section.name=value)
+abort: malformed --config option: 'a' (use --config section.name=value)
+abort: malformed --config option: 'a.=' (use --config section.name=value)
+abort: malformed --config option: '.b=' (use --config section.name=value)
 %% --debug
 changeset:   1:b6c483daf2907ce5825c0bb50f5716226281cc1a
 tag:         tip
--- a/tests/test-hgweb	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-hgweb	Thu Nov 12 14:34:07 2009 -0600
@@ -7,8 +7,10 @@
 echo foo > da/foo
 echo foo > foo
 hg ci -Ambase
+
 hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
 cat hg.pid >> $DAEMON_PIDS
+
 echo % manifest
 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw')
 ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/da?style=raw')
@@ -30,6 +32,9 @@
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork'
 "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/bork?style=raw'
 
+echo % try bad style
+("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=foobar')
+
 echo % stop and restart
 "$TESTDIR/killdaemons.py"
 hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
--- a/tests/test-hgweb.out	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-hgweb.out	Thu Nov 12 14:34:07 2009 -0600
@@ -148,8 +148,96 @@
 
 
 error: bork@2ef0ac749a14: not found in manifest
+% try bad style
+200 Script output follows
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
+<head>
+<link rel="icon" href="/static/hgicon.png" type="image/png" />
+<meta name="robots" content="index, nofollow" />
+<link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
+
+<title>test: 2ef0ac749a14 /</title>
+</head>
+<body>
+
+<div class="container">
+<div class="menu">
+<div class="logo">
+<a href="http://mercurial.selenic.com/">
+<img src="/static/hglogo.png" alt="mercurial" /></a>
+</div>
+<ul>
+<li><a href="/shortlog/2ef0ac749a14">log</a></li>
+<li><a href="/graph/2ef0ac749a14">graph</a></li>
+<li><a href="/tags">tags</a></li>
+<li><a href="/branches">branches</a></li>
+</ul>
+<ul>
+<li><a href="/rev/2ef0ac749a14">changeset</a></li>
+<li class="active">browse</li>
+</ul>
+<ul>
+
+</ul>
+</div>
+
+<div class="main">
+<h2><a href="/">test</a></h2>
+<h3>directory / @ 0:2ef0ac749a14 <span class="tag">tip</span> </h3>
+
+<form class="search" action="/log">
+
+<p><input name="rev" id="search1" type="text" size="30" /></p>
+<div id="hint">find changesets by author, revision,
+files, or words in the commit message</div>
+</form>
+
+<table class="bigtable">
+<tr>
+  <th class="name">name</th>
+  <th class="size">size</th>
+  <th class="permissions">permissions</th>
+</tr>
+<tr class="fileline parity0">
+  <td class="name"><a href="/file/2ef0ac749a14/">[up]</a></td>
+  <td class="size"></td>
+  <td class="permissions">drwxr-xr-x</td>
+</tr>
+
+<tr class="fileline parity1">
+<td class="name">
+<a href="/file/2ef0ac749a14/da">
+<img src="/static/coal-folder.png" alt="dir."/> da/
+</a>
+<a href="/file/2ef0ac749a14/da/">
+
+</a>
+</td>
+<td class="size"></td>
+<td class="permissions">drwxr-xr-x</td>
+</tr>
+
+<tr class="fileline parity0">
+<td class="filename">
+<a href="/file/2ef0ac749a14/foo">
+<img src="/static/coal-file.png" alt="file"/> foo
+</a>
+</td>
+<td class="size">4</td>
+<td class="permissions">-rw-r--r--</td>
+</tr>
+</table>
+</div>
+</div>
+
+
+</body>
+</html>
+
 % stop and restart
-9 log lines written
+10 log lines written
 % static file
 200 Script output follows
 
--- a/tests/test-mq-qdiff.out	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-mq-qdiff.out	Thu Nov 12 14:34:07 2009 -0600
@@ -58,9 +58,8 @@
  2
  3
  4
--hello world
+ hello world
 -goodbye world
-+hello  world
 +     goodbye world
  7
  8
--- a/tests/test-mq.out	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-mq.out	Thu Nov 12 14:34:07 2009 -0600
@@ -50,10 +50,6 @@
  qunapplied   print the patches not yet applied
  strip        strip a revision and all its descendants from the repository
 
-enabled extensions:
-
- mq   manage a stack of patches
-
 use "hg -v help mq" to show aliases and global options
 adding a
 updating to branch default
--- a/tests/test-notify.out	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-notify.out	Thu Nov 12 14:34:07 2009 -0600
@@ -174,7 +174,7 @@
 adding changesets
 adding manifests
 adding file changes
-added 2 changesets with 0 changes to 1 files
+added 2 changesets with 0 changes to 0 files
 Content-Type: text/plain; charset="us-ascii"
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
--- a/tests/test-patchbomb.out	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-patchbomb.out	Thu Nov 12 14:34:07 2009 -0600
@@ -163,7 +163,7 @@
 
 
 Writing [PATCH] charset=utf-8; content-transfer-encoding: base64 ...
-From quux Thu Jan  1 00:04:01 1970
+From quux Thu Jan 01 00:04:01 1970
 Content-Type: text/plain; charset="utf-8"
 MIME-Version: 1.0
 Content-Transfer-Encoding: base64
@@ -198,7 +198,7 @@
 
 
 Writing [PATCH] charset=utf-8; content-transfer-encoding: quoted-printable ...
-From quux Thu Jan  1 00:04:01 1970
+From quux Thu Jan 01 00:04:01 1970
 Content-Type: text/plain; charset="us-ascii"
 MIME-Version: 1.0
 Content-Transfer-Encoding: quoted-printable
@@ -249,7 +249,7 @@
 
 Writing [PATCH] charset=us-ascii; content-transfer-encoding: 8bit ...
 % md5sum of 8-bit output
-0920ef519c29b6a1742047ad9f203fc5  mboxfix
+9ea043d8fc43a71045114508baed144b  mboxfix
 % test diffstat for single patch
 This patch series consists of 1 patches.
 
@@ -1474,7 +1474,7 @@
 
 
 Writing [PATCH] test ...
-From quux Tue Jan  1 00:01:01 1980
+From quux Tue Jan 01 00:01:01 1980
 Content-Type: text/plain; charset="us-ascii"
 MIME-Version: 1.0
 Content-Transfer-Encoding: 7bit
--- a/tests/test-rebase-collapse	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-rebase-collapse	Thu Nov 12 14:34:07 2009 -0600
@@ -130,12 +130,7 @@
 
 echo
 echo '% Rebase and collapse - E onto I'
-hg rebase -s 4 --collapse 
-
-echo '% Fix conflict and continue'
-echo 'Resolved merge' > E
-hg resolve -m E
-hg rebase -c 2>&1 | sed 's/\(saving bundle to \).*/\1/'
+hg rebase -s 4 --collapse 2>&1 | sed 's/\(saving bundle to \).*/\1/'
 
 hg glog  --template '{rev}: {desc}\n'
 
--- a/tests/test-rebase-collapse.out	Thu Nov 12 16:51:32 2009 -0200
+++ b/tests/test-rebase-collapse.out	Thu Nov 12 14:34:07 2009 -0600
@@ -145,10 +145,6 @@
 
 % Rebase and collapse - E onto I
 merging E
-warning: conflicts during merge.
-merging E failed!
-abort: fix unresolved conflicts with hg resolve then run hg rebase --continue
-% Fix conflict and continue
 saving bundle to 
 adding branch
 adding changesets
@@ -179,7 +175,7 @@
 G
 I
 Cat E:
-Resolved merge
+F
 
 @  5: F
 |
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-rebase-newancestor	Thu Nov 12 14:34:07 2009 -0600
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+echo "[extensions]" >> $HGRCPATH
+echo "graphlog=" >> $HGRCPATH
+echo "rebase=" >> $HGRCPATH
+
+rm -rf repo
+hg init repo
+cd repo
+
+echo A > a
+echo >> a
+hg commit -AmA -u test -d '0 0'
+
+echo B > a
+echo >> a
+hg commit -mB -u test -d '1 0'
+
+echo C > a
+echo >> a
+hg commit -mC -u test -d '2 0'
+
+hg up -C 0
+echo D >> a
+hg commit -AmAD -u test -d '3 0'
+
+hg glog --template '{rev}:{desc} {node|short}\n'
+hg rebase -q -s 1 -d 3 2>&1 | grep -v 'saving bundle'
+hg glog --template '{rev}:{desc} {node|short}\n'
+
+exit 0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-rebase-newancestor.out	Thu Nov 12 14:34:07 2009 -0600
@@ -0,0 +1,19 @@
+adding a
+1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+created new head
+@  3:AD 1d4e82ed3c2a
+|
+| o  2:C 7e1afe9214b2
+| |
+| o  1:B 0a6620c3c26a
+|/
+o  0:A 1e635d440a73
+
+@  3:C 0c5887756284
+|
+o  2:B 4f208f4a1507
+|
+o  1:AD 1d4e82ed3c2a
+|
+o  0:A 1e635d440a73
+