changeset 17757:fec69c72e2b4

merge with durin42
author Matt Mackall <mpm@selenic.com>
date Fri, 12 Oct 2012 15:52:59 -0500
parents 92980a8dfdfe (diff) bb6149f1db83 (current diff)
children 5863f0e4cd3a
files hgext/histedit.py
diffstat 33 files changed, 664 insertions(+), 384 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/lock-checker.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/contrib/lock-checker.py	Fri Oct 12 15:52:59 2012 -0500
@@ -35,7 +35,7 @@
             return orig.transaction(self, *args, **kwargs)
 
         # TODO(durin42): kiilerix had a commented-out lock check in
-        # writebranchcache and _writerequirements
+        # _writebranchcache and _writerequirements
 
         def _tag(self, *args, **kwargs):
             _checklock(self)
--- a/hgext/histedit.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/hgext/histedit.py	Fri Oct 12 15:52:59 2012 -0500
@@ -205,7 +205,7 @@
         - message
         - date
         - username
-    Edition of commit message is trigered in all case.
+    Commit message is edited in all cases.
 
     This function works in memory."""
     ctxs = list(repo.set('%d::%d', first, last))
--- a/hgext/keyword.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/hgext/keyword.py	Fri Oct 12 15:52:59 2012 -0500
@@ -117,7 +117,7 @@
 def utcdate(text):
     ''':utcdate: Date. Returns a UTC-date in this format: "2009/08/18 11:00:13".
     '''
-    return util.datestr((text[0], 0), '%Y/%m/%d %H:%M:%S')
+    return util.datestr((util.parsedate(text)[0], 0), '%Y/%m/%d %H:%M:%S')
 # date like in svn's $Date
 def svnisodate(text):
     ''':svnisodate: Date. Returns a date in this format: "2009-08-18 13:00:13
@@ -129,7 +129,7 @@
     ''':svnutcdate: Date. Returns a UTC-date in this format: "2009-08-18
     11:00:13Z".
     '''
-    return util.datestr((text[0], 0), '%Y-%m-%d %H:%M:%SZ')
+    return util.datestr((util.parsedate(text)[0], 0), '%Y-%m-%d %H:%M:%SZ')
 
 templatefilters.filters.update({'utcdate': utcdate,
                                 'svnisodate': svnisodate,
--- a/hgext/notify.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/hgext/notify.py	Fri Oct 12 15:52:59 2012 -0500
@@ -30,17 +30,22 @@
 multiple recipients to a single repository::
 
   [usersubs]
-  # key is subscriber email, value is a comma-separated list of repo glob
-  # patterns
+  # key is subscriber email, value is a comma-separated list of repo patterns
   user@host = pattern
 
   [reposubs]
-  # key is glob pattern, value is a comma-separated list of subscriber
-  # emails
+  # key is repo pattern, value is a comma-separated list of subscriber emails
   pattern = user@host
 
-Glob patterns are matched against absolute path to repository
-root.
+A ``pattern`` is a ``glob`` matching the absolute path to a repository,
+optionally combined with a revset expression. A revset expression, if
+present, is separated from the glob by a hash. Example::
+
+  [reposubs]
+  */widgets#branch(release) = qa-team@example.com
+
+This sends to ``qa-team@example.com`` whenever a changeset on the ``release``
+branch triggers a notification in any repository ending in ``widgets``.
 
 In order to place them under direct user management, ``[usersubs]`` and
 ``[reposubs]`` sections may be placed in a separate ``hgrc`` file and
@@ -217,14 +222,22 @@
         subs = set()
         for user, pats in self.ui.configitems('usersubs'):
             for pat in pats.split(','):
+                if '#' in pat:
+                    pat, revs = pat.split('#', 1)
+                else:
+                    revs = None
                 if fnmatch.fnmatch(self.repo.root, pat.strip()):
-                    subs.add(self.fixmail(user))
+                    subs.add((self.fixmail(user), revs))
         for pat, users in self.ui.configitems('reposubs'):
+            if '#' in pat:
+                pat, revs = pat.split('#', 1)
+            else:
+                revs = None
             if fnmatch.fnmatch(self.repo.root, pat):
                 for user in users.split(','):
-                    subs.add(self.fixmail(user))
-        return [mail.addressencode(self.ui, s, self.charsets, self.test)
-                for s in sorted(subs)]
+                    subs.add((self.fixmail(user), revs))
+        return [(mail.addressencode(self.ui, s, self.charsets, self.test), r)
+                for s, r in sorted(subs)]
 
     def node(self, ctx, **props):
         '''format one changeset, unless it is a suppressed merge.'''
@@ -243,6 +256,21 @@
     def send(self, ctx, count, data):
         '''send message.'''
 
+        # Select subscribers by revset
+        subs = set()
+        for sub, spec in self.subs:
+            if spec is None:
+                subs.add(sub)
+                continue
+            revs = self.repo.revs('%r and %d:', spec, ctx.rev())
+            if len(revs):
+                subs.add(sub)
+                continue
+        if len(subs) == 0:
+            self.ui.debug('notify: no subscribers to selected repo '
+                          'and revset\n')
+            return
+
         p = email.Parser.Parser()
         try:
             msg = p.parsestr(data)
@@ -292,7 +320,7 @@
             msg['Message-Id'] = ('<hg.%s.%s.%s@%s>' %
                                  (ctx, int(time.time()),
                                   hash(self.repo.root), socket.getfqdn()))
-        msg['To'] = ', '.join(self.subs)
+        msg['To'] = ', '.join(sorted(subs))
 
         msgtext = msg.as_string()
         if self.test:
@@ -301,9 +329,9 @@
                 self.ui.write('\n')
         else:
             self.ui.status(_('notify: sending %d subscribers %d changes\n') %
-                           (len(self.subs), count))
+                           (len(subs), count))
             mail.sendmail(self.ui, util.email(msg['From']),
-                          self.subs, msgtext, mbox=self.mbox)
+                          subs, msgtext, mbox=self.mbox)
 
     def diff(self, ctx, ref=None):
 
--- a/mercurial/bookmarks.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/mercurial/bookmarks.py	Fri Oct 12 15:52:59 2012 -0500
@@ -264,7 +264,7 @@
         return True
     elif repo.obsstore:
         # We only need this complicated logic if there is obsolescence
-        # XXX will probably deserve an optimised rset.
+        # XXX will probably deserve an optimised revset.
 
         validdests = set([old])
         plen = -1
--- a/mercurial/cmdutil.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/mercurial/cmdutil.py	Fri Oct 12 15:52:59 2012 -0500
@@ -1111,6 +1111,17 @@
                 wanted.add(rev)
                 if copied:
                     copies.append(copied)
+
+        # We decided to fall back to the slowpath because at least one
+        # of the paths was not a file. Check to see if at least one of them
+        # existed in history, otherwise simply return
+        if slowpath:
+            for path in match.files():
+                if path == '.' or path in repo.store:
+                    break
+                else:
+                    return []
+
     if slowpath:
         # We have to read the changelog to match filenames against
         # changed files
@@ -1286,6 +1297,18 @@
                     raise util.Abort(
                         _('cannot follow nonexistent file: "%s"') % f)
                 slowpath = True
+
+        # We decided to fall back to the slowpath because at least one
+        # of the paths was not a file. Check to see if at least one of them
+        # existed in history - in that case, we'll continue down the
+        # slowpath; otherwise, we can turn off the slowpath
+        if slowpath:
+            for path in match.files():
+                if path == '.' or path in repo.store:
+                    break
+            else:
+                slowpath = False
+
     if slowpath:
         # See walkchangerevs() slow path.
         #
--- a/mercurial/commands.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/mercurial/commands.py	Fri Oct 12 15:52:59 2012 -0500
@@ -846,6 +846,12 @@
             raise util.Abort(_("bookmark name required"))
         if len(marks) == 0:
             ui.status(_("no bookmarks set\n"))
+        if inactive:
+            if not repo._bookmarkcurrent:
+                ui.status(_("no active bookmark\n"))
+            else:
+                bookmarks.setcurrent(repo, None)
+            return
         else:
             for bmark, n in sorted(marks.iteritems()):
                 current = repo._bookmarkcurrent
--- a/mercurial/hg.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/mercurial/hg.py	Fri Oct 12 15:52:59 2012 -0500
@@ -336,6 +336,16 @@
 
             destlock = copystore(ui, srcrepo, destpath)
 
+            # Recomputing branch cache might be slow on big repos,
+            # so just copy it
+            dstcachedir = os.path.join(destpath, 'cache')
+            srcbranchcache = srcrepo.sjoin('cache/branchheads')
+            dstbranchcache = os.path.join(dstcachedir, 'branchheads')
+            if os.path.exists(srcbranchcache):
+                if not os.path.exists(dstcachedir):
+                    os.mkdir(dstcachedir)
+                util.copyfile(srcbranchcache, dstbranchcache)
+
             # we need to re-init the repo after manually copying the data
             # into it
             destpeer = peer(ui, peeropts, dest)
@@ -399,7 +409,7 @@
             if update:
                 if update is not True:
                     checkout = srcpeer.lookup(update)
-                for test in (checkout, 'default', 'tip'):
+                for test in (checkout, '@', 'default', 'tip'):
                     if test is None:
                         continue
                     try:
--- a/mercurial/localrepo.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/mercurial/localrepo.py	Fri Oct 12 15:52:59 2012 -0500
@@ -2472,6 +2472,12 @@
     def stream_in(self, remote, requirements):
         lock = self.lock()
         try:
+            # Save remote branchmap. We will use it later
+            # to speed up branchcache creation
+            rbranchmap = None
+            if remote.capable("branchmap"):
+                rbranchmap = remote.branchmap()
+
             fp = remote.stream_out()
             l = fp.readline()
             try:
@@ -2532,6 +2538,17 @@
             self._applyrequirements(requirements)
             self._writerequirements()
 
+            if rbranchmap:
+                rbheads = []
+                for bheads in rbranchmap.itervalues():
+                    rbheads.extend(bheads)
+
+                self.branchcache = rbranchmap
+                if rbheads:
+                    rtiprev = max((int(self.changelog.rev(node))
+                            for node in rbheads))
+                    self._writebranchcache(self.branchcache,
+                            self[rtiprev].node(), rtiprev)
             self.invalidate()
             return len(self.heads()) + 1
         finally:
--- a/mercurial/revset.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/mercurial/revset.py	Fri Oct 12 15:52:59 2012 -0500
@@ -918,6 +918,25 @@
     cl = repo.changelog
     return [r for r in subset if cl.parentrevs(r)[1] != -1]
 
+def branchpoint(repo, subset, x):
+    """``branchpoint()``
+    Changesets with more than one child.
+    """
+    # i18n: "branchpoint" is a keyword
+    getargs(x, 0, 0, _("branchpoint takes no arguments"))
+    cl = repo.changelog
+    if not subset:
+        return []
+    baserev = min(subset)
+    parentscount = [0]*(len(repo) - baserev)
+    for r in xrange(baserev + 1, len(repo)):
+        for p in cl.parentrevs(r):
+            if p >= baserev:
+                parentscount[p - baserev] += 1
+    branchpoints = set((baserev + i) for i in xrange(len(parentscount))
+                       if parentscount[i] > 1)
+    return [r for r in subset if r in branchpoints]
+
 def minrev(repo, subset, x):
     """``min(set)``
     Changeset with lowest revision number in set.
