changeset 16128:004982e5d782

merge with stable
author Matt Mackall <mpm@selenic.com>
date Thu, 16 Feb 2012 16:40:29 -0600
parents 14dc2bbba6d2 (current diff) 0e0060bf2f44 (diff)
children 5e50982c633c
files hgext/mq.py mercurial/context.py mercurial/localrepo.py
diffstat 18 files changed, 337 insertions(+), 83 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/common.py	Thu Feb 16 15:58:51 2012 -0600
+++ b/hgext/convert/common.py	Thu Feb 16 16:40:29 2012 -0600
@@ -419,7 +419,7 @@
         fp = open(path, 'r')
         for i, line in enumerate(fp):
             try:
-                child, parents = line.splitlines()[0].rstrip().rsplit(' ', 1)
+                child, parents = line.splitlines()[0].rstrip().split(' ', 1)
                 parents = parents.replace(',', ' ').split()
             except ValueError:
                 raise util.Abort(_('syntax error in %s(%d): child parent1'
--- a/hgext/largefiles/reposetup.py	Thu Feb 16 15:58:51 2012 -0600
+++ b/hgext/largefiles/reposetup.py	Thu Feb 16 16:40:29 2012 -0600
@@ -118,8 +118,10 @@
                 # handle it -- thus gaining a big performance boost.
                 lfdirstate = lfutil.openlfdirstate(ui, self)
                 if match.files() and not match.anypats():
-                    matchedfiles = [f for f in match.files() if f in lfdirstate]
-                    if not matchedfiles:
+                    for f in lfdirstate:
+                        if match(f):
+                            break
+                    else:
                         return super(lfiles_repo, self).status(node1, node2,
                                 match, listignored, listclean,
                                 listunknown, listsubrepos)
--- a/hgext/mq.py	Thu Feb 16 15:58:51 2012 -0600
+++ b/hgext/mq.py	Thu Feb 16 16:40:29 2012 -0600
@@ -1796,6 +1796,7 @@
         if (len(files) > 1 or len(rev) > 1) and patchname:
             raise util.Abort(_('option "-n" not valid when importing multiple '
                                'patches'))
+        imported = []
         if rev:
             # If mq patches are applied, we can only import revisions
             # that form a linear path to qbase.
@@ -1848,6 +1849,7 @@
                 self.applied.insert(0, se)
 
                 self.added.append(patchname)
+                imported.append(patchname)
                 patchname = None
             if rev and repo.ui.configbool('mq', 'secret', False):
                 # if we added anything with --rev, we must move the secret root
@@ -1902,9 +1904,11 @@
             self.seriesdirty = True
             self.ui.warn(_("adding %s to series file\n") % patchname)
             self.added.append(patchname)
+            imported.append(patchname)
             patchname = None
 
         self.removeundo(repo)
+        return imported
 
 @command("qdelete|qremove|qrm",
          [('k', 'keep', None, _('keep patch file')),
@@ -2030,15 +2034,16 @@
     try:
         q = repo.mq
         try:
-            q.qimport(repo, filename, patchname=opts.get('name'),
-                  existing=opts.get('existing'), force=opts.get('force'),
-                  rev=opts.get('rev'), git=opts.get('git'))
+            imported = q.qimport(
+                repo, filename, patchname=opts.get('name'),
+                existing=opts.get('existing'), force=opts.get('force'),
+                rev=opts.get('rev'), git=opts.get('git'))
         finally:
             q.savedirty()
 
 
-        if opts.get('push') and not opts.get('rev'):
-            return q.push(repo, None)
+        if imported and opts.get('push') and not opts.get('rev'):
+            return q.push(repo, imported[-1])
     finally:
         lock.release()
     return 0
--- a/mercurial/commandserver.py	Thu Feb 16 15:58:51 2012 -0600
+++ b/mercurial/commandserver.py	Thu Feb 16 16:40:29 2012 -0600
@@ -186,6 +186,7 @@
         self.repo.baseui = copiedui
         self.repo.ui = self.repo.dirstate._ui = self.repoui.copy()
         self.repo.invalidate()
+        self.repo.invalidatedirstate()
 
         req = dispatch.request(args[:], copiedui, self.repo, self.cin,
                                self.cout, self.cerr)
--- a/mercurial/context.py	Thu Feb 16 15:58:51 2012 -0600
+++ b/mercurial/context.py	Thu Feb 16 16:40:29 2012 -0600
@@ -902,11 +902,11 @@
         try:
             rejected = []
             for f in files:
-                if self._repo.dirstate[f] != 'a':
-                    self._repo.dirstate.remove(f)
-                elif f not in self._repo.dirstate:
+                if f not in self._repo.dirstate:
                     self._repo.ui.warn(_("%s not tracked!\n") % join(f))
                     rejected.append(f)
+                elif self._repo.dirstate[f] != 'a':
+                    self._repo.dirstate.remove(f)
                 else:
                     self._repo.dirstate.drop(f)
             return rejected
--- a/mercurial/localrepo.py	Thu Feb 16 15:58:51 2012 -0600
+++ b/mercurial/localrepo.py	Thu Feb 16 16:40:29 2012 -0600
@@ -949,6 +949,7 @@
             self.store.write()
             if self._dirtyphases:
                 phases.writeroots(self)
+                self._dirtyphases = False
             for k, ce in self._filecache.items():
                 if k == 'dirstate':
                     continue
@@ -1323,6 +1324,9 @@
         # tag cache retrieval" case to work.
         self.invalidatecaches()
 
+        # Discard all cache entries to force reloading everything.
+        self._filecache.clear()
+
     def walk(self, match, node=None):
         '''
         walk recursively through the directory tree or a given
--- a/mercurial/patch.py	Thu Feb 16 15:58:51 2012 -0600
+++ b/mercurial/patch.py	Thu Feb 16 16:40:29 2012 -0600
@@ -475,9 +475,15 @@
         addremoved = set(self.changed)
         for src, dst in self.copied:
             scmutil.dirstatecopy(self.ui, self.repo, wctx, src, dst)
-            addremoved.discard(src)
-        if (not self.similarity) and self.removed:
+        if self.removed:
             wctx.forget(sorted(self.removed))
+            for f in self.removed:
+                if f not in self.repo.dirstate:
+                    # File was deleted and no longer belongs to the
+                    # dirstate, it was probably marked added then
+                    # deleted, and should not be considered by
+                    # addremove().
+                    addremoved.discard(f)
         if addremoved:
             cwd = self.repo.getcwd()
             if cwd:
@@ -722,21 +728,19 @@
             h = h.getnormalized()
 
         # fast case first, no offsets, no fuzz
-        old = h.old()
-        start = h.starta + self.offset
-        # zero length hunk ranges already have their start decremented
-        if h.lena:
-            start -= 1
-        orig_start = start
+        old, oldstart, new, newstart = h.fuzzit(0, False)
+        oldstart += self.offset
+        orig_start = oldstart
         # if there's skew we want to emit the "(offset %d lines)" even
         # when the hunk cleanly applies at start + skew, so skip the
         # fast case code
-        if self.skew == 0 and diffhelpers.testhunk(old, self.lines, start) == 0:
+        if (self.skew == 0 and
+            diffhelpers.testhunk(old, self.lines, oldstart) == 0):
             if self.remove:
                 self.backend.unlink(self.fname)
             else:
-                self.lines[start : start + h.lena] = h.new()
-                self.offset += h.lenb - h.lena
+                self.lines[oldstart:oldstart + len(old)] = new
+                self.offset += len(new) - len(old)
                 self.dirty = True
             return 0
 
@@ -744,23 +748,23 @@
         self.hash = {}
         for x, s in enumerate(self.lines):
             self.hash.setdefault(s, []).append(x)
-        if h.hunk[-1][0] != ' ':
-            # if the hunk tried to put something at the bottom of the file
-            # override the start line and use eof here
-            search_start = len(self.lines)
-        else:
-            search_start = orig_start + self.skew
 
         for fuzzlen in xrange(3):
             for toponly in [True, False]:
-                old = h.old(fuzzlen, toponly)
+                old, oldstart, new, newstart = h.fuzzit(fuzzlen, toponly)
+                oldstart = oldstart + self.offset + self.skew
+                oldstart = min(oldstart, len(self.lines))
+                if old:
+                    cand = self.findlines(old[0][1:], oldstart)
+                else:
+                    # Only adding lines with no or fuzzed context, just
+                    # take the skew in account
+                    cand = [oldstart]
 
-                cand = self.findlines(old[0][1:], search_start)
                 for l in cand:
-                    if diffhelpers.testhunk(old, self.lines, l) == 0:
-                        newlines = h.new(fuzzlen, toponly)
-                        self.lines[l : l + len(old)] = newlines
-                        self.offset += len(newlines) - len(old)
+                    if not old or diffhelpers.testhunk(old, self.lines, l) == 0:
+                        self.lines[l : l + len(old)] = new
+                        self.offset += len(new) - len(old)
                         self.skew = l - orig_start
                         self.dirty = True
                         offset = l - orig_start - fuzzlen
@@ -965,11 +969,11 @@
     def complete(self):
         return len(self.a) == self.lena and len(self.b) == self.lenb
 
-    def fuzzit(self, l, fuzz, toponly):
+    def _fuzzit(self, old, new, fuzz, toponly):
         # this removes context lines from the top and bottom of list 'l'.  It
         # checks the hunk to make sure only context lines are removed, and then
         # returns a new shortened list of lines.
-        fuzz = min(fuzz, len(l)-1)
+        fuzz = min(fuzz, len(old))
         if fuzz:
             top = 0
             bot = 0
@@ -987,26 +991,21 @@
                     else:
                         break
 
-            # top and bot now count context in the hunk
-            # adjust them if either one is short
-            context = max(top, bot, 3)
-            if bot < context:
-                bot = max(0, fuzz - (context - bot))
-            else:
-                bot = min(fuzz, bot)
-            if top < context:
-                top = max(0, fuzz - (context - top))
-            else:
-                top = min(fuzz, top)
+            bot = min(fuzz, bot)
+            top = min(fuzz, top)
+            return old[top:len(old)-bot], new[top:len(new)-bot], top
+        return old, new, 0
 
-            return l[top:len(l)-bot]
-        return l
-
-    def old(self, fuzz=0, toponly=False):
-        return self.fuzzit(self.a, fuzz, toponly)
-
-    def new(self, fuzz=0, toponly=False):
-        return self.fuzzit(self.b, fuzz, toponly)
+    def fuzzit(self, fuzz, toponly):
+        old, new, top = self._fuzzit(self.a, self.b, fuzz, toponly)
+        oldstart = self.starta + top
+        newstart = self.startb + top
+        # zero length hunk ranges already have their start decremented
+        if self.lena:
+            oldstart -= 1
+        if self.lenb:
+            newstart -= 1
+        return old, oldstart, new, newstart
 
 class binhunk(object):
     'A binary patch file. Only understands literals so far.'
--- a/mercurial/scmutil.py	Thu Feb 16 15:58:51 2012 -0600
+++ b/mercurial/scmutil.py	Thu Feb 16 16:40:29 2012 -0600
@@ -803,6 +803,10 @@
         return self
 
     def __get__(self, obj, type=None):
+        # do we need to check if the file changed?
+        if self.name in obj.__dict__:
+            return obj.__dict__[self.name]
+
         entry = obj._filecache.get(self.name)
 
         if entry:
@@ -818,5 +822,16 @@
 
             obj._filecache[self.name] = entry
 
-        setattr(obj, self.name, entry.obj)
+        obj.__dict__[self.name] = entry.obj
         return entry.obj
+
+    def __set__(self, obj, value):
+        if self.name in obj._filecache:
+            obj._filecache[self.name].obj = value # update cached copy
+        obj.__dict__[self.name] = value # update copy returned by obj.x
+
+    def __delete__(self, obj):
+        try:
+            del obj.__dict__[self.name]
+        except KeyError:
+            raise AttributeError, self.name
--- a/mercurial/statichttprepo.py	Thu Feb 16 15:58:51 2012 -0600
+++ b/mercurial/statichttprepo.py	Thu Feb 16 16:40:29 2012 -0600
@@ -112,6 +112,7 @@
         self.spath = self.store.path
         self.sopener = self.store.opener
         self.sjoin = self.store.join
+        self._filecache = {}
 
         self.manifest = manifest.manifest(self.sopener)
         self.changelog = changelog.changelog(self.sopener)
@@ -122,7 +123,6 @@
         self.encodepats = None
         self.decodepats = None
         self.capabilities.difference_update(["pushkey"])
-        self._filecache = {}
 
     def url(self):
         return self._url
--- a/tests/test-commandserver.py	Thu Feb 16 15:58:51 2012 -0600
+++ b/tests/test-commandserver.py	Thu Feb 16 16:40:29 2012 -0600
@@ -27,6 +27,7 @@
 
 def runcommand(server, args, output=sys.stdout, error=sys.stderr, input=None):
     print ' runcommand', ' '.join(args)
+    sys.stdout.flush()
     server.stdin.write('runcommand\n')
     writeblock(server, '\0'.join(args))
 
@@ -56,6 +57,7 @@
     print
     print 'testing %s:' % func.__name__
     print
+    sys.stdout.flush()
     server = connect(repopath)
     try:
         return func(server)
@@ -163,8 +165,10 @@
     f = open('a', 'ab')
     f.write('a\n')
     f.close()
+    runcommand(server, ['status'])
     os.system('hg ci -Am2')
     runcommand(server, ['tip'])
+    runcommand(server, ['status'])
 
 def bookmarks(server):
     readchannel(server)
@@ -179,6 +183,13 @@
     os.system('hg upd bm1 -q')
     runcommand(server, ['bookmarks'])
 
+    runcommand(server, ['bookmarks', 'bm3'])
+    f = open('a', 'ab')
+    f.write('a\n')
+    f.close()
+    runcommand(server, ['commit', '-Amm'])
+    runcommand(server, ['bookmarks'])
+
 def tagscache(server):
     readchannel(server)
     runcommand(server, ['id', '-t', '-r', '0'])
@@ -191,6 +202,16 @@
     os.system('hg phase -r . -p')
     runcommand(server, ['phase', '-r', '.'])
 
+def rollback(server):
+    readchannel(server)
+    runcommand(server, ['phase', '-r', '.', '-p'])
+    f = open('a', 'ab')
+    f.write('a\n')
+    f.close()
+    runcommand(server, ['commit', '-Am.'])
+    runcommand(server, ['rollback'])
+    runcommand(server, ['phase', '-r', '.'])
+
 if __name__ == '__main__':
     os.system('hg init')
 
@@ -210,3 +231,4 @@
     check(bookmarks)
     check(tagscache)
     check(setphase)
+    check(rollback)
--- a/tests/test-commandserver.py.out	Thu Feb 16 15:58:51 2012 -0600
+++ b/tests/test-commandserver.py.out	Thu Feb 16 16:40:29 2012 -0600
@@ -4,10 +4,10 @@
 o, 'capabilities: getencoding runcommand\nencoding: ***'
  runcommand id
 000000000000 tip
-abort: unknown command unknowncommand
 
 testing unknowncommand:
 
+abort: unknown command unknowncommand
 
 testing checkruncommand:
 
@@ -93,6 +93,8 @@
 
 testing outsidechanges:
 
+ runcommand status
+M a
  runcommand tip
 changeset:   1:d3a0a68be6de
 tag:         tip
@@ -100,6 +102,7 @@
 date:        Thu Jan 01 00:00:00 1970 +0000
 summary:     2
 
+ runcommand status
 
 testing bookmarks:
 
@@ -111,6 +114,12 @@
  runcommand bookmarks
  * bm1                       1:d3a0a68be6de
    bm2                       1:d3a0a68be6de
+ runcommand bookmarks bm3
+ runcommand commit -Amm
+ runcommand bookmarks
+   bm1                       1:d3a0a68be6de
+   bm2                       1:d3a0a68be6de
+ * bm3                       2:aef17e88f5f0
 
 testing tagscache:
 
@@ -122,6 +131,17 @@
 testing setphase:
 
  runcommand phase -r .
-2: draft
+3: draft
  runcommand phase -r .
-2: public
+3: public
+
+testing rollback:
+
+ runcommand phase -r . -p
+no phases changed
+ runcommand commit -Am.
+ runcommand rollback
+repository tip rolled back to revision 3 (undo commit)
+working directory now based on revision 3
+ runcommand phase -r .
+3: public
--- a/tests/test-convert-splicemap.t	Thu Feb 16 15:58:51 2012 -0600
+++ b/tests/test-convert-splicemap.t	Thu Feb 16 16:40:29 2012 -0600
@@ -123,11 +123,11 @@
 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)
+  > $(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
+  7c364e7fa7d70ae525610c016317ed717b519d97 717d54d67e6c31fd75ffef2ff3042bdd98418437, 102a90ea7b4a3361e4082ed620918c261189a36a
 
 Test regular conversion
 
--- a/tests/test-import-bypass.t	Thu Feb 16 15:58:51 2012 -0600
+++ b/tests/test-import-bypass.t	Thu Feb 16 16:40:29 2012 -0600
@@ -111,7 +111,15 @@
 
 Test commit editor
 
-  $ hg diff -c 1 > ../test.diff
+  $ cat > ../test.diff <<EOF
+  > diff -r 07f494440405 -r 4e322f7ce8e3 a
+  > --- a/a	Thu Jan 01 00:00:00 1970 +0000
+  > +++ b/a	Thu Jan 01 00:00:00 1970 +0000
+  > @@ -1,1 +1,2 @@
+  > -a
+  > +b
+  > +c
+  > EOF
   $ HGEDITOR=cat hg import --bypass ../test.diff
   applying ../test.diff
   
@@ -138,7 +146,7 @@
   $ hg --config patch.eol=auto import -d '0 0' -m 'test patch.eol' --bypass ../test.diff
   applying ../test.diff
   $ shortlog
-  o  3:d7805b4d2cb3 test 0 0 - default - test patch.eol
+  o  3:c606edafba99 test 0 0 - default - test patch.eol
   |
   @  2:872023de769d test 0 0 - default - makeacrlf
   |
--- a/tests/test-import-git.t	Thu Feb 16 15:58:51 2012 -0600
+++ b/tests/test-import-git.t	Thu Feb 16 16:40:29 2012 -0600
@@ -402,6 +402,23 @@
   A b
     a
   R a
+
+Renames, similarity and git diff
+
+  $ hg revert -aC
+  undeleting a
+  forgetting b
+  $ rm b
+  $ hg import --similarity 90 --no-commit - <<EOF
+  > diff --git a/a b/b
+  > rename from a
+  > rename to b
+  > EOF
+  applying patch from stdin
+  $ hg st --copies
+  A b
+    a
+  R a
   $ cd ..
 
 Pure copy with existing destination
--- a/tests/test-import.t	Thu Feb 16 15:58:51 2012 -0600
+++ b/tests/test-import.t	Thu Feb 16 16:40:29 2012 -0600
@@ -445,7 +445,7 @@
   $ hg import --no-commit -v fuzzy-tip.patch
   applying fuzzy-tip.patch
   patching file a
-  Hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines).
+  Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines).
   applied to working directory
   $ hg revert -a
   reverting a
@@ -462,7 +462,7 @@
   $ hg --config patch.eol=auto import --no-commit -v fuzzy-tip.patch
   applying fuzzy-tip.patch
   patching file a
-  Hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines).
+  Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines).
   applied to working directory
   $ cd ..
 
@@ -663,7 +663,6 @@
   applying ../rename.diff
   patching file a
   patching file b
-  removing a
   adding b
   recording removal of a as rename to b (88% similar)
   applied to working directory
@@ -679,7 +678,6 @@
   applying ../rename.diff
   patching file a
   patching file b
-  removing a
   adding b
   applied to working directory
   $ hg st -C
@@ -998,3 +996,102 @@
   c2
   c3
   c4
+
+Test corner case involving fuzz and skew
+
+  $ hg init morecornercases
+  $ cd morecornercases
+
+  $ cat > 01-no-context-beginning-of-file.diff <<EOF
+  > diff --git a/a b/a
+  > --- a/a
+  > +++ b/a
+  > @@ -1,0 +1,1 @@
+  > +line
+  > EOF
+
+  $ cat > 02-no-context-middle-of-file.diff <<EOF
+  > diff --git a/a b/a
+  > --- a/a
+  > +++ b/a
+  > @@ -1,1 +1,1 @@
+  > -2
+  > +add some skew
+  > @@ -2,0 +2,1 @@
+  > +line
+  > EOF
+
+  $ cat > 03-no-context-end-of-file.diff <<EOF
+  > diff --git a/a b/a
+  > --- a/a
+  > +++ b/a
+  > @@ -10,0 +10,1 @@
+  > +line
+  > EOF
+
+  $ cat > 04-middle-of-file-completely-fuzzed.diff <<EOF
+  > diff --git a/a b/a
+  > --- a/a
+  > +++ b/a
+  > @@ -1,1 +1,1 @@
+  > -2
+  > +add some skew
+  > @@ -2,2 +2,3 @@
+  >  not matching, should fuzz
+  >  ... a bit
+  > +line
+  > EOF
+
+  $ cat > a <<EOF
+  > 1
+  > 2
+  > 3
+  > 4
+  > EOF
+  $ hg ci -Am adda a
+  $ for p in *.diff; do
+  >   hg import -v --no-commit $p
+  >   cat a
+  >   hg revert -aqC a
+  >   # patch -p1 < $p
+  >   # cat a
+  >   # hg revert -aC a
+  > done
+  applying 01-no-context-beginning-of-file.diff
+  patching file a
+  applied to working directory
+  1
+  line
+  2
+  3
+  4
+  applying 02-no-context-middle-of-file.diff
+  patching file a
+  Hunk #1 succeeded at 2 (offset 1 lines).
+  Hunk #2 succeeded at 4 (offset 1 lines).
+  applied to working directory
+  1
+  add some skew
+  3
+  line
+  4
+  applying 03-no-context-end-of-file.diff
+  patching file a
+  Hunk #1 succeeded at 5 (offset -6 lines).
+  applied to working directory
+  1
+  2
+  3
+  4
+  line
+  applying 04-middle-of-file-completely-fuzzed.diff
+  patching file a
+  Hunk #1 succeeded at 2 (offset 1 lines).
+  Hunk #2 succeeded at 5 with fuzz 2 (offset 1 lines).
+  applied to working directory
+  1
+  add some skew
+  3
+  4
+  line
+
--- a/tests/test-largefiles.t	Thu Feb 16 15:58:51 2012 -0600
+++ b/tests/test-largefiles.t	Thu Feb 16 16:40:29 2012 -0600
@@ -948,4 +948,50 @@
   $ test -L largelink
   $ cd ..
 
+test for pattern matching on 'hg status':
+to boost performance, largefiles checks whether specified patterns are
+related to largefiles in working directory (NOT to STANDIN) or not.
 
+  $ hg init statusmatch
+  $ cd statusmatch
+
+  $ mkdir -p a/b/c/d
+  $ echo normal > a/b/c/d/e.normal.txt
+  $ hg add a/b/c/d/e.normal.txt
+  $ echo large > a/b/c/d/e.large.txt
+  $ hg add --large a/b/c/d/e.large.txt
+  $ mkdir -p a/b/c/x
+  $ echo normal > a/b/c/x/y.normal.txt
+  $ hg add a/b/c/x/y.normal.txt
+  $ hg commit -m 'add files'
+  Invoking status precommit hook
+  A a/b/c/d/e.large.txt
+  A a/b/c/d/e.normal.txt
+  A a/b/c/x/y.normal.txt
+
+(1) no pattern: no performance boost
+  $ hg status -A
+  C a/b/c/d/e.large.txt
+  C a/b/c/d/e.normal.txt
+  C a/b/c/x/y.normal.txt
+
+(2) pattern not related to largefiles: performance boost
+  $ hg status -A a/b/c/x
+  C a/b/c/x/y.normal.txt
+
+(3) pattern related to largefiles: no performance boost
+  $ hg status -A a/b/c/d
+  C a/b/c/d/e.large.txt
+  C a/b/c/d/e.normal.txt
+
+(4) pattern related to STANDIN (not to largefiles): performance boost
+  $ hg status -A .hglf/a
+  C .hglf/a/b/c/d/e.large.txt
+
+(5) mixed case: no performance boost
+  $ hg status -A a/b/c/x a/b/c/d
+  C a/b/c/d/e.large.txt
+  C a/b/c/d/e.normal.txt
+  C a/b/c/x/y.normal.txt
+
+  $ cd ..
--- a/tests/test-mq-merge.t	Thu Feb 16 15:58:51 2012 -0600
+++ b/tests/test-mq-merge.t	Thu Feb 16 16:40:29 2012 -0600
@@ -125,12 +125,10 @@
   merging with queue at: $TESTTMP/t2/.hg/refqueue (glob)
   applying patcha
   patching file a
-  Hunk #1 FAILED at 0
-  1 out of 1 hunks FAILED -- saving rejects to file a.rej
-  patch failed, unable to continue (try -v)
-  patch failed, rejects left in working dir
+  Hunk #1 succeeded at 2 with fuzz 1 (offset 0 lines).
+  fuzz found when applying patch, stopping
   patch didn't work out, merging patcha
-  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   0 files updated, 2 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)
   applying patcha2
--- a/tests/test-mq-qimport.t	Thu Feb 16 15:58:51 2012 -0600
+++ b/tests/test-mq-qimport.t	Thu Feb 16 16:40:29 2012 -0600
@@ -153,21 +153,41 @@
 
 try to import --push
 
-  $ echo another >> b
-  $ hg diff > another.diff
-  $ hg up -C
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg qimport --push another.diff
-  adding another.diff to series file
-  applying another.diff
-  now at: another.diff
+  $ cat > appendfoo.diff <<EOF
+  > append foo
+  >  
+  > diff -r 07f494440405 -r 261500830e46 baz
+  > --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  > +++ b/baz	Thu Jan 01 00:00:00 1970 +0000
+  > @@ -0,0 +1,1 @@
+  > +foo
+  > EOF
+
+  $ cat > appendbar.diff <<EOF
+  > append bar
+  >  
+  > diff -r 07f494440405 -r 261500830e46 baz
+  > --- a/baz	Thu Jan 01 00:00:00 1970 +0000
+  > +++ b/baz	Thu Jan 01 00:00:00 1970 +0000
+  > @@ -1,1 +1,2 @@
+  >  foo
+  > +bar
+  > EOF
+
+  $ hg qimport --push appendfoo.diff appendbar.diff
+  adding appendfoo.diff to series file
+  adding appendbar.diff to series file
+  applying appendfoo.diff
+  applying appendbar.diff
+  now at: appendbar.diff
   $ hg qfin -a
   patch b.diff finalized without changeset message
-  patch another.diff finalized without changeset message
-  $ hg qimport -rtip -P
+  $ hg qimport -r 'p1(.)::' -P
   $ hg qpop -a
+  popping 3.diff
   popping 2.diff
   patch queue now empty
+  $ hg qdel 3.diff
   $ hg qdel -k 2.diff
 
 qimport -e