[Bug 6027] New: Links traversal check outside repo

2018-11-28 Thread mercurial-bugs
https://bz.mercurial-scm.org/show_bug.cgi?id=6027

Bug ID: 6027
   Summary: Links traversal check outside repo
   Product: Mercurial
   Version: 4.8
  Hardware: PC
OS: Linux
Status: UNCONFIRMED
  Severity: bug
  Priority: wish
 Component: Mercurial
  Assignee: bugzi...@mercurial-scm.org
  Reporter: damien...@gmx.fr
CC: mercurial-devel@mercurial-scm.org

Hello

I get a error when I run a command like this

```
$ hg --traceback rebase -n -b revset -d @
starting dry-run rebase; repository will not be changed
rebasing 804:1704993a3282 "next"
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/mercurial/scmutil.py", line 166, in
callcatch
return func()
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 354, in
_runcatchfunc
return _dispatch(req)
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 994, in
_dispatch
cmdpats, cmdoptions)
  File "/usr/lib/python2.7/site-packages/hgext/journal.py", line 90, in
runcommand
return orig(lui, repo, cmd, fullargs, *args)
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 737, in
runcommand
ret = _runcommand(ui, options, cmd, d)
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 1003, in
_runcommand
return cmdfunc()
  File "/usr/lib/python2.7/site-packages/mercurial/dispatch.py", line 991, in

d = lambda: util.checksignature(func)(ui, *args, **strcmdopt)
  File "/usr/lib/python2.7/site-packages/mercurial/util.py", line 1644, in
check
return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/mercurial/util.py", line 1644, in
check
return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/hgext3rd/evolve/__init__.py", line
797, in warnobserrors
return orig(ui, repo, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/mercurial/util.py", line 1644, in
check
return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/mercurial/util.py", line 1644, in
check
return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/hgext/mq.py", line 3631, in mqcommand
return orig(ui, repo, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/mercurial/util.py", line 1644, in
check
return func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/hgext/rebase.py", line 838, in rebase
return _dryrunrebase(ui, repo, action, opts)
  File "/usr/lib/python2.7/site-packages/hgext/rebase.py", line 887, in
_dryrunrebase
leaveunfinished=True)
  File "/usr/lib/python2.7/site-packages/hgext/rebase.py", line 983, in
_origrebase
rbsrt._performrebase(tr)
  File "/usr/lib/python2.7/site-packages/hgext/rebase.py", line 458, in
_performrebase
self._rebasenode(tr, rev, allowdivergence, progress)
  File "/usr/lib/python2.7/site-packages/hgext/rebase.py", line 549, in
_rebasenode
dest, wctx=self.wctx)
  File "/usr/lib/python2.7/site-packages/hgext/rebase.py", line 1205, in
rebasenode
labels=['dest', 'source'], wc=wctx)
  File "/usr/lib/python2.7/site-packages/mercurial/merge.py", line 2178, in
update
stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels)
  File "/usr/lib/python2.7/site-packages/mercurial/merge.py", line 1646, in
applyupdates
for i, item in prog:
  File "/usr/lib/python2.7/site-packages/mercurial/merge.py", line 1510, in
batchget
atomictemp=atomictemp)
  File "/usr/lib/python2.7/site-packages/mercurial/context.py", line 2054, in
write
return self._parent.write(self._path, data, flags, **kwargs)
  File "/usr/lib/python2.7/site-packages/mercurial/context.py", line 1866, in
write
self._auditconflicts(path)
  File "/usr/lib/python2.7/site-packages/mercurial/context.py", line 1847, in
_auditconflicts
match = matchmod.match('/', '', [path + '/'], default=b'relpath')
  File "/usr/lib/python2.7/site-packages/mercurial/match.py", line 176, in
match
kindpats = normalize(patterns, default, root, cwd, auditor, warn)
  File "/usr/lib/python2.7/site-packages/mercurial/match.py", line 223, in
_donormalize
pat = pathutil.canonpath(root, cwd, pat, auditor)
  File "/usr/lib/python2.7/site-packages/mercurial/pathutil.py", line 192, in
canonpath
auditor(name)
  File "/usr/lib/python2.7/site-packages/mercurial/pathutil.py", line 101, in
__call__
self._checkfs(prefix, path)
  File "/usr/lib/python2.7/site-packages/mercurial/pathutil.py", line 124, in
_checkfs
raise error.Abort(msg)
Abort: path 'lib/IPC/_/Context.pm' traverses symbolic link 'lib'
abandon : path 'lib/IPC/_/Context.pm' traverses symbolic link 'lib'
```

After some investigation, the problem start here.

## .../mercurial/context.py(1847)_auditconflicts()
# Test the other direction -- that this path from p2 isn't a directory
# in p1 (test that p1 doesn't any paths matching `path/*`).
match = matchmod.match('/', '', 

Re: [PATCH 2 of 2] remotefilelog: prevent this extension from loading on Windows

2018-11-28 Thread Matt Harbison

> On Nov 28, 2018, at 1:59 PM, Augie Fackler  wrote:
> 
>> On Nov 27, 2018, at 22:46, Matt Harbison  wrote:
>> 
>> # HG changeset patch
>> # User Matt Harbison 
>> # Date 1543376352 18000
>> #  Tue Nov 27 22:39:12 2018 -0500
>> # Node ID aac9ae9f512f53a907dc799d2d6050931001e6e1
>> # Parent  c743bb1c19513a61925ce4663d33323aea7016cc
>> remotefilelog: prevent this extension from loading on Windows
> 
> Hm, I have *vivid* memories of speaking up earlier, but I must not have sent 
> it to the list. Fail on my part. Anyway: I *know* remotefilelog works on 
> Windows. I'll probably tackle getting the tests to pass since they don't, but 
> I'd appreciate it if we could leave RFL working there even if we can't test 
> it.

I’m fine with dropping this one.  I was going to suggest to Yuya that I would 
wait on this a bit in case anybody wanted to try to work on it.  But, I figured 
I would forget to follow up, and I was here anyway.

Let me know if you need something, like access to Windows.

___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH 2 of 2 STABLE] wireprotov2peer: wait for initial object before resolving future

2018-11-28 Thread Gregory Szorc
# HG changeset patch
# User Gregory Szorc 
# Date 1543438343 28800
#  Wed Nov 28 12:52:23 2018 -0800
# Branch stable
# Node ID 46a9258df76be8dee4cd2ccd67db7d1da4677eaa
# Parent  94b0d0f996e11aece0d601201f074c5a9eb0e741
wireprotov2peer: wait for initial object before resolving future

As part of rolling out wireprotov2 with redirect support, I
encountered an edge case with regards to future resolution.

Essentially, the initial response frame from the server did not
fully decode the initial CBOR object. The frame wasn't marked as
EOS. In the previous code, we resolved the future for the request
to response.objects(), which mapped to the commandresponse instance
which would eventually produce a redirect. Upon receiving
subsequent data, the initial CBOR object containing the redirect
would be decoded and we'd process the redirect. However, the
future would already have been resolved with the initial
commandresponse.objects() and the client iterating over the
objects wouldn't receive any objects from the redirect because
the redirect was populating a different commandresponse instance!

This commit changes the logic so we don't resolve futures until
the initial CBOR response object is fully decoded or until EOS
occurs. In cases where there is an empty or partial frame
associated with a redirect, the future will now resolve with the
commandresponse containing the proper series of decoded objects.

diff --git a/mercurial/wireprotov2peer.py b/mercurial/wireprotov2peer.py
--- a/mercurial/wireprotov2peer.py
+++ b/mercurial/wireprotov2peer.py
@@ -377,25 +377,30 @@ class clienthandler(object):
 # This can raise. The caller can handle it.
 response._onresponsedata(meta['data'])
 
-# If we got a content redirect response, we want to fetch it and
-# expose the data as if we received it inline. But we also want to
-# keep our internal request accounting in order. Our strategy is to
-# basically put meaningful response handling on pause until EOS occurs
-# and the stream accounting is in a good state. At that point, we 
follow
-# the redirect and replace the response object with its data.
+# We need to be careful about resolving futures prematurely. If a
+# response is a redirect response, resolving the future before the
+# redirect is processed would result in the consumer seeing an
+# empty stream of objects, since they'd be consuming our
+# response.objects() instead of the redirect's response.objects().
+#
+# Our strategy is to not resolve/finish the request until either
+# EOS occurs or until the initial response object is fully received.
 
-redirect = response._redirect
-handlefuture = False if redirect else True
-
+# Always react to eos.
 if meta['eos']:
 response._oninputcomplete()
 del self._requests[frame.requestid]
 
-if redirect:
-self._followredirect(frame.requestid, redirect)
-return
+# Not EOS but we haven't decoded the initial response object yet.
+# Return and wait for more data.
+elif not response._seeninitial:
+return
 
-if not handlefuture:
+# The specification says no objects should follow the initial/redirect
+# object. So it should be safe to handle the redirect object if one is
+# decoded, without having to wait for EOS.
+if response._redirect:
+self._followredirect(frame.requestid, response._redirect)
 return
 
 # If the command has a decoder, we wait until all input has been
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH 1 of 2 STABLE] wireprotov2peer: always return a bool from _processredirect()

2018-11-28 Thread Gregory Szorc
# HG changeset patch
# User Gregory Szorc 
# Date 1543430263 28800
#  Wed Nov 28 10:37:43 2018 -0800
# Branch stable
# Node ID 94b0d0f996e11aece0d601201f074c5a9eb0e741
# Parent  25b7c4cb5de1593e16bbd7a7dafbd28baa743995
wireprotov2peer: always return a bool from _processredirect()

Without this, we may stop servicing the redirect response if the
future has already been resolved. And the future will often be
resolved very early, since many consumers iterate the decoded
CBOR object stream and expect data to lazily arrive.

diff --git a/mercurial/wireprotov2peer.py b/mercurial/wireprotov2peer.py
--- a/mercurial/wireprotov2peer.py
+++ b/mercurial/wireprotov2peer.py
@@ -458,7 +458,10 @@ class clienthandler(object):
 self._redirects.append((requestid, res))
 
 def _processredirect(self, rid, res):
-"""Called to continue processing a response from a redirect."""
+"""Called to continue processing a response from a redirect.
+
+Returns a bool indicating if the redirect is still serviceable.
+"""
 response = self._responses[rid]
 
 try:
@@ -470,7 +473,7 @@ class clienthandler(object):
 response._oninputcomplete()
 
 if rid not in self._futures:
-return
+return bool(data)
 
 if response.command not in COMMAND_DECODERS:
 self._futures[rid].set_result(response.objects())
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5346: tests: remove all transitional configuration

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Now that sparse-revlog is enabled by default, we no longer needs it.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5346

AFFECTED FILES
  tests/test-bundle.t
  tests/test-clone-uncompressed.t
  tests/test-clonebundles.t
  tests/test-debugcommands.t
  tests/test-hgweb-commands.t
  tests/test-http-protocol.t
  tests/test-init.t
  tests/test-lfconvert.t
  tests/test-lfs-largefiles.t
  tests/test-lfs-serve.t
  tests/test-narrow-clone-no-ellipsis.t
  tests/test-narrow-clone-stream.t
  tests/test-narrow-clone.t
  tests/test-phases.t
  tests/test-remotefilelog-clone-tree.t
  tests/test-remotefilelog-clone.t
  tests/test-remotefilelog-log.t
  tests/test-repo-compengines.t
  tests/test-revlog-v2.t
  tests/test-sparse-requirement.t
  tests/test-ssh-bundle1.t
  tests/test-ssh-proto-unbundle.t
  tests/test-ssh-proto.t
  tests/test-ssh.t
  tests/test-stream-bundle-v2.t
  tests/test-treemanifest.t
  tests/test-wireproto-caching.t
  tests/test-wireproto-command-capabilities.t
  tests/test-wireproto-content-redirects.t

CHANGE DETAILS

diff --git a/tests/test-wireproto-content-redirects.t 
b/tests/test-wireproto-content-redirects.t
--- a/tests/test-wireproto-content-redirects.t
+++ b/tests/test-wireproto-content-redirects.t
@@ -1,9 +1,3 @@
-TRANSITIONAL CONFIG
-  $ cat << EOF >> $HGRCPATH
-  > [format]
-  > sparse-revlog = yes
-  > EOF
-
   $ . $TESTDIR/wireprotohelpers.sh
 
   $ cat >> $HGRCPATH << EOF
diff --git a/tests/test-wireproto-command-capabilities.t 
b/tests/test-wireproto-command-capabilities.t
--- a/tests/test-wireproto-command-capabilities.t
+++ b/tests/test-wireproto-command-capabilities.t
@@ -1,9 +1,3 @@
-TRANSITIONAL CONFIG
-  $ cat << EOF >> $HGRCPATH
-  > [format]
-  > sparse-revlog = yes
-  > EOF
-
 #require no-chg
 
   $ . $TESTDIR/wireprotohelpers.sh
diff --git a/tests/test-wireproto-caching.t b/tests/test-wireproto-caching.t
--- a/tests/test-wireproto-caching.t
+++ b/tests/test-wireproto-caching.t
@@ -1,9 +1,3 @@
-TRANSITIONAL CONFIG
-  $ cat << EOF >> $HGRCPATH
-  > [format]
-  > sparse-revlog = yes
-  > EOF
-
   $ . $TESTDIR/wireprotohelpers.sh
   $ cat >> $HGRCPATH << EOF
   > [extensions]