@@ -1474,6 +1493,7 @@
     "bisected": bisected,
     "bookmark": bookmark,
     "branch": branch,
+    "branchpoint": branchpoint,
     "children": children,
     "closed": closed,
     "contains": contains,
--- a/mercurial/scmutil.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/mercurial/scmutil.py	Fri Oct 12 15:52:59 2012 -0500
@@ -219,6 +219,9 @@
     def mkdir(self, path=None):
         return os.mkdir(self.join(path))
 
+    def readdir(self, path=None, stat=None, skip=None):
+        return osutil.listdir(self.join(path), stat, skip)
+
     def stat(self, path=None):
         return os.stat(self.join(path))
 
@@ -252,10 +255,10 @@
     def _cansymlink(self):
         return util.checklink(self.base)
 
-    def _fixfilemode(self, name):
+    def _fixfilemode(self, fp):
         if self.createmode is None:
             return
-        os.chmod(name, self.createmode & 0666)
+        os.fchmod(fp.fileno(), self.createmode & 0666)
 
     def __call__(self, path, mode="r", text=False, atomictemp=False):
         if self._audit:
@@ -302,7 +305,7 @@
                     util.rename(util.mktempcopy(f), f)
         fp = util.posixfile(f, mode)
         if nlink == 0:
-            self._fixfilemode(f)
+            self._fixfilemode(fp)
         return fp
 
     def symlink(self, src, dst):
@@ -326,8 +329,8 @@
         else:
             f = self(dst, "w")
             f.write(src)
+            self._fixfilemode(f)
             f.close()
-            self._fixfilemode(dst)
 
     def audit(self, path):
         self.auditor(path)
--- a/mercurial/store.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/mercurial/store.py	Fri Oct 12 15:52:59 2012 -0500
@@ -6,7 +6,7 @@
 # GNU General Public License version 2 or any later version.
 
 from i18n import _
-import osutil, scmutil, util, parsers
+import scmutil, util, parsers
 import os, stat, errno
 
 _sha = util.sha1
@@ -227,7 +227,7 @@
     characters are encoded as '~xx', where xx is the two digit hex code
     of the character (see encodefilename).
     Relevant path components consisting of Windows reserved filenames are
-    masked by encoding the third character ('aux' -> 'au~78', see auxencode).
+    masked by encoding the third character ('aux' -> 'au~78', see _auxencode).
 
     Hashed encoding (not reversible):
 
@@ -311,9 +311,10 @@
         l = []
         if self.rawvfs.isdir(path):
             visit = [path]
+            readdir = self.rawvfs.readdir
             while visit:
                 p = visit.pop()
-                for f, kind, st in osutil.listdir(p, stat=True):
+                for f, kind, st in readdir(p, stat=True):
                     fp = p + '/' + f
                     if kind == stat.S_IFREG and f[-2:] in ('.d', '.i'):
                         n = util.pconvert(fp[striplen:])
@@ -341,6 +342,17 @@
     def write(self):
         pass
 
+    def __contains__(self, path):
+        '''Checks if the store contains path'''
+        path = "/".join(("data", path))
+        # file?
+        if os.path.exists(self.join(path + ".i")):
+            return True
+        # dir?
+        if not path.endswith("/"):
+            path = path + "/"
+        return os.path.exists(self.join(path))
+
 class encodedstore(basicstore):
     def __init__(self, path, vfstype):
         vfs = vfstype(path + '/store')
@@ -414,10 +426,19 @@
             self._dirty = True
             self.entries.add(fn)
 
-    def __contains__(self, fn):
+    def __contains__(self, path):
         if self.entries is None:
             self._load()
-        return fn in self.entries
+        # Check for files (exact match)
+        if path + ".i" in self.entries:
+            return True
+        # Now check for directories (prefix match)
+        if not path.endswith('/'):
+            path += '/'
+        for e in self.entries:
+            if e.startswith(path):
+                return True
+        return False
 
     def __iter__(self):
         if self.entries is None:
@@ -500,6 +521,11 @@
     def write(self):
         self.fncache.write()
 
+    def __contains__(self, path):
+        '''Checks if the store contains path'''
+        path = "/".join(("data", path))
+        return path in self.fncache
+
 def store(requirements, path, vfstype):
     if 'store' in requirements:
         if 'fncache' in requirements:
--- a/mercurial/templatefilters.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/mercurial/templatefilters.py	Fri Oct 12 15:52:59 2012 -0500
@@ -221,7 +221,7 @@
 
 def localdate(text):
     """:localdate: Date. Converts a date to local date."""
-    return (text[0], util.makedate()[1])
+    return (util.parsedate(text)[0], util.makedate()[1])
 
 def nonempty(str):
     """:nonempty: Any text. Returns '(none)' if the string is empty."""
--- a/tests/filtercr.py	Wed Oct 10 05:54:38 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-#!/usr/bin/env python
-
-# Filter output by the progress extension to make it readable in tests
-
-import sys, re
-
-for line in sys.stdin:
-    line = re.sub(r'\r+[^\n]', lambda m: '\n' + m.group()[-1:], line)
-    sys.stdout.write(line)
-print
--- a/tests/run-tests.py	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/run-tests.py	Fri Oct 12 15:52:59 2012 -0500
@@ -283,21 +283,6 @@
     shutil.copy(src, dst)
     os.remove(src)
 
-def splitnewlines(text):
-    '''like str.splitlines, but only split on newlines.
-    keep line endings.'''
-    i = 0
-    lines = []
-    while True:
-        n = text.find('\n', i)
-        if n == -1:
-            last = text[i:]
-            if last:
-                lines.append(last)
-            return lines
-        lines.append(text[i:n + 1])
-        i = n + 1
-
 def parsehghaveoutput(lines):
     '''Parse hghave log lines.
     Return tuple of lists (missing, failed):
@@ -684,14 +669,13 @@
     pos = -1
     postout = []
     ret = 0
-    for n, l in enumerate(output):
+    for l in output:
         lout, lcmd = l, None
         if salt in l:
             lout, lcmd = l.split(salt, 1)
 
         if lout:
-            if lcmd:
-                # output block had no trailing newline, clean up
+            if not lout.endswith('\n'):
                 lout += ' (no-eol)\n'
 
             # find the expected output at the current position
@@ -762,7 +746,7 @@
 
     for s, r in replacements:
         output = re.sub(s, r, output)
-    return ret, splitnewlines(output)
+    return ret, output.splitlines(True)
 
 def runone(options, test):
     '''tristate output:
