changeset 16109:cb756482c1aa

merge with stable
author Matt Mackall <mpm@selenic.com>
date Fri, 10 Feb 2012 17:09:23 -0600
parents 5535e66b3016 (current diff) f7e0d95d0a0b (diff)
children 47ee41fcf42b
files hgext/largefiles/overrides.py mercurial/commands.py tests/test-subrepo.t
diffstat 24 files changed, 236 insertions(+), 62 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/common.py	Fri Feb 10 13:50:13 2012 +0100
+++ b/hgext/convert/common.py	Fri Feb 10 17:09:23 2012 -0600
@@ -245,6 +245,10 @@
         """
         pass
 
+    def hascommit(self, rev):
+        """Return True if the sink contains rev"""
+        raise NotImplementedError()
+
 class commandline(object):
     def __init__(self, ui, command):
         self.ui = ui
@@ -407,3 +411,25 @@
         if self.fp:
             self.fp.close()
             self.fp = None
+
+def parsesplicemap(path):
+    """Parse a splicemap, return a child/parents dictionary."""
+    m = {}
+    try:
+        fp = open(path, 'r')
+        for i, line in enumerate(fp):
+            try:
+                child, parents = line.splitlines()[0].rstrip().rsplit(' ', 1)
+                parents = parents.replace(',', ' ').split()
+            except ValueError:
+                raise util.Abort(_('syntax error in %s(%d): child parent1'
+                                   '[,parent2] expected') % (path, i + 1))
+            pp = []
+            for p in parents:
+                if p not in pp:
+                    pp.append(p)
+            m[child] = pp
+    except IOError, e:
+        if e.errno != errno.ENOENT:
+            raise
+    return m
--- a/hgext/convert/convcmd.py	Fri Feb 10 13:50:13 2012 +0100
+++ b/hgext/convert/convcmd.py	Fri Feb 10 17:09:23 2012 -0600
@@ -15,7 +15,7 @@
 from gnuarch import gnuarch_source
 from bzr import bzr_source
 from p4 import p4_source
-import filemap
+import filemap, common
 
 import os, shutil
 from mercurial import hg, util, encoding
@@ -118,7 +118,7 @@
             self.readauthormap(opts.get('authormap'))
             self.authorfile = self.dest.authorfile()
 
-        self.splicemap = mapfile(ui, opts.get('splicemap'))
+        self.splicemap = common.parsesplicemap(opts.get('splicemap'))
         self.branchmap = mapfile(ui, opts.get('branchmap'))
 
     def walktree(self, heads):
@@ -142,6 +142,29 @@
 
         return parents
 
+    def mergesplicemap(self, parents, splicemap):
+        """A splicemap redefines child/parent relationships. Check the
+        map contains valid revision identifiers and merge the new
+        links in the source graph.
+        """
+        for c in splicemap:
+            if c not in parents:
+                if not self.dest.hascommit(self.map.get(c, c)):
+                    # Could be in source but not converted during this run
+                    self.ui.warn(_('splice map revision %s is not being '
+                                   'converted, ignoring\n') % c)
+                continue
+            pc = []
+            for p in splicemap[c]:
+                # We do not have to wait for nodes already in dest.
+                if self.dest.hascommit(self.map.get(p, p)):
+                    continue
+                # Parent is not in dest and not being converted, not good
+                if p not in parents:
+                    raise util.Abort(_('unknown splice map parent: %s') % p)
+                pc.append(p)
+            parents[c] = pc
+
     def toposort(self, parents, sortmode):
         '''Return an ordering such that every uncommitted changeset is
         preceeded by all its uncommitted ancestors.'''
@@ -319,7 +342,7 @@
                                   self.commitcache[prev].branch))
         self.dest.setbranch(commit.branch, pbranches)
         try:
-            parents = self.splicemap[rev].replace(',', ' ').split()
+            parents = self.splicemap[rev]
             self.ui.status(_('spliced in %s as parents of %s\n') %
                            (parents, rev))
             parents = [self.map.get(p, p) for p in parents]
@@ -340,6 +363,7 @@
             self.ui.status(_("scanning source...\n"))
             heads = self.source.getheads()
             parents = self.walktree(heads)
+            self.mergesplicemap(parents, self.splicemap)
             self.ui.status(_("sorting...\n"))
             t = self.toposort(parents, sortmode)
             num = len(t)
--- a/hgext/convert/hg.py	Fri Feb 10 13:50:13 2012 +0100
+++ b/hgext/convert/hg.py	Fri Feb 10 17:09:23 2012 -0600
@@ -223,6 +223,12 @@
             self.repo._bookmarks[bookmark] = bin(updatedbookmark[bookmark])
             bookmarks.write(self.repo)
 
+    def hascommit(self, rev):
+        if not rev in self.repo and self.clonebranches:
+            raise util.Abort(_('revision %s not be found in destination '
+                               'repository (lookups with clonebranches=true '
+                               'are not implemented)') % rev)
+        return rev in self.repo
 
 class mercurial_source(converter_source):
     def __init__(self, ui, path, rev=None):
--- a/hgext/convert/subversion.py	Fri Feb 10 13:50:13 2012 +0100
+++ b/hgext/convert/subversion.py	Fri Feb 10 17:09:23 2012 -0600
@@ -1187,3 +1187,12 @@
     def puttags(self, tags):
         self.ui.warn(_('writing Subversion tags is not yet implemented\n'))
         return None, None
+
+    def hascommit(self, rev):
+        # This is not correct as one can convert to an existing subversion
+        # repository and childmap would not list all revisions. Too bad.
+        if rev in self.childmap:
+            return True
+        raise util.Abort(_('splice map revision %s not found in subversion '
+                           'child map (revision lookups are not implemented')
+                         % rev)
--- a/hgext/largefiles/lfutil.py	Fri Feb 10 13:50:13 2012 +0100
+++ b/hgext/largefiles/lfutil.py	Fri Feb 10 17:09:23 2012 -0600
@@ -449,3 +449,11 @@
 class storeprotonotcapable(Exception):
     def __init__(self, storetypes):
         self.storetypes = storetypes
+
+def getcurrentheads(repo):
+    branches = repo.branchmap()
+    heads = []
+    for branch in branches:
+        newheads = repo.branchheads(branch)
+        heads = heads + newheads
+    return heads
--- a/hgext/largefiles/overrides.py	Fri Feb 10 13:50:13 2012 +0100
+++ b/hgext/largefiles/overrides.py	Fri Feb 10 17:09:23 2012 -0600
@@ -657,6 +657,7 @@
         repo.lfpullsource = source
         if not source:
             source = 'default'
+        oldheads = lfutil.getcurrentheads(repo)
         result = orig(ui, repo, source, **opts)
         # If we do not have the new largefiles for any new heads we pulled, we
         # will run into a problem later if we try to merge or rebase with one of
@@ -664,12 +665,11 @@
         # cache.
         ui.status(_("caching new largefiles\n"))
         numcached = 0
-        branches = repo.branchmap()
-        for branch in branches:
-            heads = repo.branchheads(branch)
-            for head in heads:
-                (cached, missing) = lfcommands.cachelfiles(ui, repo, head)
-                numcached += len(cached)
+        heads = lfutil.getcurrentheads(repo)
+        newheads = set(heads).difference(set(oldheads))
+        for head in newheads:
+            (cached, missing) = lfcommands.cachelfiles(ui, repo, head)
+            numcached += len(cached)
         ui.status(_("%d largefiles cached\n" % numcached))
     return result
 
--- a/mercurial/cmdutil.py	Fri Feb 10 13:50:13 2012 +0100
+++ b/mercurial/cmdutil.py	Fri Feb 10 17:09:23 2012 -0600
@@ -979,7 +979,7 @@
     wanted = set()
     slowpath = match.anypats() or (match.files() and opts.get('removed'))
     fncache = {}
-    change = util.cachefunc(repo.changectx)
+    change = repo.changectx
 
     # First step is to fill wanted, the set of revisions that we want to yield.
     # When it does not induce extra cost, we also fill fncache for revisions in
--- a/mercurial/commands.py	Fri Feb 10 13:50:13 2012 +0100
+++ b/mercurial/commands.py	Fri Feb 10 17:09:23 2012 -0600
@@ -4276,7 +4276,7 @@
 
 def postincoming(ui, repo, modheads, optupdate, checkout):
     if modheads == 0:
-        return 1
+        return
     if optupdate:
         movemarkfrom = repo['.'].node()
         try:
@@ -4327,8 +4327,7 @@
     If SOURCE is omitted, the 'default' path will be used.
     See :hg:`help urls` for more information.
 
-    Returns 0 on success, 1 if no changes found or an update had
-    unresolved files.
+    Returns 0 on success, 1 if an update had unresolved files.
     """
     source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
     other = hg.peer(repo, opts, source)