diff --git a/tests/test-treemanifest.t b/tests/test-treemanifest.t
--- a/tests/test-treemanifest.t
+++ b/tests/test-treemanifest.t
@@ -1,9 +1,3 @@
-TRANSITIONAL CONFIG
-  $ cat << EOF >> $HGRCPATH
-  > [format]
-  > sparse-revlog = yes
-  > EOF
-
   $ cat << EOF >> $HGRCPATH
   > [ui]
   > ssh="$PYTHON" "$TESTDIR/dummyssh"
diff --git a/tests/test-stream-bundle-v2.t b/tests/test-stream-bundle-v2.t
--- a/tests/test-stream-bundle-v2.t
+++ b/tests/test-stream-bundle-v2.t
@@ -1,9 +1,3 @@
-TRANSITIONAL CONFIG
-  $ cat << EOF >> $HGRCPATH
-  > [format]
-  > sparse-revlog = yes
-  > EOF
-
 #require no-reposimplestore
 
 Test creating a consuming stream bundle v2
diff --git a/tests/test-ssh.t b/tests/test-ssh.t
--- a/tests/test-ssh.t
+++ b/tests/test-ssh.t
@@ -1,9 +1,3 @@
-TRANSITIONAL CONFIG
-  $ cat << EOF >> $HGRCPATH
-  > [format]
-  > sparse-revlog = yes
-  > EOF
-
 #testcases sshv1 sshv2
 
 #if sshv2
diff --git a/tests/test-ssh-proto.t b/tests/test-ssh-proto.t
--- a/tests/test-ssh-proto.t
+++ b/tests/test-ssh-proto.t
@@ -1,9 +1,3 @@
-TRANSITIONAL CONFIG
-  $ cat << EOF >> $HGRCPATH
-  > [format]
-  > sparse-revlog = yes
-  > EOF
-
 #require no-chg
 
   $ cat > hgrc-sshv2 << EOF
diff --git a/tests/test-ssh-proto-unbundle.t b/tests/test-ssh-proto-unbundle.t
--- a/tests/test-ssh-proto-unbundle.t
+++ b/tests/test-ssh-proto-unbundle.t
@@ -1,9 +1,3 @@
-TRANSITIONAL CONFIG
-  $ cat << EOF >> $HGRCPATH
-  > [format]
-  > sparse-revlog = yes
-  > EOF
-
   $ cat > hgrc-sshv2 << EOF
   > %include $HGRCPATH
   > [experimental]
diff --git a/tests/test-ssh-bundle1.t b/tests/test-ssh-bundle1.t
--- a/tests/test-ssh-bundle1.t
+++ b/tests/test-ssh-bundle1.t
@@ -1,9 +1,3 @@
-TRANSITIONAL CONFIG
-  $ cat << EOF >> $HGRCPATH
-  > [format]
-  > sparse-revlog = yes
-  > EOF
-
 This test is a duplicate of 'test-http.t' feel free to factor out
 parts that are not bundle1/bundle2 specific.
 
diff --git a/tests/test-sparse-requirement.t b/tests/test-sparse-requirement.t
--- a/tests/test-sparse-requirement.t
+++ b/tests/test-sparse-requirement.t
@@ -1,9 +1,3 @@
-TRANSITIONAL CONFIG
-  $ cat << EOF >> $HGRCPATH
-  > [format]
-  > sparse-revlog = yes
-  > EOF
-
   $ hg init repo
   $ cd repo
 
diff --git a/tests/test-revlog-v2.t b/tests/test-revlog-v2.t
--- a/tests/test-revlog-v2.t
+++ b/tests/test-revlog-v2.t
@@ -1,9 +1,3 @@
-TRANSITIONAL CONFIG
-  $ cat << EOF >> $HGRCPATH
-  > [format]
-  > sparse-revlog = yes
-  > EOF
-
 #require reporevlogstore
 
 A repo with unknown revlogv2 requirement string cannot be opened
diff --git a/tests/test-repo-compengines.t b/tests/test-repo-compengines.t
--- a/tests/test-repo-compengines.t
+++ 

D5345: sparse-revlog: enabled by default

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The feature provides large benefits. It now seems mature enough to be enabled
  by default.
  
  - It solves catastrophic issues regarding delta storage in revlog,
  - It allows for shorter delta chain in all repositories, improving 
performances.
  
  Running benchmark of a wide range of operation did not reveal problematic
  impact. Performance gains are observed where expected.
  
  The format is supported by Mercurial version 4.7. So it seems safe to enable
  it by default now.
  
  Here is a reminder of key numbers regarding this delta strategy effect on
  repository size and performance.
  
  Effect on Size:
  ===
  
  For repositories with a lot of branches, sparse-revlog significantly improve
  size, fixing limitation associated with the span of a delta chain. In
  addition, sparse-revlog, deal well with limitations of the delta chain length.
  For large repositories, this allows for a stiff reduction of the delta chain
  without a problematic impact on the repository size. This delta chain length
  improvement helps all repositories, not just the ones with many branches.
  
  As a reminder, here are the default chain limits for each "format":
  
  - no-sparse: none
  - sparse:1000
  
  Mercurial
  -
  
Manifest Size:
limit   | none|1000
|-|
no-sparse   |   6 143 044 |  6 269 496
sparse  |   5 798 796 |  5 827 025

Manifest Chain length data
limit   ||   none||   1000
value   || average |   max   || average |   max
||-|-||-|-
no-sparse   || 429 |   1 397 || 397 |1 000
sparse  || 326 |   1 290 || 313 |1 000

Full Store Size
limit   | none|1000
|-|
no-sparse   |  46 944 775 | 47 166 129
sparse  |  46 622 445 | 46 723 774
  
  pypy
  
  
Manifest Size:
limit   | none|1000
|-|
no-sparse   |  52 941 760 |  56 200 970
sparse  |  26 348 229 |  27 384 133

Manifest Chain length data
limit   ||   none||   1000
value   || average |   max   || average |   max
||-|-||-|-
no-sparse   || 769 |   3 889 || 390 |1 000
sparse  ||   1 223 |   3 846 || 495 |1 000

Full Store Size
limit   | none|1000
|-|
no-sparse   | 336 050 203 | 339 309 413
sparse  | 338 673 985 | 339 709 889
  
  Mozilla
  ---
  
Manifest Size:
limit   | none   |1000
||---
no-sparse   |215 096 339 |  1 708 853 525
sparse  |188 947 271 |278 894 170

Manifest Chain length data
limit   ||   none||   1000
value   || average |   max   || average |   max
||-|-||-|
no-sparse   ||  20 454 |  59 562 || 491 |   1 000
sparse  ||  23 509 |  69 891 || 489 |   1 000

Full Store Size
limit   | none   |1000
||---
no-sparse   |  2 377 578 715 |  3 876 258 798
sparse  |  2 441 677 137 |  2 535 997 381
  
  Netbeans
  
  
Manifest Size:
limit   | none   |1000
||---
no-sparse   |130 088 982 |741 590 565
sparse  |118 836 887 |159 161 207

Manifest Chain length data
limit   ||   none||   1000
value   || average |   max   || average |   max
||-|-||-|-
no-sparse   ||  19 321 |  61 397 || 510 |1 000
sparse  ||  21 240 |  61 583 || 503 |1 000

Full Store Size
limit   | none   |1000
||---
no-sparse   |  1 160 013 008 |  1 771 514 591
sparse  |  1 164 959 988 |  1 205 284 308
  
  Private repo #1
  ---
  
Manifest Size:
limit   | none|1000
|-|---
no-sparse   | 33 725 285 081  | 33 724 834 190
sparse  |350 542 420  |423 470 579

 Manifest Chain length data
 limit   ||   none||   1000
  

D5344: test: preemptively disable sparse-revlog for some of test-upgrade-repo

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Some part of this test assumes sparse-revlog is off. We enforce it explicitly.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5344

AFFECTED FILES
  tests/test-upgrade-repo.t

CHANGE DETAILS

diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t
--- a/tests/test-upgrade-repo.t
+++ b/tests/test-upgrade-repo.t
@@ -330,7 +330,7 @@
   $ touch f2
   $ hg -q commit -A -m 'add f2'
 
-  $ hg debugupgraderepo --run
+  $ hg debugupgraderepo --run --config format.sparse-revlog=false
   upgrade will perform the following actions:
   
   requirements
@@ -715,7 +715,7 @@
 Check upgrading a sparse-revlog repository
 ---
 
-  $ hg init sparserevlogrepo
+  $ hg init sparserevlogrepo --config format.sparse-revlog=no
   $ cd sparserevlogrepo
   $ touch foo
   $ hg add foo



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5343: test: enable sparse-revlog for test-wireproto-content-redirects.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the 
tests
  change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5343

AFFECTED FILES
  tests/test-wireproto-content-redirects.t

CHANGE DETAILS

diff --git a/tests/test-wireproto-content-redirects.t 
b/tests/test-wireproto-content-redirects.t
--- a/tests/test-wireproto-content-redirects.t
+++ b/tests/test-wireproto-content-redirects.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
   $ . $TESTDIR/wireprotohelpers.sh
 
   $ cat >> $HGRCPATH << EOF
@@ -65,9 +71,9 @@
   s> Server: testing stub value\r\n
   s> Date: $HTTP_DATE$\r\n
   s> Content-Type: application/mercurial-cbor\r\n
-  s> Content-Length: 2259\r\n
+  s> Content-Length: 2285\r\n
   s> \r\n
-  s> 
\xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa5Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Hredirect\xa2Fhashes\x82Fsha256Dsha1Gtargets\x81\xa5DnameHtarget-aHprotocolDhttpKsnirequired\xf4Ktlsversions\x82C1.2C1.3Duris\x81Shttp://example.com/Nv1capabilitiesY\x01\xd3batch
 branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  s> 

D5342: test: enable sparse-revlog for test-wireproto-command-capabilities.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5342

AFFECTED FILES
  tests/test-wireproto-command-capabilities.t

CHANGE DETAILS

diff --git a/tests/test-wireproto-command-capabilities.t 
b/tests/test-wireproto-command-capabilities.t
--- a/tests/test-wireproto-command-capabilities.t
+++ b/tests/test-wireproto-command-capabilities.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #require no-chg
 
   $ . $TESTDIR/wireprotohelpers.sh
@@ -34,7 +40,7 @@
   s> Content-Type: application/mercurial-0.1\r\n
   s> Content-Length: *\r\n (glob)
   s> \r\n
-  s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
 
 A proper request without the API server enabled returns the legacy response
 
@@ -59,7 +65,7 @@
   s> Content-Type: application/mercurial-0.1\r\n
   s> Content-Length: *\r\n (glob)
   s> \r\n
-  s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
 
 Restart with just API server enabled. This enables serving the new format.
 
@@ -95,7 +101,7 @@
   s> Content-Type: application/mercurial-0.1\r\n
   s> Content-Length: *\r\n (glob)
   s> \r\n
-  s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
 
 X-HgUpgrade- without known serialization in X-HgProto- uses legacy 
response
 
@@ -120,7 +126,7 @@
   s> Content-Type: application/mercurial-0.1\r\n
   s> Content-Length: *\r\n (glob)
   s> \r\n
-  s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
 
 X-HgUpgrade- + X-HgProto- headers trigger new response format
 
@@ -145,12 +151,12 @@
   s> Content-Type: application/mercurial-cbor\r\n
   s> Content-Length: *\r\n (glob)
   s> \r\n
-  s> \xa3GapibaseDapi/Dapis\xa0Nv1capabilitiesY\x01\xd3batch branchmap 
$USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ 
getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  s> \xa3GapibaseDapi/Dapis\xa0Nv1capabilitiesY\x01\xe0batch branchmap 
$USUAL_BUNDLE2_CAPS$ changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ 
getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
   cbor> [
 {
   b'apibase': b'api/',
   b'apis': {},
-  b'v1capabilities': b'batch branchmap $USUAL_BUNDLE2_CAPS$ 
changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash'
+  b'v1capabilities': b'batch branchmap $USUAL_BUNDLE2_CAPS$ 
changegroupsubset compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 

D5341: test: enable sparse-revlog for test-wireproto-caching.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5341

AFFECTED FILES
  tests/test-wireproto-caching.t

CHANGE DETAILS

diff --git a/tests/test-wireproto-caching.t b/tests/test-wireproto-caching.t
--- a/tests/test-wireproto-caching.t
+++ b/tests/test-wireproto-caching.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
   $ . $TESTDIR/wireprotohelpers.sh
   $ cat >> $HGRCPATH << EOF
   > [extensions]
@@ -432,7 +438,8 @@
   ]),
   b'rawrepoformats': [
 b'generaldelta',
-b'revlogv1'
+b'revlogv1',
+b'sparserevlog'
   ]
 }
   ]



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5340: test: enable sparse-revlog for test-treemanifest.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5340

AFFECTED FILES
  tests/test-treemanifest.t

CHANGE DETAILS

diff --git a/tests/test-treemanifest.t b/tests/test-treemanifest.t
--- a/tests/test-treemanifest.t
+++ b/tests/test-treemanifest.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
   $ cat << EOF >> $HGRCPATH
   > [ui]
   > ssh="$PYTHON" "$TESTDIR/dummyssh"
@@ -833,9 +839,9 @@
 Packed bundle
   $ hg -R deeprepo debugcreatestreamclonebundle repo-packed.hg
   writing 5330 bytes for 18 files
-  bundle requirements: generaldelta, revlogv1, treemanifest
+  bundle requirements: generaldelta, revlogv1, sparserevlog, treemanifest
   $ hg debugbundle --spec repo-packed.hg