@@ -925,7 +909,7 @@
         refout = None                   # to match "out is None"
     elif os.path.exists(ref):
         f = open(ref, "r")
-        refout = list(splitnewlines(f.read()))
+        refout = f.read().splitlines(True)
         f.close()
     else:
         refout = []
@@ -937,6 +921,11 @@
             f.write(line)
         f.close()
 
+    def describe(ret):
+        if ret < 0:
+            return 'killed by signal %d' % -ret
+        return 'returned error code %d' % ret
+
     if skipped:
         mark = 's'
         if out is None:                 # debug mode: nothing to parse
@@ -964,13 +953,13 @@
                 showdiff(refout, out, ref, err)
             iolock.release()
         if ret:
-            fail("output changed and returned error code %d" % ret, ret)
+            fail("output changed and " + describe(ret), ret)
         else:
             fail("output changed", ret)
         ret = 1
     elif ret:
         mark = '!'
-        fail("returned error code %d" % ret, ret)
+        fail(describe(ret), ret)
     else:
         success()
 
--- a/tests/test-archive.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-archive.t	Fri Oct 12 15:52:59 2012 -0500
@@ -224,19 +224,19 @@
   > width = 60
   > EOF
 
-  $ hg archive ../with-progress 2>&1 | "$TESTDIR/filtercr.py"
-  
-  archiving [                                           ] 0/4
-  archiving [                                           ] 0/4
-  archiving [=========>                                 ] 1/4
-  archiving [=========>                                 ] 1/4
-  archiving [====================>                      ] 2/4
-  archiving [====================>                      ] 2/4
-  archiving [===============================>           ] 3/4
-  archiving [===============================>           ] 3/4
-  archiving [==========================================>] 4/4
-  archiving [==========================================>] 4/4
-                                                              \r (esc)
+  $ hg archive ../with-progress
+  \r (no-eol) (esc)
+  archiving [                                           ] 0/4\r (no-eol) (esc)
+  archiving [                                           ] 0/4\r (no-eol) (esc)
+  archiving [=========>                                 ] 1/4\r (no-eol) (esc)
+  archiving [=========>                                 ] 1/4\r (no-eol) (esc)
+  archiving [====================>                      ] 2/4\r (no-eol) (esc)
+  archiving [====================>                      ] 2/4\r (no-eol) (esc)
+  archiving [===============================>           ] 3/4\r (no-eol) (esc)
+  archiving [===============================>           ] 3/4\r (no-eol) (esc)
+  archiving [==========================================>] 4/4\r (no-eol) (esc)
+  archiving [==========================================>] 4/4\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
 cleanup after progress extension test:
 
--- a/tests/test-bookmarks-current.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-bookmarks-current.t	Fri Oct 12 15:52:59 2012 -0500
@@ -115,6 +115,13 @@
      Z                         0:719295282060
 
   $ hg up -q Y
+  $ hg bookmark -i
+  $ hg bookmarks
+     Y                         0:719295282060
+     Z                         0:719295282060
+  $ hg bookmark -i
+  no active bookmark
+  $ hg up -q Y
   $ hg bookmarks
    * Y                         0:719295282060
      Z                         0:719295282060
--- a/tests/test-clone.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-clone.t	Fri Oct 12 15:52:59 2012 -0500
@@ -468,6 +468,16 @@
   $ rm -r ua
 
 
+Test clone with special '@' bookmark:
+  $ cd a
+  $ hg bookmark -r a7949464abda @  # branch point of stable from default
+  $ hg clone . ../i
+  updating to branch default
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg id -i ../i
+  a7949464abda
+
+
 Testing failures:
 
   $ mkdir fail
--- a/tests/test-convert-svn-move.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-convert-svn-move.t	Fri Oct 12 15:52:59 2012 -0500
@@ -165,68 +165,75 @@
   > width = 60
   > EOF
 