--- a/tests/test-bookmarks-pushpull.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-bookmarks-pushpull.t	Fri Feb 10 17:09:23 2012 -0600
@@ -44,7 +44,6 @@
   pulling from ../a
   no changes found
   importing bookmark X
-  [1]
   $ hg bookmark
      X                         0:4e3505fd9583
      Y                         0:4e3505fd9583
@@ -185,7 +184,6 @@
   no changes found
   divergent bookmark X stored as X@1
   importing bookmark Z
-  [1]
   $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
   requesting all changes
   adding changesets
--- a/tests/test-bundle.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-bundle.t	Fri Feb 10 17:09:23 2012 -0600
@@ -85,7 +85,6 @@
   pulling from ../full.hg
   searching for changes
   no changes found
-  [1]
 
 Pull full.hg into empty (using --cwd)
 
@@ -120,7 +119,6 @@
   pulling from full.hg
   searching for changes
   no changes found
-  [1]
 
 Pull full.hg into empty (using -R)
 
@@ -128,7 +126,6 @@
   pulling from full.hg
   searching for changes
   no changes found
-  [1]
 
 Rollback empty
 
--- a/tests/test-convert-splicemap.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-convert-splicemap.t	Fri Feb 10 17:09:23 2012 -0600
@@ -4,7 +4,8 @@
   $ echo 'graphlog =' >> $HGRCPATH
   $ glog()
   > {
-  >     hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
+  >     hg glog --template '{rev}:{node|short} "{desc|firstline}"\
+  >  files: {files}\n' "$@"
   > }
   $ hg init repo1
   $ cd repo1