-  none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Ctreemanifest
+  
none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog%2Ctreemanifest
 
 #endif
 



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5339: test: enable sparse-revlog for test-stream-bundle-v2.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5339

AFFECTED FILES
  tests/test-stream-bundle-v2.t

CHANGE DETAILS

diff --git a/tests/test-stream-bundle-v2.t b/tests/test-stream-bundle-v2.t
--- a/tests/test-stream-bundle-v2.t
+++ b/tests/test-stream-bundle-v2.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #require no-reposimplestore
 
 Test creating a consuming stream bundle v2
@@ -46,9 +52,9 @@
   $ hg bundle -a --type="none-v2;stream=v2" bundle.hg
   $ hg debugbundle bundle.hg
   Stream params: {}
-  stream2 -- {bytecount: 1693, filecount: 11, requirements: 
dotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Cstore} (mandatory: True)
+  stream2 -- {bytecount: 1693, filecount: 11, requirements: 
dotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Csparserevlog%2Cstore} 
(mandatory: True)
   $ hg debugbundle --spec bundle.hg
-  
none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Cstore
+  
none-v2;stream=v2;requirements%3Ddotencode%2Cfncache%2Cgeneraldelta%2Crevlogv1%2Csparserevlog%2Cstore
 
 Test that we can apply the bundle as a stream clone bundle
 



To: lothiraldan, #hg-reviewers
Cc: mjpieters, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5338: test: enable sparse-revlog for test-ssh.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the 
tests
  change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5338

AFFECTED FILES
  tests/test-ssh.t

CHANGE DETAILS

diff --git a/tests/test-ssh.t b/tests/test-ssh.t
--- a/tests/test-ssh.t
+++ b/tests/test-ssh.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #testcases sshv1 sshv2
 
 #if sshv2
@@ -513,9 +519,9 @@
   devel-peer-request:   pairs: 81 bytes
   sending hello command
   sending between command
-  remote: 427 (sshv1 !)
+  remote: 440 (sshv1 !)
   protocol upgraded to exp-ssh-v2-0003 (sshv2 !)
-  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
   remote: 1 (sshv1 !)
   devel-peer-request: protocaps
   devel-peer-request:   caps: * bytes (glob)



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5337: test: enable sparse-revlog for test-ssh-proto-unbundle.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5337

AFFECTED FILES
  tests/test-ssh-proto-unbundle.t

CHANGE DETAILS

diff --git a/tests/test-ssh-proto-unbundle.t b/tests/test-ssh-proto-unbundle.t
--- a/tests/test-ssh-proto-unbundle.t
+++ b/tests/test-ssh-proto-unbundle.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
   $ cat > hgrc-sshv2 << EOF
   > %include $HGRCPATH
   > [experimental]
@@ -56,9 +62,9 @@
   i> 
-
   i> flush() -> None
   o> readline() -> 4:
-  o> 427\n
-  o> readline() -> 427:
-  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
+  o> 440\n
+  o> readline() -> 440:
+  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash\n
   o> readline() -> 2:
   o> 1\n
   o> readline() -> 1:
@@ -109,8 +115,8 @@
   o> readline() -> 62:
   o> upgraded * exp-ssh-v2-0003\n (glob)
   o> readline() -> 4:
-  o> 426\n
-  o> read(426) -> 426: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  o> 439\n
+  o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
   o> read(1) -> 1:
   o> \n
   sending unbundle command
@@ -235,9 +241,9 @@
   i> 
-
   i> flush() -> None
   o> readline() -> 4:
-  o> 427\n
-  o> readline() -> 427:
-  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
+  o> 440\n
+  o> readline() -> 440:
+  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash\n
   o> readline() -> 2:
   o> 1\n
   o> readline() -> 1:
@@ -294,8 +300,8 @@
   o> readline() -> 62:
   o> upgraded * exp-ssh-v2-0003\n (glob)
   o> readline() -> 4:
-  o> 426\n
-  o> read(426) -> 426: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  o> 439\n
+  o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
   o> read(1) -> 1:
   o> \n
   sending unbundle command
@@ -361,9 +367,9 @@
   i> 
-
   i> flush() -> None
   o> readline() -> 4:
-  o> 427\n
-  o> readline() -> 427:
-  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
+  o> 440\n
+  o> readline() -> 440:
+  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash\n
   o> readline() -> 2:
   o> 1\n
   o> readline() -> 1:
@@ -421,8 +427,8 @@
   o> readline() -> 62:
   o> upgraded * exp-ssh-v2-0003\n (glob)
   o> readline() -> 4:
-  o> 426\n
-  o> read(426) -> 426: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  o> 439\n
+  o> read(439) -> 439: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ 
changegroupsubset getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
   o> read(1) -> 1:
   o> \n
   sending unbundle command
@@ -489,9 +495,9 @@
   i> 
-
   i> flush() -> None
   o> readline() -> 4:
-  

D5336: test: enable sparse-revlog for test-ssh-proto.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5336

AFFECTED FILES
  tests/test-ssh-proto.t

CHANGE DETAILS

diff --git a/tests/test-ssh-proto.t b/tests/test-ssh-proto.t
--- a/tests/test-ssh-proto.t
+++ b/tests/test-ssh-proto.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #require no-chg
 
   $ cat > hgrc-sshv2 << EOF
@@ -64,8 +70,8 @@
   devel-peer-request:   pairs: 81 bytes
   sending hello command
   sending between command
-  remote: 427
-  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  remote: 440
+  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
   remote: 1
   devel-peer-request: protocaps
   devel-peer-request:   caps: * bytes (glob)
@@ -86,43 +92,43 @@
   i> write(6) -> 6:
   i> hello\n
   o> readline() -> 4:
-  o> 427\n
-  o> readline() -> 427:
-  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
+  o> 440\n
+  o> readline() -> 440:
+  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash\n
 
 `hg debugserve --sshstdio` works
 
   $ cd server
   $ hg debugserve --sshstdio << EOF
   > hello
   > EOF
-  427
-  capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  440
+  capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
 
 I/O logging works
 
   $ hg debugserve --sshstdio --logiofd 1 << EOF
   > hello
   > EOF
   o> write(4) -> 4:
-  o> 427\n
-  o> write(427) -> 427:
-  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
-  427
-  capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  o> 440\n
+  o> write(440) -> 440:
+  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash\n
+  440
+  capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
   o> flush() -> None
 
   $ hg debugserve --sshstdio --logiofile $TESTTMP/io << EOF
   > hello
   > EOF
-  427
-  capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  440
+  capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
 
   $ cat $TESTTMP/io
   o> write(4) -> 4:
-  o> 427\n
-  o> write(427) -> 427:
-  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
+  o> 440\n
+  o> write(440) -> 440:
+  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash\n
   o> flush() -> None
 
   $ cd ..
@@ -147,9 +153,9 @@
   i> write(6) -> 6:
   i> hello\n
   o> readline() -> 4:
-  o> 427\n
-  o> readline() -> 427:
-  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash\n
+  o> 440\n
+  o> readline() -> 440:
+  o> capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 

D5335: test: enable sparse-revlog for test-ssh-bundle1.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5335

AFFECTED FILES
  tests/test-ssh-bundle1.t

CHANGE DETAILS

diff --git a/tests/test-ssh-bundle1.t b/tests/test-ssh-bundle1.t
--- a/tests/test-ssh-bundle1.t
+++ b/tests/test-ssh-bundle1.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 This test is a duplicate of 'test-http.t' feel free to factor out
 parts that are not bundle1/bundle2 specific.
 
@@ -482,9 +488,9 @@
   sending upgrade request: * proto=exp-ssh-v2-0003 (glob) (sshv2 !)
   sending hello command
   sending between command
-  remote: 427 (sshv1 !)
+  remote: 440 (sshv1 !)
   protocol upgraded to exp-ssh-v2-0003 (sshv2 !)
-  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
   remote: 1 (sshv1 !)
   sending protocaps command
   preparing listkeys for "bookmarks"



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5334: test: enable sparse-revlog for test-sparse-requirement.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5334

AFFECTED FILES
  tests/test-sparse-requirement.t

CHANGE DETAILS

diff --git a/tests/test-sparse-requirement.t b/tests/test-sparse-requirement.t
--- a/tests/test-sparse-requirement.t
+++ b/tests/test-sparse-requirement.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
   $ hg init repo
   $ cd repo
 
@@ -21,6 +27,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
 
@@ -37,6 +44,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
 
@@ -55,6 +63,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
 



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5333: test: enable sparse-revlog for test-revlog-v2.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5333

AFFECTED FILES
  tests/test-revlog-v2.t

CHANGE DETAILS

diff --git a/tests/test-revlog-v2.t b/tests/test-revlog-v2.t
--- a/tests/test-revlog-v2.t
+++ b/tests/test-revlog-v2.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #require reporevlogstore
 
 A repo with unknown revlogv2 requirement string cannot be opened
@@ -24,6 +30,7 @@
   dotencode
   exp-revlogv2.0
   fncache
+  sparserevlog
   store
 
   $ hg log



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5332: test: enable sparse-revlog for test-repo-compengines.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5332

AFFECTED FILES
  tests/test-repo-compengines.t

CHANGE DETAILS

diff --git a/tests/test-repo-compengines.t b/tests/test-repo-compengines.t
--- a/tests/test-repo-compengines.t
+++ b/tests/test-repo-compengines.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 A new repository uses zlib storage, which doesn't need a requirement
 
   $ hg init default
@@ -7,6 +13,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
 
@@ -47,6 +54,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
 
@@ -71,6 +79,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
 



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5331: test: enable sparse-revlog for test-remotefilelog-log.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5331

AFFECTED FILES
  tests/test-remotefilelog-log.t

CHANGE DETAILS

diff --git a/tests/test-remotefilelog-log.t b/tests/test-remotefilelog-log.t
--- a/tests/test-remotefilelog-log.t
+++ b/tests/test-remotefilelog-log.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #require no-windows
 
   $ . "$TESTDIR/remotefilelog-library.sh"
@@ -31,6 +37,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
 
   $ hg update



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5330: test: enable sparse-revlog for test-remotefilelog-clone-tree.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5330

AFFECTED FILES
  tests/test-remotefilelog-clone-tree.t

CHANGE DETAILS

diff --git a/tests/test-remotefilelog-clone-tree.t 
b/tests/test-remotefilelog-clone-tree.t
--- a/tests/test-remotefilelog-clone-tree.t
+++ b/tests/test-remotefilelog-clone-tree.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #require no-windows
 
   $ . "$TESTDIR/remotefilelog-library.sh"
@@ -31,6 +37,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   treemanifest
   $ find .hg/store/meta | sort
@@ -71,6 +78,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   treemanifest
   $ ls .hg/store/data
@@ -112,5 +120,6 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   treemanifest



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5329: test: enable sparse-revlog for test-remotefilelog-clone.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5329

AFFECTED FILES
  tests/test-remotefilelog-clone.t

CHANGE DETAILS

diff --git a/tests/test-remotefilelog-clone.t b/tests/test-remotefilelog-clone.t
--- a/tests/test-remotefilelog-clone.t
+++ b/tests/test-remotefilelog-clone.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #require no-windows
 
   $ . "$TESTDIR/remotefilelog-library.sh"
@@ -28,6 +34,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
 
   $ hg update
@@ -61,6 +68,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   $ ls .hg/store/data
   4a0a19218e082a343a1b17e5333409af9d98f0f5
@@ -109,4 +117,5 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5328: test: enable sparse-revlog for test-phases.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5328

AFFECTED FILES
  tests/test-phases.t

CHANGE DETAILS

diff --git a/tests/test-phases.t b/tests/test-phases.t
--- a/tests/test-phases.t
+++ b/tests/test-phases.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
   $ cat > $TESTTMP/hook.sh << 'EOF'
   > echo "test-hook-close-phase: $HG_NODE:  $HG_OLDPHASE -> $HG_PHASE"
   > EOF
@@ -841,6 +847,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   $ echo X > X
   $ hg add X
@@ -867,6 +874,7 @@
   generaldelta
   internal-phase
   revlogv1
+  sparserevlog
   store
   $ mkcommit A
   test-debug-phase: new rev 0:  x -> 1



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5327: test: enable sparse-revlog for test-narrow-clone.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5327

AFFECTED FILES
  tests/test-narrow-clone.t

CHANGE DETAILS

diff --git a/tests/test-narrow-clone.t b/tests/test-narrow-clone.t
--- a/tests/test-narrow-clone.t
+++ b/tests/test-narrow-clone.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
   $ . "$TESTDIR/narrow-library.sh"
 
   $ hg init master
@@ -43,6 +49,7 @@
   fncache
   narrowhg-experimental
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
 



To: lothiraldan, durin42, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5326: test: enable sparse-revlog for test-narrow-clone-stream.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5326

AFFECTED FILES
  tests/test-narrow-clone-stream.t

CHANGE DETAILS

diff --git a/tests/test-narrow-clone-stream.t b/tests/test-narrow-clone-stream.t
--- a/tests/test-narrow-clone-stream.t
+++ b/tests/test-narrow-clone-stream.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #testcases tree flat-fncache flat-nofncache
 
 Tests narrow stream clones
@@ -66,6 +72,7 @@
   generaldelta
   narrowhg-experimental
   revlogv1
+  sparserevlog
   store
   treemanifest (tree !)
 