-  $ hg convert svn-repo hg-progress 2>&1 | "$TESTDIR/filtercr.py"
-  
-  scanning [ <=>                                          ] 1
-  scanning [  <=>                                         ] 2
-  scanning [   <=>                                        ] 3
-  scanning [    <=>                                       ] 4
-  scanning [     <=>                                      ] 5
-  scanning [      <=>                                     ] 6
-  scanning [       <=>                                    ] 7
-                                                              
-  converting [                                          ] 0/7
-  getting files [=====>                                 ] 1/6
-  getting files [============>                          ] 2/6
-  getting files [==================>                    ] 3/6
-  getting files [=========================>             ] 4/6
-  getting files [===============================>       ] 5/6
-  getting files [======================================>] 6/6
-                                                              
-  converting [=====>                                    ] 1/7
-  scanning paths [                                      ] 0/1
-  getting files [======================================>] 1/1
-                                                              
-  converting [===========>                              ] 2/7
-  scanning paths [                                      ] 0/2
-  scanning paths [==================>                   ] 1/2
-  getting files [========>                              ] 1/4
-  getting files [==================>                    ] 2/4
-  getting files [============================>          ] 3/4
-  getting files [======================================>] 4/4
-                                                              
-  converting [=================>                        ] 3/7
-  scanning paths [                                      ] 0/1
-  getting files [======================================>] 1/1
-                                                              
-  converting [=======================>                  ] 4/7
-  scanning paths [                                      ] 0/1
-  getting files [======================================>] 1/1
-                                                              
-  converting [=============================>            ] 5/7
-  scanning paths [                                      ] 0/3
-  scanning paths [===========>                          ] 1/3
-  scanning paths [========================>             ] 2/3
-  getting files [===>                                   ] 1/8
-  getting files [========>                              ] 2/8
-  getting files [=============>                         ] 3/8
-  getting files [==================>                    ] 4/8
-  getting files [=======================>               ] 5/8
-  getting files [============================>          ] 6/8
-  getting files [=================================>     ] 7/8
-  getting files [======================================>] 8/8
-                                                              
-  converting [===================================>      ] 6/7
-  scanning paths [                                      ] 0/1
-  getting files [===>                                   ] 1/8
-  getting files [========>                              ] 2/8
-  getting files [=============>                         ] 3/8
-  getting files [==================>                    ] 4/8
-  getting files [=======================>               ] 5/8
-  getting files [============================>          ] 6/8
-  getting files [=================================>     ] 7/8
-  getting files [======================================>] 8/8
-                                                              
+  $ hg convert svn-repo hg-progress
+  \r (no-eol) (esc)
+  scanning [ <=>                                          ] 1\r (no-eol) (esc)
+  scanning [  <=>                                         ] 2\r (no-eol) (esc)
+  scanning [   <=>                                        ] 3\r (no-eol) (esc)
+  scanning [    <=>                                       ] 4\r (no-eol) (esc)
+  scanning [     <=>                                      ] 5\r (no-eol) (esc)
+  scanning [      <=>                                     ] 6\r (no-eol) (esc)
+  scanning [       <=>                                    ] 7\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  converting [                                          ] 0/7\r (no-eol) (esc)
+  getting files [=====>                                 ] 1/6\r (no-eol) (esc)
+  getting files [============>                          ] 2/6\r (no-eol) (esc)
+  getting files [==================>                    ] 3/6\r (no-eol) (esc)
+  getting files [=========================>             ] 4/6\r (no-eol) (esc)
+  getting files [===============================>       ] 5/6\r (no-eol) (esc)
+  getting files [======================================>] 6/6\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  converting [=====>                                    ] 1/7\r (no-eol) (esc)
+  scanning paths [                                      ] 0/1\r (no-eol) (esc)
+  getting files [======================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  converting [===========>                              ] 2/7\r (no-eol) (esc)
+  scanning paths [                                      ] 0/2\r (no-eol) (esc)
+  scanning paths [==================>                   ] 1/2\r (no-eol) (esc)
+  getting files [========>                              ] 1/4\r (no-eol) (esc)
+  getting files [==================>                    ] 2/4\r (no-eol) (esc)
+  getting files [============================>          ] 3/4\r (no-eol) (esc)
+  getting files [======================================>] 4/4\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  converting [=================>                        ] 3/7\r (no-eol) (esc)
+  scanning paths [                                      ] 0/1\r (no-eol) (esc)
+  getting files [======================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  converting [=======================>                  ] 4/7\r (no-eol) (esc)
+  scanning paths [                                      ] 0/1\r (no-eol) (esc)
+  getting files [======================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  converting [=============================>            ] 5/7\r (no-eol) (esc)
+  scanning paths [                                      ] 0/3\r (no-eol) (esc)
+  scanning paths [===========>                          ] 1/3\r (no-eol) (esc)
+  scanning paths [========================>             ] 2/3\r (no-eol) (esc)
+  getting files [===>                                   ] 1/8\r (no-eol) (esc)
+  getting files [========>                              ] 2/8\r (no-eol) (esc)
+  getting files [=============>                         ] 3/8\r (no-eol) (esc)
+  getting files [==================>                    ] 4/8\r (no-eol) (esc)
+  getting files [=======================>               ] 5/8\r (no-eol) (esc)
+  getting files [============================>          ] 6/8\r (no-eol) (esc)
+  getting files [=================================>     ] 7/8\r (no-eol) (esc)
+  getting files [======================================>] 8/8\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  converting [===================================>      ] 6/7\r (no-eol) (esc)
+  scanning paths [                                      ] 0/1\r (no-eol) (esc)
+  getting files [===>                                   ] 1/8\r (no-eol) (esc)
+  getting files [========>                              ] 2/8\r (no-eol) (esc)
+  getting files [=============>                         ] 3/8\r (no-eol) (esc)
+  getting files [==================>                    ] 4/8\r (no-eol) (esc)
+  getting files [=======================>               ] 5/8\r (no-eol) (esc)
+  getting files [============================>          ] 6/8\r (no-eol) (esc)
+  getting files [=================================>     ] 7/8\r (no-eol) (esc)
+  getting files [======================================>] 8/8\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   initializing destination hg-progress repository
   scanning source...
   sorting...
@@ -238,6 +245,5 @@
   2 adddb
   1 branch
   0 clobberdir
-  
 
   $ cd ..
--- a/tests/test-debugbuilddag.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-debugbuilddag.t	Fri Oct 12 15:52:59 2012 -0500
@@ -8,44 +8,43 @@
   > --config extensions.progress= --config progress.assume-tty=1 \
   > --config progress.delay=0 --config progress.refresh=0 \
   > --config progress.format=topic,bar,number \
-  > --config progress.width=60 2>&1 | \
-  > python "$TESTDIR/filtercr.py"
-  
-  building [                                          ]  0/12
-  building [                                          ]  0/12
-  building [                                          ]  0/12
-  building [                                          ]  0/12
-  building [==>                                       ]  1/12
-  building [==>                                       ]  1/12
-  building [==>                                       ]  1/12
-  building [==>                                       ]  1/12
-  building [======>                                   ]  2/12
-  building [======>                                   ]  2/12
-  building [=========>                                ]  3/12
-  building [=========>                                ]  3/12
-  building [=============>                            ]  4/12
-  building [=============>                            ]  4/12
-  building [=============>                            ]  4/12
-  building [=============>                            ]  4/12
-  building [=============>                            ]  4/12
-  building [=============>                            ]  4/12
-  building [================>                         ]  5/12
-  building [================>                         ]  5/12
-  building [====================>                     ]  6/12
-  building [====================>                     ]  6/12
-  building [=======================>                  ]  7/12
-  building [=======================>                  ]  7/12
-  building [===========================>              ]  8/12
-  building [===========================>              ]  8/12
-  building [===========================>              ]  8/12
-  building [===========================>              ]  8/12
-  building [==============================>           ]  9/12
-  building [==============================>           ]  9/12
-  building [==================================>       ] 10/12
-  building [==================================>       ] 10/12
-  building [=====================================>    ] 11/12
-  building [=====================================>    ] 11/12
-                                                              \r (esc)
+  > --config progress.width=60
+  \r (no-eol) (esc)
+  building [                                          ]  0/12\r (no-eol) (esc)
+  building [                                          ]  0/12\r (no-eol) (esc)
+  building [                                          ]  0/12\r (no-eol) (esc)
+  building [                                          ]  0/12\r (no-eol) (esc)
+  building [==>                                       ]  1/12\r (no-eol) (esc)
+  building [==>                                       ]  1/12\r (no-eol) (esc)
+  building [==>                                       ]  1/12\r (no-eol) (esc)
+  building [==>                                       ]  1/12\r (no-eol) (esc)
+  building [======>                                   ]  2/12\r (no-eol) (esc)
+  building [======>                                   ]  2/12\r (no-eol) (esc)
+  building [=========>                                ]  3/12\r (no-eol) (esc)
+  building [=========>                                ]  3/12\r (no-eol) (esc)
+  building [=============>                            ]  4/12\r (no-eol) (esc)
+  building [=============>                            ]  4/12\r (no-eol) (esc)
+  building [=============>                            ]  4/12\r (no-eol) (esc)
+  building [=============>                            ]  4/12\r (no-eol) (esc)
+  building [=============>                            ]  4/12\r (no-eol) (esc)
+  building [=============>                            ]  4/12\r (no-eol) (esc)
+  building [================>                         ]  5/12\r (no-eol) (esc)
+  building [================>                         ]  5/12\r (no-eol) (esc)
+  building [====================>                     ]  6/12\r (no-eol) (esc)
+  building [====================>                     ]  6/12\r (no-eol) (esc)
+  building [=======================>                  ]  7/12\r (no-eol) (esc)
+  building [=======================>                  ]  7/12\r (no-eol) (esc)
+  building [===========================>              ]  8/12\r (no-eol) (esc)
+  building [===========================>              ]  8/12\r (no-eol) (esc)
+  building [===========================>              ]  8/12\r (no-eol) (esc)
+  building [===========================>              ]  8/12\r (no-eol) (esc)
+  building [==============================>           ]  9/12\r (no-eol) (esc)
+  building [==============================>           ]  9/12\r (no-eol) (esc)
+  building [==================================>       ] 10/12\r (no-eol) (esc)
+  building [==================================>       ] 10/12\r (no-eol) (esc)
+  building [=====================================>    ] 11/12\r (no-eol) (esc)
+  building [=====================================>    ] 11/12\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
 tags
   $ cat .hg/localtags
--- a/tests/test-diff-ignore-whitespace.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-diff-ignore-whitespace.t	Fri Oct 12 15:52:59 2012 -0500
@@ -404,7 +404,8 @@
   -goodbye world
   +hello world\r (esc)
   +\r (esc)
-  +goodbye\rworld (esc)
+  +goodbye\r (no-eol) (esc)
+  world
 
 No completely blank lines to ignore:
 
@@ -417,7 +418,8 @@
   -goodbye world
   +hello world\r (esc)
   +\r (esc)
-  +goodbye\rworld (esc)
+  +goodbye\r (no-eol) (esc)
+  world
 
 Only new line noticed:
 
--- a/tests/test-diff-newlines.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-diff-newlines.t	Fri Oct 12 15:52:59 2012 -0500
@@ -13,6 +13,7 @@
   +++ b/a	Thu Jan 01 00:00:02 1970 +0000
   @@ -1,2 +1,3 @@
    confuse str.splitlines
-   embedded\rnewline (esc)
+   embedded\r (no-eol) (esc)
+  newline
   +clean diff
 
--- a/tests/test-dirstate.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-dirstate.t	Fri Oct 12 15:52:59 2012 -0500
@@ -55,10 +55,6 @@
 
 Test modulo storage/comparison of absurd dates:
 
-  $ touch -t 250001011200 a
-  $ hg st
-  $ hg debugstate
-  n 644          2 2023-08-24 13:21:04 a
   $ touch -t 195001011200 a
   $ hg st
   $ hg debugstate
--- a/tests/test-eolfilename.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-eolfilename.t	Fri Oct 12 15:52:59 2012 -0500
@@ -9,11 +9,13 @@
   $ A=`printf 'he\rllo'`
   $ echo foo > "$A"
   $ hg add
-  adding he\rllo (esc)
+  adding he\r (no-eol) (esc)
+  llo
   abort: '\n' and '\r' disallowed in filenames: 'he\rllo'
   [255]
   $ hg ci -A -m m
-  adding he\rllo (esc)
+  adding he\r (no-eol) (esc)
+  llo
   abort: '\n' and '\r' disallowed in filenames: 'he\rllo'
   [255]
   $ rm "$A"
@@ -31,7 +33,9 @@
   [255]
   $ echo foo > "$A"
   $ hg debugwalk
-  f  he\rllo  he\rllo (esc)
+  f  he\r (no-eol) (esc)
+  llo  he\r (no-eol) (esc)
+  llo
   f  hell
   o  hell
   o
--- a/tests/test-hgweb-commands.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-hgweb-commands.t	Fri Oct 12 15:52:59 2012 -0500
@@ -1127,9 +1127,13 @@
   
   x\x9c\xbdTMHTQ\x14\x1e\xfc\xef\xd9&\x10\x11*x\x88\x81\x9aN\xf7\xddw\xdf{\xf7Y\x0efR\xb4\x11\xb1U\x82\xc5\xfd\x9d!c\x06\x9c'd\xa0\x99X\x82\x92i\xablUZ-*\x08\x84\x82\x02KkQ\xf8\x13\xe4\xaa\x8dn\x94\x906)\xd5B\x02\xeb\xbe\x9c\x01\x85\xc9\x996\x1d\xf8x\x97{\xefy\xe7;\xe7|\xe7\x06\x02\x81\xb1\xe0\xda\x13\xefN\xd1\xca\x8f\xcb-\xbde\xfc\xeepU\xecJ\xc3\xcd@\x86\x96\xc6\xb7^`\xe9"[H\xe4\x18T\x1a\x16p]\xc3\x96\x14\x13\xcbt\xa1tM\x0c\x1c\x0b2,M\xcd\x13qO\x03:\xd089"c1\xcd\x87FI\\\xa8\xbf|\xbc\xbf\x11\\p{_\xe5\xb6\xddn^j\xdd\xec\x0f=z\xb7\xb6\x94)\xebT\xbe\x89\xa3 (esc)
   \x1f6!6p\x00\xc4H`L\x18\x83\xdc\xa6\x8c\x0b\x84\x01\x06\x06s\xb84\x1cn2F4u\x19*\xd4*\x14\x04#a\x8f\x84\xe3\xfe^\xc8OS\xa1\xfc8\xe7\x82\xebj[7\x82@\x97\xb1v\x9dEH4,\xe2\xc2\xd3\xa1\x90\x800\x07\xb9\xc4@\xea\xee\xe4\xc1\xd2\xcf\xe7\xb3\xba[\xf2\xf6X\xdd]C\x1d\x05\xf3\x87\x1f,l\xeeBt\x87\xa5\xf2\xdd\x9e\x90*\xa9kC\xac"!\x17\x12)!c\x000\xd7\x05&\xb5\xa9\xc5\xa8-Ln (esc)
-  \x0c|\xf2A\x85\x1a\x85bUy\x9d\xb6\x93(\x8b\xd4\xc4=B/\x8a?\rP'G\x15\x98B\xde\xd6\xa9Zy/\xfb'j+f\xc2\xe3\xb9\xb4\xf5\xea\x98\xf6\xa6sz\xf9{\xc3.\xa4vX*\xdf\x04\x0f\xff[\xb4\x8dGG4\xc1$\xe1:\xb9\xbaq\xf2\xeb\xa9\xfd\xebM\xa3\xc5?\x07\xce\xdc\xda\xc0\xf9\xcd\xef\xbf\xa5\xd3g\xd2\xd2\xa8\xa5uKu\x01(8$\xa6k@\x02(D\x16\x80\x00\x99\x82\x08\xa5\r\x81(t\\f`\xea\x02\xce\xb5\x7f\xba\xac\x02\x8c\\x\x98\x9f\xd5\xb7:0W\xdd6\xbf\xd2\xd3s\xa0k\xbd\xeb\xd8L\xa6	\xa5Q\x86\x91Pc\x80\x98\x8cB,L\x07#\x80\x04\x82\xb6\x8d)\xa3\x08X\x02\x00\xear\x0c-`b\x9b\x18>\xa1\x1b\xf9g\xe9@\xd1\xe9\xca_US{G\xb3\x9f?\x9b\x8d\xd6\x86zR\x91LE\xe8/\xdd& (esc)
+  \x0c|\xf2A\x85\x1a\x85bUy\x9d\xb6\x93(\x8b\xd4\xc4=B/\x8a?\r (no-eol) (esc)
+  P'G\x15\x98B\xde\xd6\xa9Zy/\xfb'j+f\xc2\xe3\xb9\xb4\xf5\xea\x98\xf6\xa6sz\xf9{\xc3.\xa4vX*\xdf\x04\x0f\xff[\xb4\x8dGG4\xc1$\xe1:\xb9\xbaq\xf2\xeb\xa9\xfd\xebM\xa3\xc5?\x07\xce\xdc\xda\xc0\xf9\xcd\xef\xbf\xa5\xd3g\xd2\xd2\xa8\xa5uKu\x01(8$\xa6k@\x02(D\x16\x80\x00\x99\x82\x08\xa5\r (no-eol) (esc)
+  \x81(t\\f`\xea\x02\xce\xb5\x7f\xba\xac\x02\x8c\\x\x98\x9f\xd5\xb7:0W\xdd6\xbf\xd2\xd3s\xa0k\xbd\xeb\xd8L\xa6	\xa5Q\x86\x91Pc\x80\x98\x8cB,L\x07#\x80\x04\x82\xb6\x8d)\xa3\x08X\x02\x00\xear\x0c-`b\x9b\x18>\xa1\x1b\xf9g\xe9@\xd1\xe9\xca_US{G\xb3\x9f?\x9b\x8d\xd6\x86zR\x91LE\xe8/\xdd& (esc)
   C
-  \xd5~u\xb0e#\x08\r\x8c\xd5\xf83\x93\x01B\x95\xe8\x1c\x03\xdb\x92s*\x99`\xcc0\x88\xb4d\xb2\xbd\x85\xc9,\x14\xb7\xf1\xd9\xf2\xe5Ku\x8d\xf5rp\xb6\xee\\\xe0\xc5\xa7C\xd9\xd7\xefe\xda\xe94\xc5\xaa\xde>\x8a\x02I\xcb!\x16\xc1\x10"\x1b\x11\xe0\x02\xc8l\xe9H\x84\xb0\xf4\xa78\xc9-\xf1(\xa9\x15\x0f.\x8c\x8fT\x16\x965\xe9'\xbe\xac6\xaeLtN\x0f\x0e/fJ-\x8d\x08s\x12#\xe7[\xfe\xff\x0b\x17\xb9\xc6KK\xfa\xa2o\xa7\x1e\x87\xfaKb\x8b\xaf?\xcc\xed{z>\xd3\xb8\xbb\xcc}\x8eB\x01\x89\xc6\xbc\x88hO\xa6\x15\xf8\rr4\xb3\xe5 (no-eol) (esc)
+  \xd5~u\xb0e#\x08\r (no-eol) (esc)
+  \x8c\xd5\xf83\x93\x01B\x95\xe8\x1c\x03\xdb\x92s*\x99`\xcc0\x88\xb4d\xb2\xbd\x85\xc9,\x14\xb7\xf1\xd9\xf2\xe5Ku\x8d\xf5rp\xb6\xee\\\xe0\xc5\xa7C\xd9\xd7\xefe\xda\xe94\xc5\xaa\xde>\x8a\x02I\xcb!\x16\xc1\x10"\x1b\x11\xe0\x02\xc8l\xe9H\x84\xb0\xf4\xa78\xc9-\xf1(\xa9\x15\x0f.\x8c\x8fT\x16\x965\xe9'\xbe\xac6\xaeLtN\x0f\x0e/fJ-\x8d\x08s\x12#\xe7[\xfe\xff\x0b\x17\xb9\xc6KK\xfa\xa2o\xa7\x1e\x87\xfaKb\x8b\xaf?\xcc\xed{z>\xd3\xb8\xbb\xcc}\x8eB\x01\x89\xc6\xbc\x88hO\xa6\x15\xf8\r (no-eol) (esc)
+  r4\xb3\xe5 (no-eol) (esc)
 
 stream_out
 
--- a/tests/test-http-proxy.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-http-proxy.t	Fri Oct 12 15:52:59 2012 -0500
@@ -99,6 +99,7 @@
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cat proxy.log
   * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
+  * - - [*] "GET http://localhost:$HGPORT/?cmd=branchmap HTTP/1.1" - - (glob)
   * - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - (glob)
   * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
   * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
--- a/tests/test-largefiles.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-largefiles.t	Fri Oct 12 15:52:59 2012 -0500
@@ -1587,9 +1587,8 @@
 
   $ hg clone -U . ../empty
   $ cd ../empty
-  $ hg archive --subrepos -r tip ../archive.tar.gz 2>&1 | "$TESTDIR/filtercr.py"
+  $ hg archive --subrepos -r tip ../archive.tar.gz
   cloning subrepo subrepo from $TESTTMP/statusmatch/subrepo
-  
   $ cd ..
 
 Test that addremove picks up largefiles prior to the initial commit (issue3541)
--- a/tests/test-log.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-log.t	Fri Oct 12 15:52:59 2012 -0500
@@ -1213,3 +1213,52 @@
   1
 
   $ cd ..
+
+test hg log on non-existent files and on directories
+  $ hg init issue1340
+  $ cd issue1340
+  $ mkdir d1; mkdir D2; mkdir D3.i; mkdir d4.hg; mkdir d5.d; mkdir .d6
+  $ echo 1 > d1/f1
+  $ echo 1 > D2/f1
+  $ echo 1 > D3.i/f1
+  $ echo 1 > d4.hg/f1
+  $ echo 1 > d5.d/f1
+  $ echo 1 > .d6/f1
+  $ hg add .
+  adding .d6/f1
+  adding D2/f1
+  adding D3.i/f1
+  adding d1/f1
+  adding d4.hg/f1
+  adding d5.d/f1
+  $ hg commit -m "a bunch of weird directories"
+  $ hg log -l1 d1/f1 | grep changeset
+  changeset:   0:65624cd9070a
+  $ hg log -l1 f1
+  $ hg log -l1 . | grep changeset
+  changeset:   0:65624cd9070a
+  $ hg log -l1 ./ | grep changeset
+  changeset:   0:65624cd9070a
+  $ hg log -l1 d1 | grep changeset
+  changeset:   0:65624cd9070a
+  $ hg log -l1 D2 | grep changeset
+  changeset:   0:65624cd9070a
+  $ hg log -l1 D2/f1 | grep changeset
+  changeset:   0:65624cd9070a
+  $ hg log -l1 D3.i | grep changeset
+  changeset:   0:65624cd9070a
+  $ hg log -l1 D3.i/f1 | grep changeset
+  changeset:   0:65624cd9070a
+  $ hg log -l1 d4.hg | grep changeset
+  changeset:   0:65624cd9070a
+  $ hg log -l1 d4.hg/f1 | grep changeset
+  changeset:   0:65624cd9070a
+  $ hg log -l1 d5.d | grep changeset
+  changeset:   0:65624cd9070a
+  $ hg log -l1 d5.d/f1 | grep changeset
+  changeset:   0:65624cd9070a
+  $ hg log -l1 .d6 | grep changeset
+  changeset:   0:65624cd9070a
+  $ hg log -l1 .d6/f1 | grep changeset
+  changeset:   0:65624cd9070a
+  $ cd ..
--- a/tests/test-notify.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-notify.t	Fri Oct 12 15:52:59 2012 -0500
@@ -42,16 +42,22 @@
   repository:
   
     [usersubs]
-    # key is subscriber email, value is a comma-separated list of repo glob
-    # patterns
+    # key is subscriber email, value is a comma-separated list of repo patterns
     user@host = pattern
   
     [reposubs]
-    # key is glob pattern, value is a comma-separated list of subscriber
-    # emails
+    # key is repo pattern, value is a comma-separated list of subscriber emails
     pattern = user@host
   
-  Glob patterns are matched against absolute path to repository root.
+  A "pattern" is a "glob" matching the absolute path to a repository, optionally
+  combined with a revset expression. A revset expression, if present, is
+  separated from the glob by a hash. Example:
+  
+    [reposubs]
+    */widgets#branch(release) = qa-team@example.com
+  
+  This sends to "qa-team@example.com" whenever a changeset on the "release"
+  branch triggers a notification in any repository ending in "widgets".
   
   In order to place them under direct user management, "[usersubs]" and
   "[reposubs]" sections may be placed in a separate "hgrc" file and incorporated
@@ -473,3 +479,77 @@
   ononononononononononononononononononononononononononononononononononononono=
   nonononononononononononono
   
+ revset selection: send to address that matches branch and repo
+
+  $ cat << EOF >> $HGRCPATH
+  > [hooks]
+  > incoming.notify = python:hgext.notify.hook
+  > 
+  > [notify]
+  > sources = pull
+  > test = True
+  > diffstat = False
+  > maxdiff = 0
+  > 
+  > [reposubs]
+  > */a#branch(test) = will_no_be_send@example.com
+  > */b#branch(test) = notify@example.com
+  > EOF
+  $ hg --cwd a branch test
+  marked working directory as branch test
+  (branches are permanent and global, did you want a bookmark?)
+  $ echo a >> a/a
+  $ hg --cwd a ci -m test -d '1 0'
+  $ hg --traceback --cwd b pull ../a | \
+  >   python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
+  pulling from ../a
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 1 changes to 1 files
+  Content-Type: text/plain; charset="us-ascii"
+  MIME-Version: 1.0
+  Content-Transfer-Encoding: 7bit
+  X-Test: foo
+  Date: * (glob)
+  Subject: test
+  From: test@test.com
+  X-Hg-Notification: changeset fbbcbc516f2f
+  Message-Id: <hg.fbbcbc516f2f.*.*@*> (glob)
+  To: baz@test.com, foo@bar, notify@example.com
+  
+  changeset fbbcbc516f2f in b
+  description: test
+  (run 'hg update' to get a working copy)
+
+revset selection: don't send to address that waits for mails
+from different branch
+
+  $ hg --cwd a update default
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo a >> a/a
+  $ hg --cwd a ci -m test -d '1 0'
+  $ hg --traceback --cwd b pull ../a | \
+  >   python -c 'import sys,re; print re.sub("\n\t", " ", sys.stdin.read()),'
+  pulling from ../a
+  searching for changes
+  adding changesets
+  adding manifests
+  adding file changes
+  added 1 changesets with 0 changes to 0 files (+1 heads)
+  Content-Type: text/plain; charset="us-ascii"
+  MIME-Version: 1.0
+  Content-Transfer-Encoding: 7bit
+  X-Test: foo
+  Date: * (glob)
+  Subject: test
+  From: test@test.com
+  X-Hg-Notification: changeset 38b42fa092de
+  Message-Id: <hg.38b42fa092de.*.*@*> (glob)
+  To: baz@test.com, foo@bar
+  
+  changeset 38b42fa092de in b
+  description: test
+  (run 'hg heads' to see heads)
+
--- a/tests/test-patchbomb.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-patchbomb.t	Fri Oct 12 15:52:59 2012 -0500
@@ -149,29 +149,31 @@
   $ hg email -m test.mbox -f quux -t foo -c bar -s test 0:tip \
   > --config extensions.progress= --config progress.assume-tty=1 \
   > --config progress.delay=0 --config progress.refresh=0 \
-  > --config progress.width=60 2>&1 | \
-  > python "$TESTDIR/filtercr.py"
+  > --config progress.width=60
   this patch series consists of 2 patches.
   
   
   Write the introductory message for the patch series.
   
-  
-  sending [                                             ] 0/3
-  sending [                                             ] 0/3
-                                                              
-                                                              
-  sending [==============>                              ] 1/3
-  sending [==============>                              ] 1/3
-                                                              
-                                                              
-  sending [=============================>               ] 2/3
-  sending [=============================>               ] 2/3
+  \r (no-eol) (esc)
+  sending [                                             ] 0/3\r (no-eol) (esc)
+  sending [                                             ] 0/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  sending [==============>                              ] 1/3\r (no-eol) (esc)
+  sending [==============>                              ] 1/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  sending [=============================>               ] 2/3\r (no-eol) (esc)
+  sending [=============================>               ] 2/3\r (no-eol) (esc)
                                                               \r (esc)
   sending [PATCH 0 of 2] test ...
   sending [PATCH 1 of 2] a ...
   sending [PATCH 2 of 2] b ...
-  
 
   $ cd ..
 
--- a/tests/test-progress.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-progress.t	Fri Oct 12 15:52:59 2012 -0500
@@ -46,104 +46,96 @@
 
 test default params, display nothing because of delay
 
-  $ hg -y loop 3 2>&1 | "$TESTDIR/filtercr.py"
-  
+  $ hg -y loop 3
   $ echo "delay=0" >> $HGRCPATH
   $ echo "refresh=0" >> $HGRCPATH
 
 test with delay=0, refresh=0
 
-  $ hg -y loop 3 2>&1 | "$TESTDIR/filtercr.py"
-  
-  loop [                                                ] 0/3
-  loop [===============>                                ] 1/3
-  loop [===============================>                ] 2/3
-                                                              \r (esc)
+  $ hg -y loop 3
+  \r (no-eol) (esc)
+  loop [                                                ] 0/3\r (no-eol) (esc)
+  loop [===============>                                ] 1/3\r (no-eol) (esc)
+  loop [===============================>                ] 2/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
 
 test nested short-lived topics (which shouldn't display with nestdelay):
 
-  $ hg -y loop 3 --nested 2>&1 | \
-  > python "$TESTDIR/filtercr.py"
-  
-  loop [                                                ] 0/3
-  loop [===============>                                ] 1/3
-  loop [===============================>                ] 2/3
-                                                              \r (esc)
+  $ hg -y loop 3 --nested
+  \r (no-eol) (esc)
+  loop [                                                ] 0/3\r (no-eol) (esc)
+  loop [===============>                                ] 1/3\r (no-eol) (esc)
+  loop [===============================>                ] 2/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
 
-  $ hg --config progress.changedelay=0 -y loop 3 --nested 2>&1 | \
-  > python "$TESTDIR/filtercr.py"
-  
-  loop [                                                ] 0/3
-  nested [                                              ] 0/2
-  nested [======================>                       ] 1/2
-  loop [===============>                                ] 1/3
-  nested [                                              ] 0/2
-  nested [======================>                       ] 1/2
-  loop [===============================>                ] 2/3
-  nested [                                              ] 0/2
-  nested [======================>                       ] 1/2
-                                                              \r (esc)
+  $ hg --config progress.changedelay=0 -y loop 3 --nested
+  \r (no-eol) (esc)
+  loop [                                                ] 0/3\r (no-eol) (esc)
+  nested [                                              ] 0/2\r (no-eol) (esc)
+  nested [======================>                       ] 1/2\r (no-eol) (esc)
+  loop [===============>                                ] 1/3\r (no-eol) (esc)
+  nested [                                              ] 0/2\r (no-eol) (esc)
+  nested [======================>                       ] 1/2\r (no-eol) (esc)
+  loop [===============================>                ] 2/3\r (no-eol) (esc)
+  nested [                                              ] 0/2\r (no-eol) (esc)
+  nested [======================>                       ] 1/2\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
 
 test two topics being printed in parallel (as when we're doing a local
 --pull clone, where you get the unbundle and bundle progress at the
 same time):
-  $ hg loop 3 --parallel 2>&1 | python "$TESTDIR/filtercr.py"
-  
-  loop [                                                ] 0/3
-  loop [===============>                                ] 1/3
-  loop [===============================>                ] 2/3
-                                                              \r (esc)
+  $ hg loop 3 --parallel
+  \r (no-eol) (esc)
+  loop [                                                ] 0/3\r (no-eol) (esc)
+  loop [===============>                                ] 1/3\r (no-eol) (esc)
+  loop [===============================>                ] 2/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 test refresh is taken in account
 
-  $ hg -y --config progress.refresh=100 loop 3 2>&1 | "$TESTDIR/filtercr.py"
-  
+  $ hg -y --config progress.refresh=100 loop 3
 
 test format options 1
 
-  $ hg -y --config 'progress.format=number topic item+2' loop 2 2>&1 \
-  > | "$TESTDIR/filtercr.py"
-  
-  0/2 loop lo
-  1/2 loop lo
-                                                              \r (esc)
+  $ hg -y --config 'progress.format=number topic item+2' loop 2
+  \r (no-eol) (esc)
+  0/2 loop lo\r (no-eol) (esc)
+  1/2 loop lo\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
 test format options 2
 
-  $ hg -y --config 'progress.format=number item-3 bar' loop 2 2>&1 \
-  > | "$TESTDIR/filtercr.py"
-  
-  0/2 p.0 [                                                 ]
-  1/2 p.1 [=======================>                         ]
-                                                              \r (esc)
+  $ hg -y --config 'progress.format=number item-3 bar' loop 2
+  \r (no-eol) (esc)
+  0/2 p.0 [                                                 ]\r (no-eol) (esc)
+  1/2 p.1 [=======================>                         ]\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
 test format options and indeterminate progress
 
-  $ hg -y --config 'progress.format=number item bar' loop -- -2 2>&1 \
-  > | "$TESTDIR/filtercr.py"
-  
-  0 loop.0               [ <=>                              ]
-  1 loop.1               [  <=>                             ]
-                                                              \r (esc)
+  $ hg -y --config 'progress.format=number item bar' loop -- -2
+  \r (no-eol) (esc)
+  0 loop.0               [ <=>                              ]\r (no-eol) (esc)
+  1 loop.1               [  <=>                             ]\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
 make sure things don't fall over if count > total
 
-  $ hg -y loop --total 4 6 2>&1 | "$TESTDIR/filtercr.py"
-  
-  loop [                                                ] 0/4
-  loop [===========>                                    ] 1/4
-  loop [=======================>                        ] 2/4
-  loop [===================================>            ] 3/4
-  loop [===============================================>] 4/4
-  loop [ <=>                                            ] 5/4
-                                                              \r (esc)
+  $ hg -y loop --total 4 6
+  \r (no-eol) (esc)
+  loop [                                                ] 0/4\r (no-eol) (esc)
+  loop [===========>                                    ] 1/4\r (no-eol) (esc)
+  loop [=======================>                        ] 2/4\r (no-eol) (esc)
+  loop [===================================>            ] 3/4\r (no-eol) (esc)
+  loop [===============================================>] 4/4\r (no-eol) (esc)
+  loop [ <=>                                            ] 5/4\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
 test immediate progress completion
 
-  $ hg -y loop 0 2>&1 | "$TESTDIR/filtercr.py"
-  
+  $ hg -y loop 0
 
 test delay time estimates
 
@@ -173,44 +165,44 @@
   $ echo "delay=25" >> $HGRCPATH
   $ echo "width=60" >> $HGRCPATH
 
-  $ hg -y loop 8 2>&1 | python "$TESTDIR/filtercr.py"
-  
-  loop [=========>                                ] 2/8 1m07s
-  loop [===============>                            ] 3/8 56s
-  loop [=====================>                      ] 4/8 45s
-  loop [==========================>                 ] 5/8 34s
-  loop [================================>           ] 6/8 23s
-  loop [=====================================>      ] 7/8 12s
-                                                              \r (esc)
+  $ hg -y loop 8
+  \r (no-eol) (esc)
+  loop [=========>                                ] 2/8 1m07s\r (no-eol) (esc)
+  loop [===============>                            ] 3/8 56s\r (no-eol) (esc)
+  loop [=====================>                      ] 4/8 45s\r (no-eol) (esc)
+  loop [==========================>                 ] 5/8 34s\r (no-eol) (esc)
+  loop [================================>           ] 6/8 23s\r (no-eol) (esc)
+  loop [=====================================>      ] 7/8 12s\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
-  $ MOCKTIME=10000 hg -y loop 4 2>&1 | python "$TESTDIR/filtercr.py"
-  
-  loop [                                                ] 0/4
-  loop [=========>                                ] 1/4 8h21m
-  loop [====================>                     ] 2/4 5h34m
-  loop [==============================>           ] 3/4 2h47m
-                                                              \r (esc)
+  $ MOCKTIME=10000 hg -y loop 4
+  \r (no-eol) (esc)
+  loop [                                                ] 0/4\r (no-eol) (esc)
+  loop [=========>                                ] 1/4 8h21m\r (no-eol) (esc)
+  loop [====================>                     ] 2/4 5h34m\r (no-eol) (esc)
+  loop [==============================>           ] 3/4 2h47m\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
-  $ MOCKTIME=1000000 hg -y loop 4 2>&1 | python "$TESTDIR/filtercr.py"
-  
-  loop [                                                ] 0/4
-  loop [=========>                                ] 1/4 5w00d
-  loop [====================>                     ] 2/4 3w03d
-  loop [=============================>           ] 3/4 11d14h
-                                                              \r (esc)
+  $ MOCKTIME=1000000 hg -y loop 4
+  \r (no-eol) (esc)
+  loop [                                                ] 0/4\r (no-eol) (esc)
+  loop [=========>                                ] 1/4 5w00d\r (no-eol) (esc)
+  loop [====================>                     ] 2/4 3w03d\r (no-eol) (esc)
+  loop [=============================>           ] 3/4 11d14h\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
 
-  $ MOCKTIME=14000000 hg -y loop 4 2>&1 | python "$TESTDIR/filtercr.py"
-  
-  loop [                                                ] 0/4
-  loop [=========>                                ] 1/4 1y18w
-  loop [===================>                     ] 2/4 46w03d
-  loop [=============================>           ] 3/4 23w02d
-                                                              \r (esc)
+  $ MOCKTIME=14000000 hg -y loop 4
+  \r (no-eol) (esc)
+  loop [                                                ] 0/4\r (no-eol) (esc)
+  loop [=========>                                ] 1/4 1y18w\r (no-eol) (esc)
+  loop [===================>                     ] 2/4 46w03d\r (no-eol) (esc)
+  loop [=============================>           ] 3/4 23w02d\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
 Time estimates should not fail when there's no end point:
-  $ hg -y loop -- -4 2>&1 | python "$TESTDIR/filtercr.py"
-  
-  loop [ <=>                                              ] 2
-  loop [  <=>                                             ] 3
-                                                              \r (esc)
+  $ hg -y loop -- -4
+  \r (no-eol) (esc)
+  loop [ <=>                                              ] 2\r (no-eol) (esc)
+  loop [  <=>                                             ] 3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
--- a/tests/test-revset.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-revset.t	Fri Oct 12 15:52:59 2012 -0500
@@ -332,6 +332,9 @@
   0
   $ log 'merge()'
   6
+  $ log 'branchpoint()'
+  1
+  4
   $ log 'modifies(b)'
   4
   $ log 'modifies("path:b")'
@@ -362,6 +365,13 @@
   $ log 'parents(merge())'
   4
   5
+  $ log 'p1(branchpoint())'
+  0
+  2
+  $ log 'p2(branchpoint())'
+  $ log 'parents(branchpoint())'
+  0
+  2
   $ log 'removes(a)'
   2
   6
--- a/tests/test-subrepo-recursion.t	Wed Oct 10 05:54:38 2012 +0200
+++ b/tests/test-subrepo-recursion.t	Fri Oct 12 15:52:59 2012 -0500
@@ -260,31 +260,33 @@
 Test archiving to a directory tree (the doubled lines in the output
 only show up in the test output, not in real usage):
 
-  $ hg archive --subrepos ../archive 2>&1 | "$TESTDIR/filtercr.py"
-  
-  archiving [                                           ] 0/3
-  archiving [                                           ] 0/3
-  archiving [=============>                             ] 1/3
-  archiving [=============>                             ] 1/3
-  archiving [===========================>               ] 2/3
-  archiving [===========================>               ] 2/3
-  archiving [==========================================>] 3/3
-  archiving [==========================================>] 3/3
-                                                              
-  archiving (foo) [                                     ] 0/3
-  archiving (foo) [                                     ] 0/3
-  archiving (foo) [===========>                         ] 1/3
-  archiving (foo) [===========>                         ] 1/3
-  archiving (foo) [=======================>             ] 2/3
-  archiving (foo) [=======================>             ] 2/3
-  archiving (foo) [====================================>] 3/3
-  archiving (foo) [====================================>] 3/3
-                                                              
-  archiving (foo/bar) [                                 ] 0/1 (glob)
-  archiving (foo/bar) [                                 ] 0/1 (glob)
-  archiving (foo/bar) [================================>] 1/1 (glob)
-  archiving (foo/bar) [================================>] 1/1 (glob)
-                                                              \r (esc)
+  $ hg archive --subrepos ../archive
+  \r (no-eol) (esc)
+  archiving [                                           ] 0/3\r (no-eol) (esc)
+  archiving [                                           ] 0/3\r (no-eol) (esc)
+  archiving [=============>                             ] 1/3\r (no-eol) (esc)
+  archiving [=============>                             ] 1/3\r (no-eol) (esc)
+  archiving [===========================>               ] 2/3\r (no-eol) (esc)
+  archiving [===========================>               ] 2/3\r (no-eol) (esc)
+  archiving [==========================================>] 3/3\r (no-eol) (esc)
+  archiving [==========================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (foo) [                                     ] 0/3\r (no-eol) (esc)
+  archiving (foo) [                                     ] 0/3\r (no-eol) (esc)
+  archiving (foo) [===========>                         ] 1/3\r (no-eol) (esc)
+  archiving (foo) [===========>                         ] 1/3\r (no-eol) (esc)
+  archiving (foo) [=======================>             ] 2/3\r (no-eol) (esc)
+  archiving (foo) [=======================>             ] 2/3\r (no-eol) (esc)
+  archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
+  archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (foo/bar) [                                 ] 0/1\r (no-eol) (esc)
+  archiving (foo/bar) [                                 ] 0/1\r (no-eol) (esc)
+  archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
+  archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   $ find ../archive | sort
   ../archive
   ../archive/.hg_archival.txt
@@ -300,65 +302,69 @@
 
 Test archiving to zip file (unzip output is unstable):
 
-  $ hg archive --subrepos ../archive.zip 2>&1 | "$TESTDIR/filtercr.py"
-  
-  archiving [                                           ] 0/3
-  archiving [                                           ] 0/3
-  archiving [=============>                             ] 1/3
-  archiving [=============>                             ] 1/3
-  archiving [===========================>               ] 2/3
-  archiving [===========================>               ] 2/3
-  archiving [==========================================>] 3/3
-  archiving [==========================================>] 3/3
-                                                              
-  archiving (foo) [                                     ] 0/3
-  archiving (foo) [                                     ] 0/3
-  archiving (foo) [===========>                         ] 1/3
-  archiving (foo) [===========>                         ] 1/3
-  archiving (foo) [=======================>             ] 2/3
-  archiving (foo) [=======================>             ] 2/3
-  archiving (foo) [====================================>] 3/3
-  archiving (foo) [====================================>] 3/3
-                                                              
-  archiving (foo/bar) [                                 ] 0/1 (glob)
-  archiving (foo/bar) [                                 ] 0/1 (glob)
-  archiving (foo/bar) [================================>] 1/1 (glob)
-  archiving (foo/bar) [================================>] 1/1 (glob)
-                                                              \r (esc)
+  $ hg archive --subrepos ../archive.zip
+  \r (no-eol) (esc)
+  archiving [                                           ] 0/3\r (no-eol) (esc)
+  archiving [                                           ] 0/3\r (no-eol) (esc)
+  archiving [=============>                             ] 1/3\r (no-eol) (esc)
+  archiving [=============>                             ] 1/3\r (no-eol) (esc)
+  archiving [===========================>               ] 2/3\r (no-eol) (esc)
+  archiving [===========================>               ] 2/3\r (no-eol) (esc)
+  archiving [==========================================>] 3/3\r (no-eol) (esc)
+  archiving [==========================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (foo) [                                     ] 0/3\r (no-eol) (esc)
+  archiving (foo) [                                     ] 0/3\r (no-eol) (esc)
+  archiving (foo) [===========>                         ] 1/3\r (no-eol) (esc)
+  archiving (foo) [===========>                         ] 1/3\r (no-eol) (esc)
+  archiving (foo) [=======================>             ] 2/3\r (no-eol) (esc)
+  archiving (foo) [=======================>             ] 2/3\r (no-eol) (esc)
+  archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
+  archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (foo/bar) [                                 ] 0/1\r (no-eol) (esc)
+  archiving (foo/bar) [                                 ] 0/1\r (no-eol) (esc)
+  archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
+  archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
 
 Test archiving a revision that references a subrepo that is not yet
 cloned:
 
   $ hg clone -U . ../empty
   $ cd ../empty
-  $ hg archive --subrepos -r tip ../archive.tar.gz 2>&1 | "$TESTDIR/filtercr.py"
-  
-  archiving [                                           ] 0/3
-  archiving [                                           ] 0/3
-  archiving [=============>                             ] 1/3
-  archiving [=============>                             ] 1/3
-  archiving [===========================>               ] 2/3
-  archiving [===========================>               ] 2/3
-  archiving [==========================================>] 3/3
-  archiving [==========================================>] 3/3
-                                                              
-  archiving (foo) [                                     ] 0/3
-  archiving (foo) [                                     ] 0/3
-  archiving (foo) [===========>                         ] 1/3
-  archiving (foo) [===========>                         ] 1/3
-  archiving (foo) [=======================>             ] 2/3
-  archiving (foo) [=======================>             ] 2/3
-  archiving (foo) [====================================>] 3/3
-  archiving (foo) [====================================>] 3/3
-                                                              
-  archiving (foo/bar) [                                 ] 0/1 (glob)
-  archiving (foo/bar) [                                 ] 0/1 (glob)
-  archiving (foo/bar) [================================>] 1/1 (glob)
-  archiving (foo/bar) [================================>] 1/1 (glob)
-                                                              
+  $ hg archive --subrepos -r tip ../archive.tar.gz
+  \r (no-eol) (esc)
+  archiving [                                           ] 0/3\r (no-eol) (esc)
+  archiving [                                           ] 0/3\r (no-eol) (esc)
+  archiving [=============>                             ] 1/3\r (no-eol) (esc)
+  archiving [=============>                             ] 1/3\r (no-eol) (esc)
+  archiving [===========================>               ] 2/3\r (no-eol) (esc)
+  archiving [===========================>               ] 2/3\r (no-eol) (esc)
+  archiving [==========================================>] 3/3\r (no-eol) (esc)
+  archiving [==========================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (foo) [                                     ] 0/3\r (no-eol) (esc)
+  archiving (foo) [                                     ] 0/3\r (no-eol) (esc)
+  archiving (foo) [===========>                         ] 1/3\r (no-eol) (esc)
+  archiving (foo) [===========>                         ] 1/3\r (no-eol) (esc)
+  archiving (foo) [=======================>             ] 2/3\r (no-eol) (esc)
+  archiving (foo) [=======================>             ] 2/3\r (no-eol) (esc)
+  archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
+  archiving (foo) [====================================>] 3/3\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
+  \r (no-eol) (esc)
+  archiving (foo/bar) [                                 ] 0/1\r (no-eol) (esc)
+  archiving (foo/bar) [                                 ] 0/1\r (no-eol) (esc)
+  archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
+  archiving (foo/bar) [================================>] 1/1\r (no-eol) (esc)
+                                                              \r (no-eol) (esc)
   cloning subrepo foo from $TESTTMP/repo/foo
   cloning subrepo foo/bar from $TESTTMP/repo/foo/bar (glob)
-  
+
 The newly cloned subrepos contain no working copy:
 
   $ hg -R foo summary