@@ -21,6 +22,14 @@
   adding c
   $ PARENTID2=`hg id --debug -i`
   $ cd ..
+  $ glog -R repo1
+  @  2:e55c719b85b6 "addc" files: c
+  |
+  o  1:6d4c2037ddc2 "addb" files: a b
+  |
+  o  0:07f494440405 "adda" files: a
+  
+
   $ hg init repo2
   $ cd repo2
   $ echo b > a
@@ -36,6 +45,13 @@
   $ hg ci -Am adde
   adding e
   $ cd ..
+  $ glog -R repo2
+  @  2:a39b65753b0a "adde" files: e
+  |
+  o  1:e4ea00df9189 "changed" files: d
+  |
+  o  0:527cdedf31fb "addaandd" files: a d
+  
 
 test invalid splicemap
 
@@ -43,15 +59,18 @@
   > $CHILDID2
   > EOF
   $ hg convert --splicemap splicemap repo2 repo1
-  abort: syntax error in splicemap(1): key/value pair expected
+  abort: syntax error in splicemap(1): child parent1[,parent2] expected
   [255]
 
 splice repo2 on repo1
 
   $ cat > splicemap <<EOF
-  > $CHILDID1 $PARENTID1 
+  > $CHILDID1 $PARENTID1
   > $CHILDID2 $PARENTID2,$CHILDID1
   > EOF
+  $ cat splicemap
+  527cdedf31fbd5ea708aa14eeecf53d4676f38db 6d4c2037ddc2cb2627ac3a244ecce35283268f8e
+  e4ea00df91897da3079a10fab658c1eddba6617b e55c719b85b60e5102fac26110ba626e7cb6b7dc,527cdedf31fbd5ea708aa14eeecf53d4676f38db
   $ hg clone repo1 target1
   updating to branch default
   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
@@ -65,15 +84,137 @@
   spliced in ['e55c719b85b60e5102fac26110ba626e7cb6b7dc', '527cdedf31fbd5ea708aa14eeecf53d4676f38db'] as parents of e4ea00df91897da3079a10fab658c1eddba6617b
   0 adde
   $ glog -R target1
-  o  5 "adde" files: e
+  o  5:16bc847b02aa "adde" files: e
+  |
+  o    4:e30e4fee3418 "changed" files: d
+  |\
+  | o  3:e673348c3a3c "addaandd" files: a d
+  | |
+  @ |  2:e55c719b85b6 "addc" files: c
+  |/
+  o  1:6d4c2037ddc2 "addb" files: a b
   |