To: lothiraldan, durin42, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5325: test: enable sparse-revlog for test-narrow-clone-no-ellipsis.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a reviewer: durin42.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5325

AFFECTED FILES
  tests/test-narrow-clone-no-ellipsis.t

CHANGE DETAILS

diff --git a/tests/test-narrow-clone-no-ellipsis.t 
b/tests/test-narrow-clone-no-ellipsis.t
--- a/tests/test-narrow-clone-no-ellipsis.t
+++ b/tests/test-narrow-clone-no-ellipsis.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
   $ . "$TESTDIR/narrow-library.sh"
 
   $ hg init master
@@ -27,6 +33,7 @@
   fncache
   narrowhg-experimental
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
 



To: lothiraldan, durin42, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5324: test: enable sparse-revlog for test-lfs-serve.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5324

AFFECTED FILES
  tests/test-lfs-serve.t

CHANGE DETAILS

diff --git a/tests/test-lfs-serve.t b/tests/test-lfs-serve.t
--- a/tests/test-lfs-serve.t
+++ b/tests/test-lfs-serve.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #testcases lfsremote-on lfsremote-off
 #require serve no-reposimplestore no-chg
 
@@ -131,7 +137,7 @@
   upgrade will perform the following actions:
   
   requirements
- preserved: dotencode, fncache, generaldelta, revlogv1, store
+ preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store
   
   beginning upgrade...
   repository locked and read-only



To: lothiraldan, #hg-reviewers
Cc: mjpieters, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5323: test: enable sparse-revlog for test-lfs-largefiles.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5323

AFFECTED FILES
  tests/test-lfs-largefiles.t

CHANGE DETAILS

diff --git a/tests/test-lfs-largefiles.t b/tests/test-lfs-largefiles.t
--- a/tests/test-lfs-largefiles.t
+++ b/tests/test-lfs-largefiles.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #require no-reposimplestore no-chg
 
 This tests the interaction between the largefiles and lfs extensions, and
@@ -294,6 +300,7 @@
   generaldelta
   lfs
   revlogv1
+  sparserevlog
   store
 
   $ hg log -r 'all()' -G -T '{rev} {join(lfs_files, ", ")} ({desc})\n'



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5322: test: enable sparse-revlog for test-lfconvert.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5322

AFFECTED FILES
  tests/test-lfconvert.t

CHANGE DETAILS

diff --git a/tests/test-lfconvert.t b/tests/test-lfconvert.t
--- a/tests/test-lfconvert.t
+++ b/tests/test-lfconvert.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
   $ USERCACHE="$TESTTMP/cache"; export USERCACHE
   $ mkdir "${USERCACHE}"
   $ cat >> $HGRCPATH 

D5321: test: enable sparse-revlog for test-init.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5321

AFFECTED FILES
  tests/test-init.t

CHANGE DETAILS

diff --git a/tests/test-init.t b/tests/test-init.t
--- a/tests/test-init.t
+++ b/tests/test-init.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 This test tries to exercise the ssh functionality with a dummy script
 
   $ checknewrepo()
@@ -22,6 +28,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
   $ echo this > local/foo
@@ -60,6 +67,7 @@
   generaldelta
   revlogv1
   testonly-simplestore (reposimplestore !)
+  sparserevlog
 
 creating repo with format.usefncache=false
 
@@ -69,6 +77,7 @@
   00changelog.i created
   generaldelta
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
 
@@ -81,12 +90,13 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
 
 creating repo with format.dotencode=false
 
-  $ hg --config format.generaldelta=false --config 
format.usegeneraldelta=false init old4
+  $ hg --config format.generaldelta=false --config 
format.usegeneraldelta=false --config format.sparse-revlog=no init old4
   $ checknewrepo old4
   store created
   00changelog.i created
@@ -210,6 +220,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
 
@@ -229,6 +240,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
 
@@ -244,6 +256,7 @@
   fncache
   generaldelta
   revlogv1
+  sparserevlog
   store
   testonly-simplestore (reposimplestore !)
 



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5320: test: enable sparse-revlog for test-http-protocol.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5320

AFFECTED FILES
  tests/test-http-protocol.t

CHANGE DETAILS

diff --git a/tests/test-http-protocol.t b/tests/test-http-protocol.t
--- a/tests/test-http-protocol.t
+++ b/tests/test-http-protocol.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #require no-chg
 
   $ . $TESTDIR/wireprotohelpers.sh
@@ -192,7 +198,7 @@
   s> Content-Type: application/mercurial-0.1\r\n
   s> Content-Length: *\r\n (glob)
   s> \r\n
-  s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
   sending listkeys command
   s> GET /?cmd=listkeys HTTP/1.1\r\n
   s> Accept-Encoding: identity\r\n
@@ -266,7 +272,7 @@
   s> Content-Type: application/mercurial-0.1\r\n
   s> Content-Length: *\r\n (glob)
   s> \r\n
-  s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  s> batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
   sending heads command
   s> GET /?cmd=heads HTTP/1.1\r\n
   s> Accept-Encoding: identity\r\n
@@ -315,7 +321,7 @@
   s> Content-Type: application/mercurial-cbor\r\n
   s> Content-Length: *\r\n (glob)
   s> \r\n
-  s> 
\xa3GapibaseDapi/Dapis\xa1Pexp-http-v2-0003\xa4Hcommands\xacIbranchmap\xa2Dargs\xa0Kpermissions\x81DpullLcapabilities\xa2Dargs\xa0Kpermissions\x81DpullMchangesetdata\xa2Dargs\xa2Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84IbookmarksGparentsEphaseHrevisionIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullHfiledata\xa2Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x83HlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDpath\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullIfilesdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x84NfirstchangesetHlinknodeGparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDdictIrevisions\xa2Hrequired\xf5DtypeDlistKpermissions\x81DpullTrecommendedbatchsize\x19\xc3PEheads\xa2Dargs\xa1Jpubliconly\xa3Gdefault\xf4Hrequired\xf4DtypeDboolKpermissions\x81DpullEknown\xa2Dargs\xa1Enodes\xa3Gdefault\x80Hrequired\xf4DtypeDlistKpermissions\x81DpullHlistkeys\xa2Dargs\xa1Inamespace\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullFlookup\xa2Dargs\xa1Ckey\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullLmanifestdata\xa3Dargs\xa4Ffields\xa4Gdefault\xd9\x01\x02\x80Hrequired\xf4DtypeCsetKvalidvalues\xd9\x01\x02\x82GparentsHrevisionKhaveparents\xa3Gdefault\xf4Hrequired\xf4DtypeDboolEnodes\xa2Hrequired\xf5DtypeDlistDtree\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpullTrecommendedbatchsize\x1a\x00\x01\x86\xa0Gpushkey\xa2Dargs\xa4Ckey\xa2Hrequired\xf5DtypeEbytesInamespace\xa2Hrequired\xf5DtypeEbytesCnew\xa2Hrequired\xf5DtypeEbytesCold\xa2Hrequired\xf5DtypeEbytesKpermissions\x81DpushPrawstorefiledata\xa2Dargs\xa2Efiles\xa2Hrequired\xf5DtypeDlistJpathfilter\xa3Gdefault\xf6Hrequired\xf4DtypeDlistKpermissions\x81DpullQframingmediatypes\x81X/mercurial-exp-framing-0006Rpathfilterprefixes\xd9\x01\x02\x82Epath:Lrootfilesin:Nrawrepoformats\x82LgeneraldeltaHrevlogv1Nv1capabilitiesY\x01\xd3batch
 branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
compression=$BUNDLE2_COMPRESSIONS$ getbundle httpheader=1024 
httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey 
streamreqs=generaldelta,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  s> 

D5319: test: enable sparse-revlog for test-hgweb-commands.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5319

AFFECTED FILES
  tests/test-hgweb-commands.t

CHANGE DETAILS

diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t
--- a/tests/test-hgweb-commands.t
+++ b/tests/test-hgweb-commands.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #require serve
 
 An attempt at more fully testing the hgweb web interface.
@@ -2193,7 +2199,7 @@
   lookup
   pushkey
   stream-preferred
-  streamreqs=generaldelta,revlogv1
+  streamreqs=generaldelta,revlogv1,sparserevlog
   unbundle=HG10GZ,HG10BZ,HG10UN
   unbundlehash
 



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5318: test: enable sparse-revlog for test-debugcommands.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5318

AFFECTED FILES
  tests/test-debugcommands.t

CHANGE DETAILS

diff --git a/tests/test-debugcommands.t b/tests/test-debugcommands.t
--- a/tests/test-debugcommands.t
+++ b/tests/test-debugcommands.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
   $ cat << EOF >> $HGRCPATH
   > [ui]
   > interactive=yes
@@ -195,10 +201,10 @@
 
 #if reporevlogstore no-pure
   $ hg debugdeltachain -m
-  rev  chain# chainlen prev   delta   sizerawsize  chainsize   
  ratio   lindist extradist extraratio
-0   11   -1base 44 43 44   
1.0232644 00.0
-1   21   -1base  0  0  0   
0.0 0 00.0
-2   31   -1base 44 43 44   
1.0232644 00.0
+  rev  chain# chainlen prev   delta   sizerawsize  chainsize   
  ratio   lindist extradist extraratio   readsize largestblk rddensity srchunks
+0   11   -1base 44 43 44   
1.0232644 00.0 44 44   1.01
+1   21   -1base  0  0  0   
0.0 0 00.0  0  0   1.01
+2   31   -1base 44 43 44   
1.0232644 00.0 44 44   1.01
 
   $ hg debugdeltachain -m -T '{rev} {chainid} {chainlen}\n'
   0 1 1
@@ -217,9 +223,13 @@
 "deltatype": "base",
 "extradist": 0,
 "extraratio": 0.0,
+"largestblock": 44,
 "lindist": 44,
 "prevrev": -1,
+"readdensity": 1.0,
+"readsize": 44,
 "rev": 0,
+"srchunks": 1,
 "uncompsize": 43
},
{
@@ -231,9 +241,13 @@
 "deltatype": "base",
 "extradist": 0,
 "extraratio": 0,
+"largestblock": 0,
 "lindist": 0,
 "prevrev": -1,
+"readdensity": 1,
+"readsize": 0,
 "rev": 1,
+"srchunks": 1,
 "uncompsize": 0
},
{
@@ -246,9 +260,13 @@
 "deltatype": "base",
 "extradist": 0,
 "extraratio": 0.0,
+"largestblock": 44,
 "lindist": 44,
 "prevrev": -1,
+"readdensity": 1.0,
+"readsize": 44,
 "rev": 2,
+"srchunks": 1,
 "uncompsize": 43
}
   ]
@@ -631,8 +649,8 @@
   devel-peer-request:   pairs: 81 bytes
   sending hello command
   sending between command
-  remote: 427
-  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey streamreqs=generaldelta,revlogv1 
unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
+  remote: 440
+  remote: capabilities: batch branchmap $USUAL_BUNDLE2_CAPS$ changegroupsubset 
getbundle known lookup protocaps pushkey 
streamreqs=generaldelta,revlogv1,sparserevlog unbundle=HG10GZ,HG10BZ,HG10UN 
unbundlehash
   remote: 1
   devel-peer-request: protocaps
   devel-peer-request:   caps: * bytes (glob)



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5317: test: enable sparse-revlog for test-clone-uncompressed.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5317

AFFECTED FILES
  tests/test-clone-uncompressed.t

CHANGE DETAILS

diff --git a/tests/test-clone-uncompressed.t b/tests/test-clone-uncompressed.t
--- a/tests/test-clone-uncompressed.t
+++ b/tests/test-clone-uncompressed.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #require serve no-reposimplestore no-chg
 
 #testcases stream-legacy stream-bundle2
@@ -201,23 +207,23 @@
   
 
   $ f --size --hex --bytes 256 body
-  body: size=112230
+  body: size=112245
   : 04 6e 6f 6e 65 48 47 32 30 00 00 00 00 00 00 00 |.noneHG20...|
-  0010: 70 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |p.STREAM2...|
-  0020: 05 09 04 0c 35 62 79 74 65 63 6f 75 6e 74 39 38 |5bytecount98|
+  0010: 7f 07 53 54 52 45 41 4d 32 00 00 00 00 03 00 09 |..STREAM2...|
+  0020: 05 09 04 0c 44 62 79 74 65 63 6f 75 6e 74 39 38 |Dbytecount98|
   0030: 37 35 38 66 69 6c 65 63 6f 75 6e 74 31 30 33 30 |758filecount1030|
   0040: 72 65 71 75 69 72 65 6d 65 6e 74 73 64 6f 74 65 |requirementsdote|
   0050: 6e 63 6f 64 65 25 32 43 66 6e 63 61 63 68 65 25 |ncode%2Cfncache%|
   0060: 32 43 67 65 6e 65 72 61 6c 64 65 6c 74 61 25 32 |2Cgeneraldelta%2|
-  0070: 43 72 65 76 6c 6f 67 76 31 25 32 43 73 74 6f 72 |Crevlogv1%2Cstor|
-  0080: 65 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 |es.Bdata/0.i|
-  0090: 00 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 ||
-  00a0: 00 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff ||
-  00b0: 80 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c |.)c.I.#Vg.g,|
-  00c0: 69 d1 ec 39 00 00 00 00 00 00 00 00 00 00 00 00 |i..9|
-  00d0: 75 30 73 08 42 64 61 74 61 2f 31 2e 69 00 03 00 |u0s.Bdata/1.i...|
-  00e0: 01 00 00 00 00 00 00 00 02 00 00 00 01 00 00 00 ||
-  00f0: 00 00 00 00 01 ff ff ff ff ff ff ff ff f9 76 da |..v.|
+  0070: 43 72 65 76 6c 6f 67 76 31 25 32 43 73 70 61 72 |Crevlogv1%2Cspar|
+  0080: 73 65 72 65 76 6c 6f 67 25 32 43 73 74 6f 72 65 |serevlog%2Cstore|
+  0090: 00 00 80 00 73 08 42 64 61 74 61 2f 30 2e 69 00 |s.Bdata/0.i.|
+  00a0: 03 00 01 00 00 00 00 00 00 00 02 00 00 00 01 00 ||
+  00b0: 00 00 00 00 00 00 01 ff ff ff ff ff ff ff ff 80 ||
+  00c0: 29 63 a0 49 d3 23 87 bf ce fe 56 67 92 67 2c 69 |)c.I.#Vg.g,i|
+  00d0: d1 ec 39 00 00 00 00 00 00 00 00 00 00 00 00 75 |..9u|
+  00e0: 30 73 08 42 64 61 74 61 2f 31 2e 69 00 03 00 01 |0s.Bdata/1.i|
+  00f0: 00 00 00 00 00 00 00 02 00 00 00 01 00 00 00 00 ||
 
 --uncompressed is an alias to --stream
 



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5316: test: enable sparse-revlog for test-clonebundles.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5316

AFFECTED FILES
  tests/test-clonebundles.t

CHANGE DETAILS

diff --git a/tests/test-clonebundles.t b/tests/test-clonebundles.t
--- a/tests/test-clonebundles.t
+++ b/tests/test-clonebundles.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 #require no-reposimplestore no-chg
 
 Set up a server
@@ -295,7 +301,7 @@
 
   $ hg -R server debugcreatestreamclonebundle packed.hg
   writing 613 bytes for 4 files
-  bundle requirements: generaldelta, revlogv1
+  bundle requirements: generaldelta, revlogv1, sparserevlog
 
 No bundle spec should work
 



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5315: test: enable sparse-revlog for test-bundle.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We are about to enable sparse-revlog globally. To help with reviewing the
  tests change, we isolate them in individual changesets.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5315

AFFECTED FILES
  tests/test-bundle.t

CHANGE DETAILS

diff --git a/tests/test-bundle.t b/tests/test-bundle.t
--- a/tests/test-bundle.t
+++ b/tests/test-bundle.t
@@ -1,3 +1,9 @@
+TRANSITIONAL CONFIG
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = yes
+  > EOF
+
 Setting up test
 
   $ hg init test
@@ -274,17 +280,17 @@
 
   $ hg -R test debugcreatestreamclonebundle packed.hg
   writing 2664 bytes for 6 files
-  bundle requirements: generaldelta, revlogv1
+  bundle requirements: generaldelta, revlogv1, sparserevlog
 
   $ f -B 64 --size --sha1 --hexdump packed.hg
-  packed.hg: size=2827, sha1=9d14cb90c66a21462d915ab33656f38b9deed686
+  packed.hg: size=2840, sha1=12bf3eee3eb8a04c503ce2d29b48f0135c7edff5
   : 48 47 53 31 55 4e 00 00 00 00 00 00 00 06 00 00 |HGS1UN..|
-  0010: 00 00 00 00 0a 68 00 16 67 65 6e 65 72 61 6c 64 |.h..generald|
-  0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 00 64 61 |elta,revlogv1.da|
-  0030: 74 61 2f 61 64 69 66 66 65 72 65 6e 74 66 69 6c |ta/adifferentfil|
+  0010: 00 00 00 00 0a 68 00 23 67 65 6e 65 72 61 6c 64 |.h.#generald|
+  0020: 65 6c 74 61 2c 72 65 76 6c 6f 67 76 31 2c 73 70 |elta,revlogv1,sp|
+  0030: 61 72 73 65 72 65 76 6c 6f 67 00 64 61 74 61 2f |arserevlog.data/|
 
   $ hg debugbundle --spec packed.hg
-  none-packed1;requirements%3Dgeneraldelta%2Crevlogv1
+  none-packed1;requirements%3Dgeneraldelta%2Crevlogv1%2Csparserevlog
 
 generaldelta requirement is not listed in stream clone bundles unless used
 
@@ -319,7 +325,7 @@
   $ hg -R testsecret debugcreatestreamclonebundle packedsecret.hg
   (warning: stream clone bundle will contain secret revisions)
   writing 301 bytes for 3 files
-  bundle requirements: generaldelta, revlogv1
+  bundle requirements: generaldelta, revlogv1, sparserevlog
 
 Unpacking packed1 bundles with "hg unbundle" isn't allowed
 



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5314: test: make sure sparse-revlog does not interfer with test-parseindex.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  That test carefully craft revlog to reproduce issues. We do not want new 
revlog
  behavior to interfere with that.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5314

AFFECTED FILES
  tests/test-parseindex.t

CHANGE DETAILS

diff --git a/tests/test-parseindex.t b/tests/test-parseindex.t
--- a/tests/test-parseindex.t
+++ b/tests/test-parseindex.t
@@ -132,8 +132,8 @@
   $ mkdir invalidparent
   $ cd invalidparent
 
-  $ hg clone --pull -q --config phases.publish=False ../a limit
-  $ hg clone --pull -q --config phases.publish=False ../a segv
+  $ hg clone --pull -q --config phases.publish=False ../a limit --config 
format.sparse-revlog=no
+  $ hg clone --pull -q --config phases.publish=False ../a segv --config 
format.sparse-revlog=no
   $ rm -R limit/.hg/cache segv/.hg/cache
 
   $ "$PYTHON" 

D5313: test: explicitly disable sparse-revlog in test-http-bad-server.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The `test-http-bad-server.t` test is very fragile with hard-coded number all
  around. Adding any new capability have massive consequences on it that are
  long and tiresome to handle. Since the test check more generic protocol level
  behavior, it does not need to follow all new capabilities. Disabling the
  capabilities is a much simpler way to avoid the issue.
  
  We make sure `sparse-revlog` will not impact this test once turned on by
  default.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5313

AFFECTED FILES
  tests/test-http-bad-server.t

CHANGE DETAILS

diff --git a/tests/test-http-bad-server.t b/tests/test-http-bad-server.t
--- a/tests/test-http-bad-server.t
+++ b/tests/test-http-bad-server.t
@@ -11,6 +11,8 @@
   $ cat >> $HGRCPATH << EOF
   > [extensions]
   > fakeversion = `pwd`/fakeversion.py
+  > [format]
+  > sparse-revlog = no
   > [devel]
   > legacy.exchange = phases
   > EOF



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5311: sparse-revlog: disable sparse-revlog if config disable general-delta

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Sparse-revlog requires general-delta in order to work. If general-delta is
  explicitly disabled through configuration, we should honor that and also
  disabled sparse-revlog.
  
  This change will be more relevant when sparse-revlog is enabled by default.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5311

AFFECTED FILES
  mercurial/localrepo.py
  mercurial/scmutil.py

CHANGE DETAILS

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1449,8 +1449,7 @@
 """
 # experimental config: format.generaldelta
 return (ui.configbool('format', 'generaldelta')
-or ui.configbool('format', 'usegeneraldelta')
-or ui.configbool('format', 'sparse-revlog'))
+or ui.configbool('format', 'usegeneraldelta'))
 
 def gddeltaconfig(ui):
 """helper function to know if incoming delta should be optimised
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -2896,11 +2896,11 @@
 
 if scmutil.gdinitconfig(ui):
 requirements.add('generaldelta')
+# experimental config: format.sparse-revlog
+if ui.configbool('format', 'sparse-revlog'):
+requirements.add(SPARSEREVLOG_REQUIREMENT)
 if ui.configbool('experimental', 'treemanifest'):
 requirements.add('treemanifest')
-# experimental config: format.sparse-revlog
-if ui.configbool('format', 'sparse-revlog'):
-requirements.add(SPARSEREVLOG_REQUIREMENT)
 
 revlogv2 = ui.config('experimental', 'revlogv2')
 if revlogv2 == 'enable-unstable-format-and-corrupt-my-data':



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5312: test: explicitly disable sparse-revlog in test-generaldelta.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  That test is about testing generaldelta without further improvement. We ensure
  it will stay that way even if sparse-revlog is turned on by default. The
  sparse-revlog format is tested on his own in a different test file.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5312

AFFECTED FILES
  tests/test-generaldelta.t

CHANGE DETAILS

diff --git a/tests/test-generaldelta.t b/tests/test-generaldelta.t
--- a/tests/test-generaldelta.t
+++ b/tests/test-generaldelta.t
@@ -5,6 +5,11 @@
 implementation of parentdelta: third manifest revision would be fully
 inserted due to big distance from its paren revision (zero).
 
+  $ cat << EOF >> $HGRCPATH
+  > [format]
+  > sparse-revlog = no
+  > EOF
+
   $ hg init repo --config format.generaldelta=no --config 
format.usegeneraldelta=no
   $ cd repo
   $ echo foo > foo



To: lothiraldan, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5310: test: fix config typo in test-upgrade-repo.t

2018-11-28 Thread lothiraldan (Boris Feld)
lothiraldan created this revision.
Herald added subscribers: mercurial-devel, mjpieters.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5310

AFFECTED FILES
  tests/test-upgrade-repo.t

CHANGE DETAILS

diff --git a/tests/test-upgrade-repo.t b/tests/test-upgrade-repo.t
--- a/tests/test-upgrade-repo.t
+++ b/tests/test-upgrade-repo.t
@@ -67,18 +67,18 @@
   sparserevlog:no no  no
   plain-cl-delta: yesyes yes
   compression:zlib   zlibzlib
-  $ hg debugformat --verbose --config format.usegfncache=no
+  $ hg debugformat --verbose --config format.usefncache=no
   format-variant repo config default
-  fncache:yesyes yes
-  dotencode:  yesyes yes
+  fncache:yes no yes
+  dotencode:  yes no yes
   generaldelta:   yesyes yes
   sparserevlog:no no  no
   plain-cl-delta: yesyes yes
   compression:zlib   zlibzlib
-  $ hg debugformat --verbose --config format.usegfncache=no --color=debug
+  $ hg debugformat --verbose --config format.usefncache=no --color=debug
   format-variant repo config default
-  [formatvariant.name.uptodate|fncache:   ][formatvariant.repo.uptodate| 
yes][formatvariant.config.default|yes][formatvariant.default| yes]
-  [formatvariant.name.uptodate|dotencode: ][formatvariant.repo.uptodate| 
yes][formatvariant.config.default|yes][formatvariant.default| yes]
+  [formatvariant.name.mismatchconfig|fncache:   
][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| 
no][formatvariant.default| yes]
+  [formatvariant.name.mismatchconfig|dotencode: 
][formatvariant.repo.mismatchconfig| yes][formatvariant.config.special| 
no][formatvariant.default| yes]
   [formatvariant.name.uptodate|generaldelta:  ][formatvariant.repo.uptodate| 
yes][formatvariant.config.default|yes][formatvariant.default| yes]
   [formatvariant.name.uptodate|sparserevlog:  ][formatvariant.repo.uptodate|  
no][formatvariant.config.default| no][formatvariant.default|  no]
   [formatvariant.name.uptodate|plain-cl-delta:][formatvariant.repo.uptodate| 
yes][formatvariant.config.default|yes][formatvariant.default| yes]



To: lothiraldan, #hg-reviewers
Cc: mjpieters, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


mercurial@40722: 32 new changesets

2018-11-28 Thread Mercurial Commits
32 new changesets in mercurial:

https://www.mercurial-scm.org/repo/hg/rev/a65fe13de84f
changeset:   40691:a65fe13de84f
user:Boris Feld 
date:Mon Nov 19 14:14:56 2018 +
summary: perf: add a new `perfhelper-tracecopies` command

https://www.mercurial-scm.org/repo/hg/rev/f3f4d8537b11
changeset:   40692:f3f4d8537b11
user:Boris Feld 
date:Wed Oct 10 00:49:30 2018 +0200
summary: context: spell out the logic around linkrev adjustement starting 
point

https://www.mercurial-scm.org/repo/hg/rev/aee94f0a36cd
changeset:   40693:aee94f0a36cd
user:Boris Feld 
date:Wed Oct 10 00:50:34 2018 +0200
summary: context: take advantage of `_descendantrev` in introrev if 
available

https://www.mercurial-scm.org/repo/hg/rev/8a0136f69027
changeset:   40694:8a0136f69027
user:Boris Feld 
date:Wed Oct 10 00:50:35 2018 +0200
summary: context: introduce an `isintroducedafter` method and use it in 
copies

https://www.mercurial-scm.org/repo/hg/rev/9fa0d6dd1617
changeset:   40695:9fa0d6dd1617
user:Boris Feld 
date:Wed Oct 10 00:50:36 2018 +0200
summary: context: split `introrev` logic in a sub function

https://www.mercurial-scm.org/repo/hg/rev/69206452a2ac
changeset:   40696:69206452a2ac
user:Boris Feld 
date:Mon Nov 19 14:30:58 2018 +
summary: context: small refactoring of `isintroducedafter`

https://www.mercurial-scm.org/repo/hg/rev/d98fb3f42f33
changeset:   40697:d98fb3f42f33
user:Boris Feld 
date:Wed Oct 10 00:50:37 2018 +0200
summary: context: floor adjustlinkrev graph walk during copy tracing