-  o    4 "changed" files: d
+  o  0:07f494440405 "adda" files: a
+  
+
+
+
+Test splicemap and conversion order
+
+  $ hg init ordered
+  $ cd ordered
+  $ echo a > a
+  $ hg ci -Am adda
+  adding a
+  $ hg branch branch
+  marked working directory as branch branch
+  (branches are permanent and global, did you want a bookmark?)
+  $ echo a >> a
+  $ hg ci -Am changea
+  $ echo a >> a
+  $ hg ci -Am changeaagain
+  $ hg up 0
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo b > b
+  $ hg ci -Am addb
+  adding b
+
+We want 2 to depend on 1 and 3. Since 3 is always converted after 2,
+the bug should be exhibited with all conversion orders.
+
+  $ cat > ../splicemap <<EOF
+  > $(hg id -r 2 -i --debug) $(hg id -r 1 -i --debug),$(hg id -r 3 -i --debug)
+  > EOF
+  $ cd ..
+  $ cat splicemap
+  7c364e7fa7d70ae525610c016317ed717b519d97 717d54d67e6c31fd75ffef2ff3042bdd98418437,102a90ea7b4a3361e4082ed620918c261189a36a
+
+Test regular conversion
+
+  $ hg convert --splicemap splicemap ordered ordered-hg1
+  initializing destination ordered-hg1 repository
+  scanning source...
+  sorting...
+  converting...
+  3 adda
+  2 changea
+  1 addb
+  0 changeaagain
+  spliced in ['717d54d67e6c31fd75ffef2ff3042bdd98418437', '102a90ea7b4a3361e4082ed620918c261189a36a'] as parents of 7c364e7fa7d70ae525610c016317ed717b519d97
+  $ glog -R ordered-hg1
+  o    3:4cb04b9afbf2 "changeaagain" files: a
   |\
-  | o  3 "addaandd" files: a d
+  | o  2:102a90ea7b4a "addb" files: b
   | |
-  @ |  2 "addc" files: c
+  o |  1:717d54d67e6c "changea" files: a
   |/
-  o  1 "addb" files: a b
-  |
-  o  0 "adda" files: a
+  o  0:07f494440405 "adda" files: a
   
+
+Test conversion with parent revisions already in dest, using source
+and destination identifiers. Test unknown splicemap target.
+
+  $ hg convert -r1 ordered ordered-hg2
+  initializing destination ordered-hg2 repository
+  scanning source...
+  sorting...
+  converting...
+  1 adda
+  0 changea
+  $ hg convert -r3 ordered ordered-hg2
+  scanning source...
+  sorting...
+  converting...
+  0 addb
+  $ cat > splicemap <<EOF
+  > $(hg -R ordered id -r 2 -i --debug) \
+  > $(hg -R ordered-hg2 id -r 1 -i --debug),\
+  > $(hg -R ordered-hg2 id -r 2 -i --debug)
+  > deadbeef102a90ea7b4a3361e4082ed620918c26 deadbeef102a90ea7b4a3361e4082ed620918c27
+  > EOF
+  $ hg convert --splicemap splicemap ordered ordered-hg2
+  scanning source...
+  splice map revision deadbeef102a90ea7b4a3361e4082ed620918c26 is not being converted, ignoring
+  sorting...
+  converting...
+  0 changeaagain
+  spliced in ['717d54d67e6c31fd75ffef2ff3042bdd98418437', '102a90ea7b4a3361e4082ed620918c261189a36a'] as parents of 7c364e7fa7d70ae525610c016317ed717b519d97
+  $ glog -R ordered-hg2
+  o    3:4cb04b9afbf2 "changeaagain" files: a
+  |\
+  | o  2:102a90ea7b4a "addb" files: b
+  | |
+  o |  1:717d54d67e6c "changea" files: a
+  |/
+  o  0:07f494440405 "adda" files: a
+  
+
+Test empty conversion
+
+  $ hg convert --splicemap splicemap ordered ordered-hg2
+  scanning source...
+  splice map revision deadbeef102a90ea7b4a3361e4082ed620918c26 is not being converted, ignoring
+  sorting...
+  converting...
+
+Test clonebranches
+
+  $ hg --config convert.hg.clonebranches=true convert \
+  >   --splicemap splicemap ordered ordered-hg3
+  initializing destination ordered-hg3 repository
+  scanning source...
+  abort: revision 717d54d67e6c31fd75ffef2ff3042bdd98418437 not be found in destination repository (lookups with clonebranches=true are not implemented)
+  [255]
+
+Test invalid dependency
+
+  $ cat > splicemap <<EOF
+  > $(hg -R ordered id -r 2 -i --debug) \
+  > deadbeef102a90ea7b4a3361e4082ed620918c26,\
+  > $(hg -R ordered-hg2 id -r 2 -i --debug)
+  > EOF
+  $ hg convert --splicemap splicemap ordered ordered-hg4
+  initializing destination ordered-hg4 repository
+  scanning source...
+  abort: unknown splice map parent: deadbeef102a90ea7b4a3361e4082ed620918c26
+  [255]
--- a/tests/test-convert.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-convert.t	Fri Feb 10 17:09:23 2012 -0600
@@ -293,7 +293,6 @@
   pulling from ../a
   searching for changes
   no changes found