https://www.mercurial-scm.org/repo/hg/rev/3c98c339c6ea
changeset:   40698:3c98c339c6ea
user:Boris Feld 
date:Wed Nov 21 11:46:47 2018 +
summary: perf: fix a minor typo in perfbranchmapload

https://www.mercurial-scm.org/repo/hg/rev/94d76ddac40a
changeset:   40699:94d76ddac40a
user:Boris Feld 
date:Fri Nov 23 01:20:18 2018 +0100
summary: perf: update function name to match `perfbranchmapload` command

https://www.mercurial-scm.org/repo/hg/rev/30f443d34a7d
changeset:   40700:30f443d34a7d
user:Boris Feld 
date:Fri Nov 23 01:32:57 2018 +0100
summary: perf: use an explicit function in perfbranchmapload

https://www.mercurial-scm.org/repo/hg/rev/e4ea63855d5a
changeset:   40701:e4ea63855d5a
user:Boris Feld 
date:Fri Nov 23 06:32:28 2018 +0100
summary: perf: introduce a function to fully "unload" a changelog

https://www.mercurial-scm.org/repo/hg/rev/4240a1da4188
changeset:   40702:4240a1da4188
user:Boris Feld 
date:Fri Nov 23 06:32:32 2018 +0100
summary: perf: add --clear-revlog flag to branchmapload

https://www.mercurial-scm.org/repo/hg/rev/d5b300ec2e89
changeset:   40703:d5b300ec2e89
user:Boris Feld 
date:Tue Nov 20 14:49:18 2018 +
summary: sparse-revlog: add a `index_get_start` function in C

https://www.mercurial-scm.org/repo/hg/rev/7da3729d4b45
changeset:   40704:7da3729d4b45
user:Boris Feld 
date:Fri Nov 09 18:42:58 2018 +0100
summary: sparse-revlog: add a `index_get_length` function in C

https://www.mercurial-scm.org/repo/hg/rev/4ec6a24029d2
changeset:   40705:4ec6a24029d2
user:Boris Feld 
date:Fri Nov 09 18:43:16 2018 +0100
summary: sparse-revlog: add a `index_segment_span` function in C

https://www.mercurial-scm.org/repo/hg/rev/0650be877a37
changeset:   40706:0650be877a37
user:Boris Feld 
date:Fri Nov 09 18:45:23 2018 +0100
summary: sparse-revlog: add a `trim_endidx` function in C

https://www.mercurial-scm.org/repo/hg/rev/cc76ca9fca20
changeset:   40707:cc76ca9fca20
user:Boris Feld 
date:Thu Nov 15 11:09:58 2018 +0100
summary: sparse-revlog: introduce native (C) implementation of 
slicechunktodensity

https://www.mercurial-scm.org/repo/hg/rev/f2342483f7a6
changeset:   40708:f2342483f7a6
user:Boris Feld 
date:Thu Nov 15 11:10:52 2018 +0100
summary: cext: increment the `parsers` module version

https://www.mercurial-scm.org/repo/hg/rev/39d29542fe40
changeset:   40709:39d29542fe40
user:Boris Feld 
date:Thu Nov 15 11:11:38 2018 +0100
summary: sparse-revlog: put the native implementation of 
slicechunktodensity to use

https://www.mercurial-scm.org/repo/hg/rev/50a64c321c1e
changeset:   40710:50a64c321c1e
user:Pulkit Goyal 
date:Wed Nov 21 17:17:26 2018 +0300
summary: branchmap: build the revbranchcache._namesreverse() only when 
required

https://www.mercurial-scm.org/repo/hg/rev/72d88a975655
changeset:   40711:72d88a975655
user:Matt Harbison 
date:Fri Nov 23 22:18:56 2018 -0500
summary: remotefilelog: drop some compatibility cruft for finding the hg 
exeutable

https://www.mercurial-scm.org/repo/hg/rev/246b61bfdc2f
changeset:   40712:246b61bfdc2f
user:Matt Harbison 
date:Fri Nov 23 22:27:57 

Re: [PATCH 2 of 2] remotefilelog: prevent this extension from loading on Windows

2018-11-28 Thread Augie Fackler


> On Nov 27, 2018, at 22:46, Matt Harbison  wrote:
> 
> # HG changeset patch
> # User Matt Harbison 
> # Date 1543376352 18000
> #  Tue Nov 27 22:39:12 2018 -0500
> # Node ID aac9ae9f512f53a907dc799d2d6050931001e6e1
> # Parent  c743bb1c19513a61925ce4663d33323aea7016cc
> remotefilelog: prevent this extension from loading on Windows

Hm, I have *vivid* memories of speaking up earlier, but I must not have sent it 
to the list. Fail on my part. Anyway: I *know* remotefilelog works on Windows. 
I'll probably tackle getting the tests to pass since they don't, but I'd 
appreciate it if we could leave RFL working there even if we can't test it.

> See 0800d9e6e216.
> 
> This doesn't actually abort.  Rather, it prints a stacktrace, says the 
> extension
> failed to setup, and then runs the command.  Probably good enough for 
> something
> marked "highly experimental", and hopefully somebody can figure out how to fix
> what doesn't work.

That'd be one thing if you did this *after* the monkeypatches, but instead this 
is before the monkeypatches, so you've *definitely* made the situation worse on 
Windows - things worked before this patch, and now most of the uisetup won't 
happen so you won't be able to invoke a remotefilelog clone.

> There actually is code and comments indicating workarounds for quirks on
> Windows.  But some of it is puzzling- for example, shallowutil.unlinkfile()
> handles unlinking read only files, but so does win32.unlink().  So I'm not 
> sure
> why the former exists.

That's because it works on Windows. As for the weird shallowutil.unlinkfile, 
that's probably someone having been sloppy and/or wanting to avoid a dependency 
for some reason lost to history.

> 
> diff --git a/hgext/remotefilelog/__init__.py b/hgext/remotefilelog/__init__.py
> --- a/hgext/remotefilelog/__init__.py
> +++ b/hgext/remotefilelog/__init__.py
> @@ -257,6 +257,9 @@ def uisetup(ui):
> """Wraps user facing Mercurial commands to swap them out with shallow
> versions.
> """
> +if pycompat.iswindows:
> +raise error.Abort(_("remotefilelog is not supported on Windows"))
> +
> hg.wirepeersetupfuncs.append(fileserverclient.peersetup)
> 
> entry = extensions.wrapcommand(commands.table, 'clone', cloneshallow)
> ___
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


[PATCH] sparse: raise a move verbose index error from the C code

2018-11-28 Thread Boris Feld
# HG changeset patch
# User Boris Feld 
# Date 1543281014 -3600
#  Tue Nov 27 02:10:14 2018 +0100
# Node ID 237d0b9e6b04740845930e1322bde978bab7da92
# Parent  0800d9e6e216b2ca59f05788b288685b8d7b2d93
# EXP-Topic sparse-cext
# Available At https://bitbucket.org/octobus/mercurial-devel/
#  hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 
237d0b9e6b04
sparse: raise a move verbose index error from the C code

If we don't like a value we should print it.

diff --git a/mercurial/cext/revlog.c b/mercurial/cext/revlog.c
--- a/mercurial/cext/revlog.c
+++ b/mercurial/cext/revlog.c
@@ -1182,7 +1182,7 @@ static PyObject *index_slicechunktodensi
goto bail;
}
if (revnum < 0 || revnum >= idxlen) {
-   PyErr_SetString(PyExc_IndexError, "index out of range");
+   PyErr_Format(PyExc_IndexError, "index out of range: 
%zd", revnum);
goto bail;
}
revs[i] = revnum;
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH 5 of 6 V2] match: avoid translating glob to matcher multiple times for large sets

2018-11-28 Thread Martin von Zweigbergk via Mercurial-devel
On Wed, Nov 28, 2018 at 7:41 AM Boris FELD  wrote:

>
> On 24/11/2018 00:51, Martin von Zweigbergk via Mercurial-devel wrote:
>
>
>
> On Fri, Nov 23, 2018 at 9:20 AM Boris FELD  wrote:
>
>>
>> On 23/11/2018 10:24, Yuya Nishihara wrote:
>> > On Fri, 23 Nov 2018 18:00:36 +0900, Yuya Nishihara wrote:
>> >> On Fri, 23 Nov 2018 00:00:36 -0800, Martin von Zweigbergk via
>> Mercurial-devel wrote:
>> >>> On Thu, Nov 22, 2018 at 11:44 PM Martin von Zweigbergk <
>> >>> martinv...@google.com> wrote:
>>  On Thu, Nov 22, 2018 at 2:26 PM Boris Feld 
>> wrote:
>> 
>> > # HG changeset patch
>> > # User Boris Feld 
>> > # Date 1542916922 -3600
>> > #  Thu Nov 22 21:02:02 2018 +0100
>> > # Node ID 018578f3ab597d5ea573107e7310470de76a3907
>> > # Parent  4628c3cf1fc1052ca25296c8c1a42c4502b59dc9
>> > # EXP-Topic perf-ignore-2
>> > # Available At https://bitbucket.org/octobus/mercurial-devel/
>> > #  hg pull
>> https://bitbucket.org/octobus/mercurial-devel/ -r
>> > 018578f3ab59
>> > match: avoid translating glob to matcher multiple times for large
>> sets
>> >
>> > For hgignore with many globs, the resulting regexp might not fit
>> under
>> > the 20K
>> > length limit. So the patterns need to be broken up in smaller
>> pieces.
>> >
>>  Did you see 0f6a1bdf89fb (match: handle large regexes, 2007-08-19)
>>  and 59a9dc9562e2 (ignore: split up huge patterns, 2008-02-11)? It
>> might be
>>  worth trying to figure out what Python versions those commits are
>> talking
>>  about. Maybe we've dropped support for those versions and we can
>> simplify
>>  this code.
>> 
>> >>> Oh, and what made me do the archaeology there was that you seem to
>> have
>> >>> lost the handling of OverlowError from the regex engine. As I said
>> above, I
>> >>> suspect that's fine because we no longer support some very old Python
>> >>> versions (but please try to figure out what version that refers to).
>> Still,
>> >>> if we decide to drop that OverflowError handling, I'd prefer to see
>> that in
>> >>> an explicit commit early in this series.
>> To me, 0f6a1bdf89fb (catching error from engine) is superseded by
>> 59a9dc9562e2 (cannot trust the engine, preemptively raise our own error).
>>
>
> Yes, perhaps (if it was only expressions longer than 20k that raised
> OverflowError). My point was that if that was the case, we should rewrite
> to avoid using an internal exception for flow control, i.e. change from
> this:
>
> try:
> regex = # create regex
> if len(regex) > MAX_RE_SIZE:
> raise OverflowError
> return regex, _rematcher(regex)
> except OverflowError:
> # break up into smaller
>
> to this:
>
> regex = # create regex
> if len(regex) < MAX_RE_SIZE:
> return regex, _rematcher(regex)
> # break up into smaller
>
> I don't disagree with the point. However, I do not know why it is relevant
> to the current discussion. The series in review is no longer using
> exception for flow control. What am I missing?
>

My request was to make the removal of the support for OverflowError
explicit. As I said above, it seems it was just lost in this patch without
a mention. I've sent D5309 to show what I mean. Your patch 6/6 would go
well right after that. You could rebase your series on top, or maybe I'm
just being nitpicky and I should drop the patch.

>
>
>
>>
>> So I feel like it is fine to just rely on the size limit.
>> >> Perhaps it's been fixed since 2.7.4. The regexp code width is extended
>> >> from 16bit to 32bit (or Py_UCS4) integer. That should be large enough
>> to
>> >> handle practical patterns.
>> >>
>> >> https://bugs.python.org/issue1160
>>
>> Thanks for digging this out. It looks like we may be able to drop this
>> limit altogether. However, I would like to make it a change distinct
>> from this series.
>>
>> The current code is very problematic for some people (to the point where
>> the majority of `hg status` time is spent in that function). I would
>> like to get fast code for the same semantic first. Then look into
>> changing the semantic.
>>
>
> Is your concern that you might regress in performance of something by
> changing how large the groups are? Or that it would be more work?
>
>
> My concern is that we are currently delaying a simple code change yielding
> a huge improvement because there is the option for another larger, riskier
> one.
>
> I'm not dismissing your finding about lifting the limit and avoiding the
> regexps joining. They look very promising and we are planning to explore
> them. However, they are a different change.
>
> The current series is preserving all the assumption we have been using for
> the past 10 years, implementing a faster code for the same result. This is
> a very low risk and solves the most immediate problem of a user group we
> support.
>
> Dropping the limit is a different matter. It is probably harmless to do
> so, but 

D5309: match: remove obsolete catching of OverflowError

2018-11-28 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Since 
https://phab.mercurial-scm.org/rHG0f6a1bdf89fb9b8e6c260a56a96063df3d57a636 
(match: handle large regexes, 2007-08-19), we catch
  an OverflowError from the regex engine and split up the regex if that
  happens. In 
https://phab.mercurial-scm.org/rHG59a9dc9562e24d5e5890c7d957ef2b91cb12e8a0 
(ignore: split up huge patterns, 2008-02-11),
  that was extended to raise an OverflowError in our code even if the
  regex engine doesn't raise it. It's unclear if there was a range of
  regex sizes where the OverflowError would be raised from the regex
  engine but that were still below the limit we added in our
  code. Either way, both limitations were probably removed in Python
  2.7.4 when the regex code width was extended from 16bit to 32bit (or
  Py_UCS4) integer (thanks to Yuya for finding that out).
  
  If at least the first limitation was removed, we no longer should be
  using OverflowError for flow control, so this patch changes that.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5309