-  [1]
   $ touch bogusfile
 
 should fail
--- a/tests/test-hook.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-hook.t	Fri Feb 10 17:09:23 2012 -0600
@@ -196,7 +196,6 @@
   listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'} 
   listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'} 
   importing bookmark bar
-  [1]
   $ cd ../a
 
 test that prepushkey can prevent incoming keys
--- a/tests/test-https.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-https.t	Fri Feb 10 17:09:23 2012 -0600
@@ -160,7 +160,6 @@
   pulling from https://localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
   $ mv copy-pull/.hg/hgrc.bu copy-pull/.hg/hgrc
 
 cacert configured globally, also testing expansion of environment
@@ -172,13 +171,11 @@
   pulling from https://localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
   $ P=`pwd` hg -R copy-pull pull --insecure
   warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
   pulling from https://localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
 
 cacert mismatch
 
@@ -191,7 +188,6 @@
   pulling from https://127.0.0.1:$HGPORT/
   searching for changes
   no changes found
-  [1]
   $ hg -R copy-pull pull --config web.cacerts=pub-other.pem
   abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
   [255]
@@ -200,7 +196,6 @@
   pulling from https://localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
 
 Test server cert which isn't valid yet
 
@@ -260,7 +255,6 @@
   pulling from https://localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
 
 Test https with cacert and fingerprint through proxy
 
@@ -268,12 +262,10 @@
   pulling from https://localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
   $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull https://127.0.0.1:$HGPORT/
   pulling from https://127.0.0.1:$HGPORT/
   searching for changes
   no changes found
-  [1]
 
 Test https with cert problems through proxy
 
--- a/tests/test-mq-qimport-fail-cleanup.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-mq-qimport-fail-cleanup.t	Fri Feb 10 17:09:23 2012 -0600
@@ -34,7 +34,6 @@
   b.patch
 
   $ hg pull -q -r 0 . # update phase
-  [1]
   $ hg qimport -r 0
   abort: revision 0 is not mutable
   (see "hg help phases" for details)
--- a/tests/test-pending.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-pending.t	Fri Feb 10 17:09:23 2012 -0600
@@ -102,7 +102,6 @@
   rollback completed
   abort: pretxnchangegroup hook failed
   pull 0000000000000000000000000000000000000000
-  [1]
 
 test external hook
 
@@ -118,4 +117,3 @@
   rollback completed
   abort: pretxnchangegroup hook exited with status 1
   pull 0000000000000000000000000000000000000000
-  [1]
--- a/tests/test-phases-exchange.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-phases-exchange.t	Fri Feb 10 17:09:23 2012 -0600
@@ -136,7 +136,6 @@
   pulling from ../alpha
   searching for changes
   no changes found
-  [1]
   $ hgph
   o  4 public a-D - b555f63b6063
   |
@@ -344,7 +343,6 @@
   pulling from ../alpha
   searching for changes
   no changes found
-  [1]
   $ hgph
   @  6 public n-B - 145e75495359
   |
@@ -777,7 +775,6 @@
   pulling from ../mu
   searching for changes
   no changes found
-  [1]
   $ hgph
   @  11 draft A-secret - 435b5d83910c
   |
@@ -930,7 +927,6 @@
   pulling from http://localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
   $ hg phase f54f1bb90ff3
   2: draft
 
--- a/tests/test-pull-r.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-pull-r.t	Fri Feb 10 17:09:23 2012 -0600
@@ -100,5 +100,4 @@
 This used to abort: received changelog group is empty:
 
   $ hg pull -qr 1 ../repo
-  [1]
 
--- a/tests/test-pull.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-pull.t	Fri Feb 10 17:09:23 2012 -0600
@@ -48,7 +48,6 @@
   pulling from http://foo@localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
 
   $ hg rollback --dry-run --verbose
   repository tip rolled back to revision -1 (undo pull: http://foo:***@localhost:$HGPORT/)
@@ -78,7 +77,6 @@
   [255]
 
   $ hg pull -q file:../test
-  [1]
 
 It's tricky to make file:// URLs working on every platform with
 regular shell commands.
@@ -90,4 +88,3 @@
 
   $ URL=`python -c "import os; print 'file://localhost' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"`
   $ hg pull -q "$URL"
-  [1]
--- a/tests/test-ssh.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-ssh.t	Fri Feb 10 17:09:23 2012 -0600
@@ -80,7 +80,6 @@
   pulling from ssh://user@dummy/remote
   searching for changes
   no changes found
-  [1]
 
 local change
 
@@ -199,7 +198,6 @@
   no changes found
   updating bookmark foo
   importing bookmark foo
-  [1]
   $ hg book -d foo
   $ hg push -B foo
   pushing to ssh://user@dummy/remote
--- a/tests/test-subrepo.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-subrepo.t	Fri Feb 10 17:09:23 2012 -0600
@@ -569,7 +569,6 @@
   cloning subrepo s from $TESTTMP/sub/repo/s (glob)
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg -q -R repo2 pull -u
-  [1]
   $ echo 1 > repo2/s/a
   $ hg -R repo2/s ci -m2
   $ hg -q -R repo2/s push
@@ -627,7 +626,6 @@
   pulling from issue1852a
   searching for changes
   no changes found
-  [1]
 
 Try the same, but with pull -u
 
--- a/tests/test-treediscovery-legacy.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-treediscovery-legacy.t	Fri Feb 10 17:09:23 2012 -0600
@@ -48,7 +48,6 @@
   $ hg pull -R empty1 $remote
   pulling from http://localhost:$HGPORT/
   no changes found
-  [1]
   $ hg push -R empty1 $remote
   pushing to http://localhost:$HGPORT/
   no changes found
@@ -108,7 +107,6 @@
   pulling from http://localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
   $ hg push $remote
   pushing to http://localhost:$HGPORT/
   searching for changes
@@ -233,7 +231,6 @@
   pulling from http://localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
   $ hg push $remote
   pushing to http://localhost:$HGPORT/
   searching for changes
@@ -278,7 +275,6 @@
   pulling from http://localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
   $ hg push $remote
   pushing to http://localhost:$HGPORT/
   searching for changes
--- a/tests/test-treediscovery.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-treediscovery.t	Fri Feb 10 17:09:23 2012 -0600
@@ -42,7 +42,6 @@
   $ hg pull -R empty1 $remote
   pulling from http://localhost:$HGPORT/
   no changes found
-  [1]
   $ hg push -R empty1 $remote
   pushing to http://localhost:$HGPORT/
   no changes found
@@ -102,7 +101,6 @@
   pulling from http://localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
   $ hg push $remote
   pushing to http://localhost:$HGPORT/
   searching for changes
@@ -221,7 +219,6 @@
   pulling from http://localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
   $ hg push $remote
   pushing to http://localhost:$HGPORT/
   searching for changes
@@ -266,7 +263,6 @@
   pulling from http://localhost:$HGPORT/
   searching for changes
   no changes found
-  [1]
   $ hg push $remote
   pushing to http://localhost:$HGPORT/
   searching for changes
--- a/tests/test-url-rev.t	Fri Feb 10 13:50:13 2012 +0100
+++ b/tests/test-url-rev.t	Fri Feb 10 17:09:23 2012 -0600
@@ -141,7 +141,6 @@
 No new revs, no update:
 
   $ hg pull -qu
-  [1]
 
   $ hg parents -q
   0:1f0dee641bb7