AFFECTED FILES
  mercurial/match.py

CHANGE DETAILS

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -1190,16 +1190,15 @@
 try:
 regex = '(?:%s)' % '|'.join([_regex(k, p, globsuffix)
  for (k, p, s) in kindpats])
-if len(regex) > 2:
-raise OverflowError
-return regex, _rematcher(regex)
-except OverflowError:
+if len(regex) < 2:
+return regex, _rematcher(regex)
 # We're using a Python with a tiny regex engine and we
 # made it explode, so we'll divide the pattern list in two
 # until it works
 l = len(kindpats)
 if l < 2:
-raise
+# TODO: raise error.Abort here
+raise OverflowError
 regexa, a = _buildregexmatch(kindpats[:l//2], globsuffix)
 regexb, b = _buildregexmatch(kindpats[l//2:], globsuffix)
 return regex, lambda s: a(s) or b(s)



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D4892: narrow: drop the bundle2 capability since we have server capabilities (BC)

2018-11-28 Thread pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG381d3121e97a: narrow: drop the bundle2 capability since we 
have server capabilities (BC) (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4892?vs=12608=12617

REVISION DETAIL
  https://phab.mercurial-scm.org/D4892

AFFECTED FILES
  hgext/narrow/narrowbundle2.py
  tests/test-narrow-clone-non-narrow-server.t

CHANGE DETAILS

diff --git a/tests/test-narrow-clone-non-narrow-server.t 
b/tests/test-narrow-clone-non-narrow-server.t
--- a/tests/test-narrow-clone-non-narrow-server.t
+++ b/tests/test-narrow-clone-non-narrow-server.t
@@ -32,7 +32,6 @@
   > EOF
   $ echo hello | hg -R . serve --stdio | \
   >   "$PYTHON" unquote.py | tr ' ' '\n' | grep narrow
-  narrow=v0
   exp-narrow-1
 
   $ cd ..
diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py
+++ b/hgext/narrow/narrowbundle2.py
@@ -20,7 +20,6 @@
 changegroup,
 error,
 exchange,
-extensions,
 narrowspec,
 repair,
 repository,
@@ -31,10 +30,9 @@
 stringutil,
 )
 
-NARROWCAP = 'narrow'
 _NARROWACL_SECTION = 'narrowhgacl'
-_CHANGESPECPART = NARROWCAP + ':changespec'
-_SPECPART = NARROWCAP + ':spec'
+_CHANGESPECPART = 'narrow:changespec'
+_SPECPART = 'narrow:spec'
 _SPECPART_INCLUDE = 'include'
 _SPECPART_EXCLUDE = 'exclude'
 _KILLNODESIGNAL = 'KILL'
@@ -44,12 +42,6 @@
 _CSHEADERSIZE = struct.calcsize(_ELIDEDCSHEADER)
 _MFHEADERSIZE = struct.calcsize(_ELIDEDMFHEADER)
 
-# When advertising capabilities, always include narrow clone support.
-def getrepocaps_narrow(orig, repo, **kwargs):
-caps = orig(repo, **kwargs)
-caps[NARROWCAP] = ['v0']
-return caps
-
 # Serve a changegroup for a client with a narrow clone.
 def getbundlechangegrouppart_narrow(bundler, repo, source,
 bundlecaps=None, b2caps=None, heads=None,
@@ -252,8 +244,6 @@
 
 def setup():
 """Enable narrow repo support in bundle2-related extension points."""
-extensions.wrapfunction(bundle2, 'getrepocaps', getrepocaps_narrow)
-
 getbundleargs = wireprototypes.GETBUNDLE_ARGUMENTS
 
 getbundleargs['narrow'] = 'boolean'



To: pulkit, durin42, martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5270: tests: sniff for libfuzzer actually being available in test-fuzz-targets.t

2018-11-28 Thread durin42 (Augie Fackler)
durin42 updated this revision to Diff 12616.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5270?vs=12613=12616

REVISION DETAIL
  https://phab.mercurial-scm.org/D5270

AFFECTED FILES
  tests/test-fuzz-targets.t

CHANGE DETAILS

diff --git a/tests/test-fuzz-targets.t b/tests/test-fuzz-targets.t
--- a/tests/test-fuzz-targets.t
+++ b/tests/test-fuzz-targets.t
@@ -12,10 +12,26 @@
   > MAKE=make
   > fi
 
+  $ havefuzz() {
+  > cat > $TESTTMP/dummy.cc < #include 
+  > #include 
+  > int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { return 0; }
+  > int main(int argc, char **argv) {
+  > const char data[] = "asdf";
+  > return LLVMFuzzerTestOneInput((const uint8_t *)data, 4);
+  > }
+  > EOF
+  > $CXX $TESTTMP/dummy.cc -o $TESTTMP/dummy \
+  >-fsanitize=fuzzer-no-link,address || return 1
+  > }
+
 #if clang-libfuzzer
+  $ CXX=clang++ havefuzz || exit 80
   $ $MAKE -s clean all
 #endif
 #if no-clang-libfuzzer clang-6.0
+  $ CXX=clang++-6.0 havefuzz || exit 80
   $ $MAKE -s clean all CC=clang-6.0 CXX=clang++-6.0
 #endif
 #if no-clang-libfuzzer no-clang-6.0



To: durin42, #hg-reviewers
Cc: yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5269: tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t

2018-11-28 Thread durin42 (Augie Fackler)
durin42 updated this revision to Diff 12615.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5269?vs=12612=12615

REVISION DETAIL
  https://phab.mercurial-scm.org/D5269

AFFECTED FILES
  tests/test-fuzz-targets.t

CHANGE DETAILS

diff --git a/tests/test-fuzz-targets.t b/tests/test-fuzz-targets.t
--- a/tests/test-fuzz-targets.t
+++ b/tests/test-fuzz-targets.t
@@ -2,11 +2,21 @@
 
   $ cd $TESTDIR/../contrib/fuzz
 
+which(1) could exit nonzero, but that's fine because we'll still end
+up without a valid executable, so we don't need to check $? here.
+
+  $ GMAKE=`which gmake`
+  $ if [ -n "$GMAKE" -a -x $GMAKE ] ; then
+  > MAKE=$GMAKE
+  > else
+  > MAKE=make
+  > fi
+
 #if clang-libfuzzer
-  $ make -s clean all
+  $ $MAKE -s clean all
 #endif
 #if no-clang-libfuzzer clang-6.0
-  $ make -s clean all CC=clang-6.0 CXX=clang++-6.0
+  $ $MAKE -s clean all CC=clang-6.0 CXX=clang++-6.0
 #endif
 #if no-clang-libfuzzer no-clang-6.0
   $ exit 80



To: durin42, #hg-reviewers
Cc: yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH evolve-ext] exthelper: drop Mercurial 4.3 support

2018-11-28 Thread Matt Harbison

> On Nov 28, 2018, at 10:28 AM, Boris FELD  wrote:
> 
> This got pushed in a while back. Thanks a lot.
> 
> We are quite excited to see someone up-streaming of this.
> What's your overall plan? Feel encouraged to send further preparatory
> patches evolve side if necessary.

I noticed over the weekend, thanks.

I just copied the module to mercurial and switched lfs over. There’s more stuff 
that can be added like fileset and uipopulate support.  The only hiccup is 
revset.loadpredicate() and templatekw.loadkeyword() take the name of the 
extension that calls it. Right now it’s hard coded as “evolve”, which clearly 
isn’t right for the general case.  But neither of those methods do anything 
with it. I’m not sure if there’s python magic to figure out the module that 
instantiates the exthelper class, or how to handle this.

Also, it doesn’t have a copyright in the header, so I’m not sure who to assign 
that to.

___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5308: store: don't pass 'atomictemp=True' while appending to fncache

2018-11-28 Thread pulkit (Pulkit Goyal)
pulkit added a comment.


  Pasting Yuja's reply to that from mailing list:
  
  > In https://phab.mercurial-scm.org/D5308#78989, @pulkit wrote:
  >
  > > In https://phab.mercurial-scm.org/D5308#78985, @yuja wrote:
  > >
  > > > >   - a/mercurial/store.py +++ b/mercurial/store.py @@ -486,7 +486,7 @@ 
if self.addls:
  > > > > 1. if we have just new entries, let's append them to the fncache 
tr.addbackup('fncache')
  > > > > - fp = self.vfs('fncache', mode='ab', atomictemp=True) +
fp = self.vfs('fncache', mode='ab')
  > > >
  > > > Ah, no. addbackup() creates hardlink, which means fncache can't be 
updated in
  > > >  place. Also, the reader wouldn't handle partially-written fncache well.
  > >
  > >
  > > do we need to call `addbackup()` if we are just appending?
  >
  >
  > We need a mechanism to restore the original content on rollback. IIUC,
  >  it's `tr.add()` for append-only files.
  >
  > As I said, we'll also need to somehow hide partial data from another
  >  reader processes. There's no read lock.
  
  
  Read locks! was there a previous attempt on implementing them? I will try to 
take a shot at implementing them. I am unable to find any good detail except 
mentions in wiki or mailing list archive.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5308

To: pulkit, #hg-reviewers
Cc: yuja, mjpieters, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH 5 of 6 V2] match: avoid translating glob to matcher multiple times for large sets

2018-11-28 Thread Boris FELD

On 24/11/2018 00:51, Martin von Zweigbergk via Mercurial-devel wrote:
>
>
> On Fri, Nov 23, 2018 at 9:20 AM Boris FELD  > wrote:
>
>
> On 23/11/2018 10:24, Yuya Nishihara wrote:
> > On Fri, 23 Nov 2018 18:00:36 +0900, Yuya Nishihara wrote:
> >> On Fri, 23 Nov 2018 00:00:36 -0800, Martin von Zweigbergk via
> Mercurial-devel wrote:
> >>> On Thu, Nov 22, 2018 at 11:44 PM Martin von Zweigbergk <
> >>> martinv...@google.com > wrote:
>  On Thu, Nov 22, 2018 at 2:26 PM Boris Feld
> mailto:boris.f...@octobus.net>> wrote:
> 
> > # HG changeset patch
> > # User Boris Feld  >
> > # Date 1542916922 -3600
> > #      Thu Nov 22 21:02:02 2018 +0100
> > # Node ID 018578f3ab597d5ea573107e7310470de76a3907
> > # Parent  4628c3cf1fc1052ca25296c8c1a42c4502b59dc9
> > # EXP-Topic perf-ignore-2
> > # Available At https://bitbucket.org/octobus/mercurial-devel/
> > #              hg pull
> https://bitbucket.org/octobus/mercurial-devel/ -r
> > 018578f3ab59
> > match: avoid translating glob to matcher multiple times for
> large sets
> >
> > For hgignore with many globs, the resulting regexp might not
> fit under
> > the 20K
> > length limit. So the patterns need to be broken up in
> smaller pieces.
> >
>  Did you see 0f6a1bdf89fb (match: handle large regexes,
> 2007-08-19)
>  and 59a9dc9562e2 (ignore: split up huge patterns,
> 2008-02-11)? It might be
>  worth trying to figure out what Python versions those commits
> are talking
>  about. Maybe we've dropped support for those versions and we
> can simplify
>  this code.
> 
> >>> Oh, and what made me do the archaeology there was that you
> seem to have
> >>> lost the handling of OverlowError from the regex engine. As I
> said above, I
> >>> suspect that's fine because we no longer support some very old
> Python
> >>> versions (but please try to figure out what version that
> refers to). Still,
> >>> if we decide to drop that OverflowError handling, I'd prefer
> to see that in
> >>> an explicit commit early in this series.
> To me, 0f6a1bdf89fb (catching error from engine) is superseded by
> 59a9dc9562e2 (cannot trust the engine, preemptively raise our own
> error).
>
>
> Yes, perhaps (if it was only expressions longer than 20k that raised
> OverflowError). My point was that if that was the case, we should
> rewrite to avoid using an internal exception for flow control, i.e.
> change from this:
>
>     try:
>         regex = # create regex
>         if len(regex) > MAX_RE_SIZE:
>             raise OverflowError
>         return regex, _rematcher(regex)
>     except OverflowError:
>         # break up into smaller
>
> to this:
>
>     regex = # create regex
>     if len(regex) < MAX_RE_SIZE:
>         return regex, _rematcher(regex)
>     # break up into smaller
I don't disagree with the point. However, I do not know why it is
relevant to the current discussion. The series in review is no longer
using exception for flow control. What am I missing?
>
>  
>
>
> So I feel like it is fine to just rely on the size limit.
> >> Perhaps it's been fixed since 2.7.4. The regexp code width is
> extended
> >> from 16bit to 32bit (or Py_UCS4) integer. That should be large
> enough to
> >> handle practical patterns.
> >>
> >> https://bugs.python.org/issue1160
>
> Thanks for digging this out. It looks like we may be able to drop this
> limit altogether. However, I would like to make it a change distinct
> from this series.
>
> The current code is very problematic for some people (to the point
> where
> the majority of `hg status` time is spent in that function). I would
> like to get fast code for the same semantic first. Then look into
> changing the semantic.
>
>
> Is your concern that you might regress in performance of something by
> changing how large the groups are? Or that it would be more work?

My concern is that we are currently delaying a simple code change
yielding a huge improvement because there is the option for another
larger, riskier one.

I'm not dismissing your finding about lifting the limit and avoiding the
regexps joining. They look very promising and we are planning to explore
them. However, they are a different change.

The current series is preserving all the assumption we have been using
for the past 10 years, implementing a faster code for the same result.
This is a very low risk and solves the most immediate problem of a user
group we support.

Dropping the limit is a different matter. It is probably harmless to do
so, but Mercurial runs on a variety of systems and regexp engines. We'll
have to look at all the 

Re: [PATCH 4 of 6 V2] match: extract function that group regexps

2018-11-28 Thread Boris FELD

On 23/11/2018 08:26, Martin von Zweigbergk via Mercurial-devel wrote:
>
>
> On Thu, Nov 22, 2018 at 2:23 PM Boris Feld  > wrote:
>
> # HG changeset patch
> # User Boris Feld  >
> # Date 1542903949 -3600
> #      Thu Nov 22 17:25:49 2018 +0100
> # Node ID 4628c3cf1fc1052ca25296c8c1a42c4502b59dc9
> # Parent  b702174979d09090d5e5081d09755cbb74540ff0
> # EXP-Topic perf-ignore-2
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull
> https://bitbucket.org/octobus/mercurial-devel/ -r 4628c3cf1fc1
> match: extract function that group regexps
>
> diff --git a/mercurial/match.py b/mercurial/match.py
> --- a/mercurial/match.py
> +++ b/mercurial/match.py
> @@ -1186,6 +1186,10 @@ def _buildmatch(kindpats, globsuffix, li
>
>  MAXRESIZE = 2
>
> +def _groupregexps(regexps):
>
>
> The name suggests to me that it produces a list of lists or something
> like that, but it returns a single string. Something like
> "_joinregexps" seems clearer (maybe also s/exps/exes/ to match
> existing function names and variable names).
Good point, the name have been updated.
>  
>
> +    """gather multiple regexps into a single one"""
> +    return '(?:%s)' % '|'.join(regexps)
> +
>  def _buildregexmatch(kindpats, globsuffix):
>      """Build a match function from a list of kinds and kindpats,
>      return regexp string and a matcher function.
> @@ -1199,8 +1203,8 @@ def _buildregexmatch(kindpats, globsuffi
>      OverflowError
>      """
>      try:
> -        regex = '(?:%s)' % '|'.join([_regex(k, p, globsuffix)
> -                                     for (k, p, s) in kindpats])
> +        regex = _groupregexps([_regex(k, p, globsuffix)
> +                               for (k, p, s) in kindpats])
>          if len(regex) > MAXRESIZE:
>              raise OverflowError
>          return regex, _rematcher(regex)
> ___
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> 
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
>
> ___
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: Using internal phase for history rewriting

2018-11-28 Thread Boris FELD
We landed the necessary "requirements" in 4.8 and we are planning to
land the remaining code in the first half of 4.9.

On 13/11/2018 18:13, Gregory Szorc wrote:
> At the 4.8 sprint, we decided that we wanted to use "internal" phases
> for hiding rewritten changesets. From the notes:
>
> * We will use internal phase to hide rewritten changesets
>  * hg pull / hg unbundle receiving an internal phase changeset will
> bump the phase and unhide the changeset
>  * We will continue to write backup bundles. So restoring hidden
> changesets will mean applying backup bundle - same as today
>  * There are some complications related to interaction of internal
> phase and obsmarkers. To be figured out later.
>  * We will enable internal phase by default in 4.9 cycle hopefully
>  * Need to teach `hg debugupgraderepo` to enable internal phases on
> existing repos
>
> While not captured in the notes, my recollection is we would get this
> enabled by default as early as possible in 4.9 and make a
> determination closer to release time if it were stable enough to ship.
>
> Has any work towards this feature been made? Is there anything I can
> do to help this feature move forward?
>
> ___
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH evolve-ext] exthelper: drop Mercurial 4.3 support

2018-11-28 Thread Boris FELD
This got pushed in a while back. Thanks a lot.

We are quite excited to see someone up-streaming of this.
What's your overall plan? Feel encouraged to send further preparatory
patches evolve side if necessary.

On 11/11/2018 05:57, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison 
> # Date 1541912086 18000
> #  Sat Nov 10 23:54:46 2018 -0500
> # Node ID 58afc797eaeba9c1d20e41fc832d70aef0f0e6b2
> # Parent  2d9902f0ff175ff5e1baa4a4d8f7f37c7c9c7bf5
> exthelper: drop Mercurial 4.3 support
>
> The last release email noted plans to drop 4.3 and 4.4 support in the next
> feature release.  I'd like to move this code into core, and dropping this 
> should
> allow the class to be copied in unmodified.
>
> diff --git a/hgext3rd/evolve/exthelper.py b/hgext3rd/evolve/exthelper.py
> --- a/hgext3rd/evolve/exthelper.py
> +++ b/hgext3rd/evolve/exthelper.py
> @@ -4,6 +4,7 @@
>  
>  from mercurial import (
>  commands,
> +configitems,
>  extensions,
>  registrar,
>  revset,
> @@ -11,13 +12,6 @@
>  util,
>  )
>  
> -configitem = None
> -dynamicdefault = None
> -if util.safehasattr(registrar, 'configitem'):
> -configitem = registrar.configitem
> -from mercurial import configitems
> -dynamicdefault = configitems.dynamicdefault
> -
>  class exthelper(object):
>  """Helper for modular extension setup
>  
> @@ -49,20 +43,12 @@
>  self.command._doregister = _newdoregister
>  
>  self.configtable = {}
> -self._configitem = None
> -if configitem is not None:
> -self._configitem = configitem(self.configtable)
> -
> -def configitem(self, section, config):
> -"""For Mercurial 4.4 and above, register a config item
> +self._configitem = registrar.configitem(self.configtable)
>  
> -For now constraint to 'dynamicdefault' until we only support version 
> with the feature.
> -Older version would otherwise not use the declare default.
> -
> -For older version no-op fallback for old Mercurial versions
> +def configitem(self, section, config, 
> default=configitems.dynamicdefault):
> +"""Register a config item.
>  """
> -if self._configitem is not None:
> -self._configitem(section, config, default=dynamicdefault)
> +self._configitem(section, config, default=default)
>  
>  def merge(self, other):
>  self._uicallables.extend(other._uicallables)
> ___
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH evolve-ext] evolve: fix a documentation typo

2018-11-28 Thread Boris FELD
This got pushed a couple of days back and is part of the 8.3.2 we
released today.

Thanks

On 20/11/2018 18:27, Eric Spishak-Thomas via Mercurial-devel wrote:
> # HG changeset patch
> # User Eric Spishak-Thomas 
> # Date 1542731618 18000
> #  Tue Nov 20 11:33:38 2018 -0500
> # Branch stable
> # Node ID 374bc8bd4f7c328ed7ad4e97c582f7db625b2bc0
> # Parent  b90422a11a887c6ff756c2a5622ea0a1e260ff4c
> evolve: fix a documentation typo
>
> diff --git a/hgext3rd/evolve/evolvecmd.py b/hgext3rd/evolve/evolvecmd.py
> --- a/hgext3rd/evolve/evolvecmd.py
> +++ b/hgext3rd/evolve/evolvecmd.py
> @@ -1444,7 +1444,7 @@ def evolve(ui, repo, **opts):
>   interrupted evolve
>
>- `hg evolve --stop`:
> - stops the current interrupted evolve,. keeping all the
> successful steps,
> + stops the current interrupted evolve, keeping all the
> successful steps,
>   but delaying to resolution of the remaining step for later.
>
>- `hg evolve --abort`:
>
> ___
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: Auto-formatting code with black - object now if you have a strong opinion

2018-11-28 Thread Yuya Nishihara
On Tue, 27 Nov 2018 15:42:21 -0800, Gregory Szorc wrote:
> I also have some issues with black's formatting. I dislike black's use of
> double quotes for strings (maybe a holdover from my knowledge of shell,
> Perl, and PHP, where different quotes matter). And I wish it didn't collect
> imports on the same line.

I don't care ' vs ", but I agree that the import style isn't nice. Merge
conflicts will be more likely to occur because of that.

> But my objections are insignificant compared to
> the benefits of having consistently formatted source code. The research in
> this area shows that the actual style matters less than consistency.

Can we somehow reject patches automatically if they disagree with the
formatter? I'm not interested in fixing test-check-* failure in flight.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5302: py3: use pycompat.xrange instead of xrange

2018-11-28 Thread pulkit (Pulkit Goyal)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGba706e3082bd: py3: use pycompat.xrange instead of xrange 
(authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5302?vs=12606=12614

REVISION DETAIL
  https://phab.mercurial-scm.org/D5302

AFFECTED FILES
  tests/test-remotefilelog-histpack.py

CHANGE DETAILS

diff --git a/tests/test-remotefilelog-histpack.py 
b/tests/test-remotefilelog-histpack.py
--- a/tests/test-remotefilelog-histpack.py
+++ b/tests/test-remotefilelog-histpack.py
@@ -251,7 +251,7 @@
 This causes it to use a 2^16 fanout table instead."""
 total = basepack.SMALLFANOUTCUTOFF + 1
 revisions = []
-for i in xrange(total):
+for i in pycompat.xrange(total):
 filename = b"foo-%d" % i
 node = self.getFakeHash()
 p1 = self.getFakeHash()



To: pulkit, #hg-reviewers
Cc: durin42, mjpieters, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH 6 of 6] vfs: also audit rename

2018-11-28 Thread Yuya Nishihara
On Mon, 26 Nov 2018 19:22:48 +0100, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld 
> # Date 1498961267 -7200
> #  Sun Jul 02 04:07:47 2017 +0200
> # Node ID afdc73b20bd1faeec1b278ef0a2ab8d1dda71eb8
> # Parent  cc7d970d99eb242dbe2d8e792a9212aabd06911f
> # EXP-Topic vfs.audit-rename
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #  hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 
> afdc73b20bd1
> vfs: also audit rename

Queued the first 4 patches, thanks.

> diff --git a/mercurial/vfs.py b/mercurial/vfs.py
> --- a/mercurial/vfs.py
> +++ b/mercurial/vfs.py
> @@ -436,6 +436,10 @@ class vfs(abstractvfs):
>  
>  return fp
>  
> +def rename(self, src, dst, *args, **kwargs):
> +self._auditpath(dst, 'w')
> +return super(vfs, self).rename(src, dst, *args, **kwargs)

Can you move this to abstractvfs.rename()?

I don't think it's worth to override rename() just for _auditpath(). Instead,
abstractvfs can implement _auditpath() that raises exception.

Also, 'dst' is likely to be relative in abstractvfs.rename(), so we won't
probably need to convert absolute 'dst' back to relative path.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH 1 of 6 V3] perf: add a perfignore command

2018-11-28 Thread Yuya Nishihara
On Fri, 23 Nov 2018 15:12:44 +0100, Boris Feld wrote:
> # HG changeset patch
> # User Boris Feld 
> # Date 1542916813 -3600
> #  Thu Nov 22 21:00:13 2018 +0100
> # Node ID 917fa088dd67d1f56c751de59acc91abc799d83a
> # Parent  efd0f79246e3e6633dfd06226464a48584f69b19
> # EXP-Topic perf-ignore
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #  hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 
> 917fa088dd67
> perf: add a perfignore command

Queued only this patch, thanks.

Per discussion in the V2 thread, we aren't sure if it's still needed to
combine patterns into a single large regexp.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: [PATCH 1 of 2] tests: also skip remotefilelog *.py tests on Windows

2018-11-28 Thread Yuya Nishihara
On Tue, 27 Nov 2018 22:46:39 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison 
> # Date 1543375392 18000
> #  Tue Nov 27 22:23:12 2018 -0500
> # Node ID c743bb1c19513a61925ce4663d33323aea7016cc
> # Parent  df8ed31a8ad8ae116e31550d9128055ece22e258
> tests: also skip remotefilelog *.py tests on Windows

Queued, thanks.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5270: tests: sniff for libfuzzer actually being available in test-fuzz-targets.t

2018-11-28 Thread yuja (Yuya Nishihara)
yuja added a comment.


  > +  $ havefuzz() {
  >  +  > cat > $TESTTMP/dummy.cc <  +  > #include 
  >  +  > int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { return 
0; }
  
  Still stdint.h is missing.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5270

To: durin42, #hg-reviewers
Cc: yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: D5270: tests: sniff for libfuzzer actually being available in test-fuzz-targets.t

2018-11-28 Thread Yuya Nishihara
> +  $ havefuzz() {
> +  > cat > $TESTTMP/dummy.cc < +  > #include 
> +  > int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { return 0; 
> }

Still stdint.h is missing.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D5269: tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t

2018-11-28 Thread yuja (Yuya Nishihara)
yuja added a comment.


  > +  $ GMAKE=`which gmake`
  >  +  $ if [ -x $GMAKE ] ; then
  
  Need to check whether `"$GMAKE"` is empty or not. And `which gmake` may
  fail with 1.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5269

To: durin42, #hg-reviewers
Cc: yuja, mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


Re: D5269: tests: sniff for /usr/local/bin/gmake and use it in test-fuzz-targets.t

2018-11-28 Thread Yuya Nishihara
> +  $ GMAKE=`which gmake`
> +  $ if [ -x $GMAKE ] ; then

Need to check whether `"$GMAKE"` is empty or not. And `which gmake` may
fail with 1.
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel