Boris Feld <boris.feld@octobus.net> [Wed, 20 Sep 2017 18:29:10 +0200] rev 34328
bundle2: only grab a transaction when 'phase-heads' affect the repository
The next patch will use the 'phase-heads' part to exchange phase data relevant to
the pulled set.
'handlephases' currently acquires a transaction even in case of no-op pull,
which would results in an empty transaction and messing with the existing
journal.
Pass the transaction fetcher to updatephases so it can fetch it if necessary.
Boris Feld <boris.feld@octobus.net> [Tue, 19 Sep 2017 22:23:41 +0200] rev 34327
phases: move the binary decoding function in the phases module
We move the decoding function near the encoding one in a place where they can
be reused in other place (current target, 'exchange.py').
Boris Feld <boris.feld@octobus.net> [Tue, 19 Sep 2017 22:01:31 +0200] rev 34326
phases: move binary encoding into a reusable function
We want to use binary phases for pushing and pulling. We extract the encoding
function out of the bundle2 module first.
Boris Feld <boris.feld@octobus.net> [Tue, 19 Sep 2017 22:08:09 +0200] rev 34325
phases: use a Struct object for binary encoding and decoding
We will move the binary encoding and decoding code to 'phases.py' in order to
make it easier to reuse. First, let's cleanup it a bit.
Boris Feld <boris.feld@octobus.net> [Wed, 20 Sep 2017 05:47:33 +0200] rev 34324
discovery: avoid dropping remote heads hidden locally
An extra post processing was added to recognize remote heads that are hidden
locally as "common" instead of "unknown". However, this processing was
removing such hidden heads from the remote heads sets.
It had no impact because we used to pull phase information from all remote
heads.
This series will replace the phase pulling operation to a more efficient
process but requires the unmodified pulled set information.
Jun Wu <quark@fb.com> [Fri, 29 Sep 2017 11:41:24 -0700] rev 34323
test-patchbomb: use mocktime
The test was using system time for displaying ETAs, which could be flaky if
the sysload is high. This patch extracts mocktime.py from test-progress.t to
make sure test-patchbomb.t is unaffected by system time.
Differential Revision: https://phab.mercurial-scm.org/D844
Jun Wu <quark@fb.com> [Thu, 28 Sep 2017 10:37:53 -0700] rev 34322
test-patchbomb: fix the test
With the experimental config `progress.estimate` removed, the progress
output in `test-patchbomb.t` has a minor change: it shows ETA since the
beginning.
(This could be folded into f428c3)
Jun Wu <quark@fb.com> [Wed, 27 Sep 2017 15:14:59 -0700] rev 34321
progress: make ETA only consider progress made in the last minute
This patch limits the estimate time interval to roughly the last minute
(configurable by `estimateinterval`) to be more practical. See the test
change for why this is better.
.. feature:: Estimated time is more accurate with non-linear progress
Differential Revision: https://phab.mercurial-scm.org/D820
Jun Wu <quark@fb.com> [Wed, 27 Sep 2017 14:30:58 -0700] rev 34320
progress: remove progress.estimate config
It was introduced by 98e4d39 ("progress: add speed format" 2011-5-9) and was
intended to hide ETA information for the first few seconds.
Later 5d261fd ("progress: add a changedelay to prevent parallel topics from
flapping (issue2698)" 2011-6-23) introduced `changedelay` config which hides
the entire progress bar for the first few seconds. So `progress.estimate` seems
somehow duplicated feature-wise. Since it's experimental and duplicated, let's
just remove it. This makes the next patch simpler - it no longer needs to make
sure `starttimes` is the real start time.
Differential Revision: https://phab.mercurial-scm.org/D828
Jun Wu <quark@fb.com> [Tue, 26 Sep 2017 12:48:15 -0700] rev 34319
progress: demonstrate non-linear progress has a bad ETA experience
Previously, the ETA and speed assumes the progress is linear. Often, due to
network or other issues, it could be fast for the most time, and suddenly
slow down:
[====================================================> ]
\___________________________________________/\______/
very fast suddenly much slower
This patch adds a test demonstrating the ETA could be way off in those
cases.
Differential Revision: https://phab.mercurial-scm.org/D819
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 21 Sep 2017 15:58:44 +0530] rev 34318
copytrace: add a a new config to limit the number of drafts in heuristics
The heuristics options tries to the default full copytracing algorithm if both
the source and destination branches contains of non-public changesets only. But
this can be slow in cases when we have a lot of drafts.
This patch adds a new config option experimental.copytrace.sourcecommitlimit
which defaults to 100. This value will be the limit of number of drafts from c1
to base. Incase there are more changesets even though they are draft, the
heuristics algorithm will be used.
Differential Revision: https://phab.mercurial-scm.org/D763
Igor Ippolitov <iippolitov@gmail.com> [Tue, 26 Sep 2017 16:14:57 +0300] rev 34317
mail: encode long unicode lines in emails properly (issue5687)
3e544c074459 introduced a bug: emails Content-Transfer-Encoding
is silently replaced with 'quoted-printable' while any other
encoding could be used by underlying code. The problem is revealed
when a long unicode line is encoded.
The patch implements proper check which works for any text and
encoding.
Jun Wu <quark@fb.com> [Sat, 23 Sep 2017 14:58:40 -0700] rev 34316
chg: show timestamp with debug messages
Like `strace -tr`, this helps finding performance bottlenecks.
Differential Revision: https://phab.mercurial-scm.org/D807
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 25 Sep 2017 11:05:16 +0200] rev 34315
keepalive: add more context to bad status line errors
As the TODO in the test said, the previous error message was not
very helpful. Let's improve things.
Differential Revision: https://phab.mercurial-scm.org/D811
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 18 Aug 2017 20:20:38 -0700] rev 34314
tests: add interface checks for bundle, statichttp, and union peers
I forgot to add these when I initially wrote the test. They inherit
from localrepo.localpeer, so they should be explicitly tested.
Differential Revision: https://phab.mercurial-scm.org/D810
Jun Wu <quark@fb.com> [Sat, 23 Sep 2017 13:46:12 -0700] rev 34313
alias: make alias command lazily resolved
With many aliases, resolving them could have some visible overhead. Below is
part of traceprof [1] output of `hg bookmark --hidden`:
(time unit: ms)
37 \ addaliases dispatch.py:526
37 | __init__ (60 times) dispatch.py:402
33 | findcmd (108 times) cmdutil.py:721
16 | findpossible (49 times) cmdutil.py:683
It may get better by optimizing `findcmd` to do a bisect, but we don't
really need to resolve an alias if it's not used, so let's make those
command entries lazy.
After this patch, `addalias` takes less than 1ms.
.. perf:: improved performance when many aliases are defined
[1]: https://bitbucket.org/facebook/hg-experimental/src/9aca0dbdbdfc48457e5d2581ca2d6e662fced2e6/hgext3rd/traceprof.pyx
Differential Revision: https://phab.mercurial-scm.org/D805
Jun Wu <quark@fb.com> [Sat, 23 Sep 2017 13:31:09 -0700] rev 34312
alias: test duplicated definition earlier
This patch moves the old definition checking logic introduced by
f4b7be3f8430 earlier. So that the test itself does not depend on `aliasdef`.
The check is to avoid wrapping a same alias multiple times. It can be done
by checking the config name and value (`definition` in code), without
constructing a `cmdalias` instance.
This makes the next patch easier to review.
Differential Revision: https://phab.mercurial-scm.org/D804
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 24 Sep 2017 19:37:55 +0530] rev 34311
uncommit: add a test for uncommit with uncommitondirtywdir config in merge
Differential Revision: https://phab.mercurial-scm.org/D809
Phil Cohen <phillco@fb.com> [Thu, 14 Sep 2017 13:14:32 -0700] rev 34310
largefiles: force an on-disk merge
Largefiles isn't a good candidate for in-memory merge (it uses a custom
dirstate, matcher, and the files might not fit in memory) so have it always
run an old-style merge.
Differential Revision: https://phab.mercurial-scm.org/D683
Phil Cohen <phillco@fb.com> [Thu, 14 Sep 2017 13:14:32 -0700] rev 34309
merge: allow a custom working context to be passed to update
This will allow anyone to enable the first in-menmory merge milestone
by wrapping merge.update in an extension and creating an overlayworkingctx.
Differential Revision: https://phab.mercurial-scm.org/D682
Augie Fackler <augie@google.com> [Wed, 14 Jun 2017 11:13:57 -0400] rev 34308
patchbomb: add test that shows --to and --cc override matching config item
As far as I know this has always been true and is intentional (it's in
line with many other behaviors), but it wasn't tested.
Jun Wu <quark@fb.com> [Thu, 21 Sep 2017 11:10:20 -0700] rev 34307
blackbox: move _openlogfile to a separate method
This removes several `stat` syscalls for accessing `_bbvfs` and makes `ui`
object cleaner.
Differential Revision: https://phab.mercurial-scm.org/D769
Jun Wu <quark@fb.com> [Thu, 21 Sep 2017 11:03:37 -0700] rev 34306
blackbox: do not prevent 'chg init' from working
Previously, blackbox always appends to blackbox.log and creates the
directory for that file on demand. That could be an issue if:
1. chg starts from `$REPO` directory, so `ui._bbrepo` is set.
2. `rm -rf $REPO`.
3. `chg init $REPO`, blackbox writes something and `init` will fail
because `$REPO` directory is non-empty.
This patch fixes that by verifying whether vfs exists before re-using it.
Differential Revision: https://phab.mercurial-scm.org/D768
Augie Fackler <augie@google.com> [Mon, 11 Sep 2017 20:07:41 -0400] rev 34305
tests: add a test for blackbox with nested alias configurations
I've observed some weirdness around this, and needed to rule some
things out. There aren't any bugs in core around this, but it was nice
to have confirmation.
Augie Fackler <augie@google.com> [Mon, 11 Sep 2017 20:06:52 -0400] rev 34304
tests: clean up blackbox test around aliases a little bit
Mark Thomas <mbthomas@fb.com> [Wed, 13 Sep 2017 17:26:26 +0000] rev 34303
revlog: add option to mmap revlog index
Following on from Jun Wu's patch last October[1], we have found that using mmap
for the revlog index in repos with large revlogs gives a noticable performance
improvment (~110ms on each hg invocation), particularly for commands that don't
touch the index very much.
This changeset adds this as an option, activated by a new experimental config
option so that it can be enabled on a per-repo basis. The configuration option
specifies an index size threshold at which Mercurial will switch to using mmap
to access the index.
If the configuration option is not specified, the default remains to load the
full file, which seems to be the best option for smaller repos.
Some initial performance numbers for average of 5 invocations of `hg log -l 5`
for different cache states:
| Repo: | HG | FB |
|---|---|---|
| Index size: | 2.3MB | much bigger |
| read (warm): | 237ms | 432ms |
| mmap (warm): | 227ms | 321ms |
| | (-3%) | (-26%) |
| read (cold): | 397ms | 696ms |
| mmap (cold): | 410ms | 888ms |
| | (+3%) | (+28%) |
[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-October/088737.html
Test Plan:
`hg log --config experimental.mmapindex=true`
Differential Revision: https://phab.mercurial-scm.org/D477
Mark Thomas <mbthomas@fb.com> [Thu, 21 Sep 2017 05:54:34 -0700] rev 34302
util: add an mmapread method
This is useful for large files that are only partly touched.
Test Plan:
Will be used and tested in a later patch.
Differential Revision: https://phab.mercurial-scm.org/D476
Durham Goode <durham@fb.com> [Wed, 20 Sep 2017 09:35:45 -0700] rev 34301
changegroup: remove dictionary creation from deltachunk
Previously delta chunk returned a dictionary. Now that we consume deltachunk
within changegroup (instead of outside in revlog) we can just return a tuple and
have it be returned directly by deltaiter.
Differential Revision: https://phab.mercurial-scm.org/D746
Durham Goode <durham@fb.com> [Wed, 20 Sep 2017 09:39:03 -0700] rev 34300
bundlerepo: update to use new deltaiter api
Differential Revision: https://phab.mercurial-scm.org/D745
Durham Goode <durham@fb.com> [Wed, 20 Sep 2017 09:28:30 -0700] rev 34299
debug: update debugbundle to use new deltaiter api
Changegroup now has a deltaiter api for easy iteration over a series of deltas.
Let's use that in the debugbundle command.
Differential Revision: https://phab.mercurial-scm.org/D744
Durham Goode <durham@fb.com> [Wed, 20 Sep 2017 09:22:22 -0700] rev 34298
revlog: add revmap back to revlog.addgroup
The recent c8b6ed51386b patch removed the linkmapper argument from addgroup, as
part of trying to make addgroup more agnostic from the changegroup format. It
turns out that the changegroup can't resolve linkrevs while iterating over the
deltas, because applying the deltas might affect the linkrev resolution. For
example, when applying a series of changelog entries, the linkmapper just
returns len(cl). If we're iterating over the deltas without applying them to the
changelog, this results in incorrect linkrevs. This was caught by the hgsql
extension, which reads the revisions before applying them.
The fix is to return linknodes as part of the delta iterator, and let the
consumer choose what to do.
Differential Revision: https://phab.mercurial-scm.org/D730
Martin von Zweigbergk <martinvonz@google.com> [Tue, 19 Sep 2017 22:06:26 -0700] rev 34297
rebase: also include other namespaces in changeset description
This makes use of the generic method of listing bookmarks and tags, so
other extensions that add other namespaces will get their names added
too.
This does mean that bookmarks will come before tags, just like we
apparently decided to order them in the "hg log" output. It doesn't
seem like people would be parsing the rebase output anyway. We also
did 79ab5369d55a (rebase: use _ctxdesc in one more place, 2017-08-29)
recently, so now seems like a good time.
Differential Revision: https://phab.mercurial-scm.org/D741
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 20 Sep 2017 07:46:55 +0530] rev 34296
tersestatus: sort the dictionary before iterating on it
There has report of flakiness in test-status-terse.t. In the terse code, we are
iterating on a dictionary without sorting and since python dicts are unordered,
that can be a reason behind the flakiness. Before we have a better
implementation for the terse thing, let's make sure current implementation
possess minimum bugs.
Differential Revision: https://phab.mercurial-scm.org/D740
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 03 Sep 2017 20:06:45 +0530] rev 34295
copytrace: use the full copytracing method if only drafts are involved
This patch adds the functionality to use the full copytracing even if
`experimental.copytrace = heuristics` in cases when drafts are involved.
This is also a part of copytrace extension in fbext.
This also adds tests which are also taken from fbext.
.. feature::
The `heuristics` option for `experimental.copytrace` performs full
copytracing if both source and destination branches contains non-public
changsets only.
Differential Revision: https://phab.mercurial-scm.org/D625
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Sep 2017 10:43:22 -0700] rev 34294
templates: introduce a obsfateoperation() function
Differential Revision: https://phab.mercurial-scm.org/D723
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Sep 2017 10:42:49 -0700] rev 34293
obsmarker: track operation by default
We added support for including the operation responsible for creating
the obsmarker in 3546a771e376 (obsolete: add operation metadata to
rebase/amend/histedit obsmarkers, 2017-05-09). However, soon
thereafter, in f432897a9f49 (obsmarker: add an experimental flag
controlling "operation" recording, 2017-05-20), it was hidden behind a
config that was off by default. It seems unlikely that people will
manually turn it on, and obsmarkers/evolution as a whole is still
experimental anyway, so let's turn on the tracking by default.
Differential Revision: https://phab.mercurial-scm.org/D722
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 20 Sep 2017 02:40:25 +0530] rev 34292
uncommit: add an experimental.uncommitondirtywdir config
There are people who wants to do `hg uncommit` on dirty working directory, so
this patch adds a config which can be used to the achieve that.
Adds tests for the same.
Differential Revision: https://phab.mercurial-scm.org/D735
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 20 Sep 2017 02:18:01 +0530] rev 34291
uncommit: don't allow bare uncommit on dirty working directory
As per IRC discussion and suggestion by Augie, we should not allow bare `hg
uncommit` on dirty working directory.
Differential Revision: https://phab.mercurial-scm.org/D734
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 16 Sep 2017 02:34:13 +0530] rev 34290
uncommit: rename the flag 'empty' to 'keep' which retains empty changeset
This patch renames the flag 'empty' which retains the empty changeset if all
the files are uncommitted to 'keep'.
Differential Revision: https://phab.mercurial-scm.org/D726
Augie Fackler <augie@google.com> [Mon, 18 Sep 2017 14:19:47 -0400] rev 34289
tests: avoid repr in test-bundle2-format.t
We don't *really* need it here, and it was making Python 3 harder.
Augie Fackler <augie@google.com> [Mon, 18 Sep 2017 14:04:05 -0400] rev 34288
tests: port test-bundle2-format inline helper script to Python 3
We're now very close to this test passing.
Augie Fackler <augie@google.com> [Tue, 19 Sep 2017 00:27:55 -0400] rev 34287
bundle2: portably grab first byte of part name for letter check
Augie Fackler <augie@google.com> [Mon, 18 Sep 2017 14:03:21 -0400] rev 34286
bundle2: make ValueError messages native strings
Augie Fackler <augie@google.com> [Mon, 18 Sep 2017 13:36:05 -0400] rev 34285
bundle2: update check for a generator to work on Python 3
Augie Fackler <augie@google.com> [Mon, 18 Sep 2017 13:35:43 -0400] rev 34284
bundle2: stop using %r to quote part names
Valid part names are restricted to [a-zA-Z0-9_:-]+, so I'm not worried
about having quoting present in places where we should have
predominantly valid part names. This will significantly ease the
Python 3 transition, and simultaneously isn't a BC because this is
only in error messages that should never be shown.
Jun Wu <quark@fb.com> [Mon, 18 Sep 2017 16:01:03 -0700] rev 34283
blackbox: set lastui even if ui.log is not called (issue5518)
`lastui` decides where (where is the `.hg`) to use if the current `ui`
object does not have a `_bbrepo` associated. Previously it only gets set in
`ui.log`, which means unless a `ui` with repo associated calls `log` with
tracked event, blackbox does not know where to write its log. This patch
makes `reposetup` set `lastui` so it so we could log some more events (see
test changes).
Differential Revision: https://phab.mercurial-scm.org/D655
Jun Wu <quark@fb.com> [Wed, 06 Sep 2017 21:23:38 -0700] rev 34282
blackbox: unindent a try block
The try block is no longer necessary.
Differential Revision: https://phab.mercurial-scm.org/D654
Jun Wu <quark@fb.com> [Mon, 18 Sep 2017 15:56:08 -0700] rev 34281
blackbox: simplify ui states
It seems cleaner to just remove `_partialinit`, `copy`, `__init__`. This
patch makes it so by using `getattr` in `log` so those fields do not need to
be existed.
Differential Revision: https://phab.mercurial-scm.org/D652
Jun Wu <quark@fb.com> [Fri, 01 Sep 2017 19:42:09 -0700] rev 34280
revset: move weight information to predicate
Previously revset weight is hardcoded and cannot be modified. This patch
moves it to predicate so newly registered revsets could define their weight
to properly give static optimization some hint.
Differential Revision: https://phab.mercurial-scm.org/D657
Jun Wu <quark@fb.com> [Fri, 01 Sep 2017 19:30:40 -0700] rev 34279
revset: remove "small" argument from "_optimize"
`_optimize` calculates weights of subtrees. "small" affects some weight
calculation (either 1 or 0.5). The weights are now only useful in `and`
optimization where we might swap two arguments and use `andsmally`.
In the real world, it seems unlikely that revsets with weight of 0.5 or 1
matters the `and` order optimization. I think the important thing is to get
weights of expensive revsets right (ex. `contains`).
This patch removes the `small` argument to simplify the interface.
As for choosing between 0.5 vs 1, things returning a single revision
(`ancestor`, `string`) has a weight of 0.5. Things returning multiple
revisions returns 1. This could be sometimes useful in the `andsmally`
optimization, ex.
(((:)-2) & expensive()) & ((1-2) & expensive())
^^^ ^
^^^^^^^ ^^^^^
^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^
weight=1 weight=0.5
would have an `andsmally` optimization so `1-2` gets executed first, which
seems to be desirable.
Differential Revision: https://phab.mercurial-scm.org/D656
Augie Fackler <augie@google.com> [Mon, 18 Sep 2017 13:37:00 -0400] rev 34278
ui: fix progress debug log format strings to work on Python 3
Augie Fackler <augie@google.com> [Mon, 18 Sep 2017 13:37:32 -0400] rev 34277
tests: update `f` helper script to work on Python 3
Augie Fackler <augie@google.com> [Tue, 19 Sep 2017 00:09:37 -0400] rev 34276
tests: fix run-tests XML reporting on Python 3
cdatasafe wants to work in terms of bytes, but of course we have a
unicode. Easy to work around, especially since we know we'll get utf-8
at the end.
Augie Fackler <augie@google.com> [Tue, 19 Sep 2017 00:08:52 -0400] rev 34275
tests: convert bisect support regex to binary
The bisection feature of run-tests still fails tests with this because
bisect itself doesn't work yet. We'll get there.
Augie Fackler <augie@google.com> [Tue, 19 Sep 2017 00:08:12 -0400] rev 34274
tests: decode bytes path to hg command before hitting with shellquote
Augie Fackler <augie@google.com> [Tue, 19 Sep 2017 00:07:51 -0400] rev 34273
tests: fix test-is-whitelisted check in run-tests
Again, look for bytes in a set of bytes objects.
Augie Fackler <augie@google.com> [Tue, 19 Sep 2017 00:07:23 -0400] rev 34272
tests: fix run-tests "slow test" check
Look for bytes in a set of bytes objects.
Augie Fackler <augie@google.com> [Tue, 19 Sep 2017 00:06:57 -0400] rev 34271
tests: fix run-tests default values in Test constructor
As far as I can tell, default values are evaluated far earlier on
Python 3.6 than 2.7, meaning we've got to be more careful about when
we read the defaults dictionary for the kwarg defaults. Sigh.
With this change, test-run-tests.t is significantly less of a mess
under 3.6.
Augie Fackler <augie@google.com> [Mon, 18 Sep 2017 17:11:32 -0400] rev 34270
tests: add support for listing tests to run in a file
This will make it easier for us to run the tests in the python3
whitelist in buildbot.
Augie Fackler <augie@google.com> [Mon, 18 Sep 2017 15:34:50 -0400] rev 34269
python3: remove test-update-dest.t from the whitelist
I've poked at this on and off several times, and I can't figure out
what regressed. Let's kick this out of the whitelist for now so that
we can get the *rest* of our progress covered by the buildbots.
Durham Goode <durham@fb.com> [Thu, 14 Sep 2017 10:20:05 -0700] rev 34268
bundle2: move part processing to a separate function
Now that the part processing loop is tiny, let's move it to a separate function.
This will allow extensions to completely replace the part processing logic,
without having to replace the overall bundle processing logic or the stream
maintenance logic.
This will be useful for the infinitepush extension, so it can completely take
over receiving a bundle and rerouting it to a side store. This will also make it
easier to upstream the infinitepush functionality later.
Differential Revision: https://phab.mercurial-scm.org/D709
Durham Goode <durham@fb.com> [Thu, 14 Sep 2017 10:20:05 -0700] rev 34267
bundle2: remove unnecessary try finally
This is no longer needed.
Differential Revision: https://phab.mercurial-scm.org/D708
Durham Goode <durham@fb.com> [Thu, 14 Sep 2017 10:20:05 -0700] rev 34266
bundle2: move handler validation out of processpart
As part of refactoring bundle part processing let's move handler validation to
its own function.
Differential Revision: https://phab.mercurial-scm.org/D707
Durham Goode <durham@fb.com> [Thu, 14 Sep 2017 10:20:05 -0700] rev 34265
bundle2: move processpart stream maintenance into part iterator
The processpart function also did some stream maintenance, so let's move it to
the part iterator as well, as part of moving all part iteration logic into the
class.
There is one place processpart is called outside of the normal loop, so we
manually handle the seek there.
The now-empty try/finally will be removed in a later patch, for ease of review.
Differential Revision: https://phab.mercurial-scm.org/D706
Kevin Bullock <kbullock+mercurial@ringworld.org> [Mon, 18 Sep 2017 14:12:20 -0500] rev 34264
merge with stable
Yuya Nishihara <yuya@tcha.org> [Sun, 17 Sep 2017 12:39:53 +0900] rev 34263
py3: convert system strings to bytes in doctest of formatter.py
Yuya Nishihara <yuya@tcha.org> [Sun, 17 Sep 2017 12:39:14 +0900] rev 34262
py3: rewrite stdout hack of doctest by using ui.pushbuffer()
We can't use pycompat.stdout here because the doctest runner replaces
sys.stdout with a string buffer.
Yuya Nishihara <yuya@tcha.org> [Sun, 17 Sep 2017 12:26:42 +0900] rev 34261
py3: use bytes os.sep in doctest of pathutil.py
Yuya Nishihara <yuya@tcha.org> [Sun, 17 Sep 2017 12:23:16 +0900] rev 34260
py3: fix doctests in patch.py to be compatible with Python 3
We were lucky that parsepatch() could concatenate a character slice as if
it were a list of chunks.
Yuya Nishihara <yuya@tcha.org> [Sun, 17 Sep 2017 12:20:35 +0900] rev 34259
py3: stop using bytes[n] in patch.py
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Sep 2017 16:45:33 +0900] rev 34258
error: move patch.PatchError so it can easily implement __bytes__ (API)
Martin von Zweigbergk <martinvonz@google.com> [Fri, 15 Sep 2017 00:01:57 -0700] rev 34257
templater: extract shortest() logic from template function
It can be useful for extensions to be able to produce the shortest
unambiguous hash (including the in-tree "show" extension). That logic
is currently inside the shortest() template function. Let's move it
out of the templater. I've put it on revlog since it's closely related
to revlog._partialmatch. We may also want a convenience method on
context, but I'll leave that for a later patch.
Differential Revision: https://phab.mercurial-scm.org/D724
Augie Fackler <raf@durin42.com> [Fri, 15 Sep 2017 18:37:29 -0400] rev 34256
bundle2: raise a more helpful error if building a bundle part header fails
I've tripped on this several times now, and am tired of debugging. Now
the header parts are part of the error message when the ''.join()
fails, which makes debugging obvious.
Boris Feld <boris.feld@octobus.net> [Fri, 15 Sep 2017 18:57:50 +0200] rev 34255
hgwebdir: read 'web.template' untrusted
The 'hgweb_mod.py' version of this read it untrusted. For consistency we align
the two versions of this code.
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:53 +0200] rev 34254
configitems: register the 'web.templates' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:52 +0200] rev 34253
configitems: register the 'web.style' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:51 +0200] rev 34252
configitems: register the 'web.stripes' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:50 +0200] rev 34251
configitems: register the 'web.refreshinterval' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:49 +0200] rev 34250
configitems: register the 'web.prefix' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:48 +0200] rev 34249
configitems: register the 'web.port' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:47 +0200] rev 34248
configitems: register the 'web.ipv6' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:45 +0200] rev 34247
configitems: register the 'web.errorlog' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:44 +0200] rev 34246
configitems: register the 'web.encoding' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:43 +0200] rev 34245
configitems: register the 'web.description' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:42 +0200] rev 34244
configitems: register the 'web.descend' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:41 +0200] rev 34243
configitems: register the 'web.deny_read' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:40 +0200] rev 34242
configitems: register the 'web.csp' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:38 +0200] rev 34241
configitems: register the 'web.collapse' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:37 +0200] rev 34240
configitems: register the 'web.certificate' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:36 +0200] rev 34239
configitems: register the 'web.cacerts' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:35 +0200] rev 34238
configitems: register the 'web.baseurl' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:34 +0200] rev 34237
configitems: register the 'web.allow_read' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:33 +0200] rev 34236
configitems: register the 'web.allow_archive' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:32 +0200] rev 34235
configitems: register the 'web.address' config
Boris Feld <boris.feld@octobus.net> [Fri, 30 Jun 2017 03:45:31 +0200] rev 34234
configitems: register the 'web.accesslog' config
Boris Feld <boris.feld@octobus.net> [Fri, 15 Sep 2017 19:21:08 +0200] rev 34233
web: use '_unset' default value for proxy config method
This special value is needed to make sure registered default value are taken in
account.
Augie Fackler <raf@durin42.com> [Sat, 16 Sep 2017 11:48:05 -0400] rev 34232
tests: use int() instead of long() in test-pathencode.py
Augie Fackler <raf@durin42.com> [Sat, 16 Sep 2017 11:47:53 -0400] rev 34231
tests: add xrange alias for test-pathencode.py
Augie Fackler <raf@durin42.com> [Sat, 16 Sep 2017 11:33:16 -0400] rev 34230
python3: another 3 tests whitelisted
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 21:22:34 -0400] rev 34229
repair: reliably obtain bytestr of node ids
Augie Fackler <raf@durin42.com> [Fri, 15 Sep 2017 18:38:36 -0400] rev 34228
bundles: turn nbchanges int into a bytestr using pycompat.bytestr
Fixes some python 3 failures.
Augie Fackler <raf@durin42.com> [Sat, 16 Sep 2017 11:09:08 -0400] rev 34227
exchange: hit opargs with pycompat.strkwargs before **-ing it
Fixes Python 3 problems.
Yuya Nishihara <yuya@tcha.org> [Fri, 15 Sep 2017 23:58:45 +0900] rev 34226
revlog: update signature of dummy addgroup() in bundlerepo and unionrepo
Per c8b6ed51386b, 2f5c45fe3a3b and 00e3f909907f.
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Sep 2017 22:55:48 +0900] rev 34225
py3: use 'surrogatepass' error handler to process U+DCxx transparently
It's disallowed by default on Python 3.
https://docs.python.org/3/library/codecs.html#error-handlers
Yuya Nishihara <yuya@tcha.org> [Sat, 16 Sep 2017 22:42:19 +0900] rev 34224
py3: don't pass bytes to array.array()
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Sep 2017 15:54:29 +0900] rev 34223
py3: wrap bytes in encoding.from/toutf8b() with bytestr
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Sep 2017 17:28:47 +0900] rev 34222
py3: iterate bytes as a byte string in store.lowerencode()
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Sep 2017 17:27:50 +0900] rev 34221
py3: use bytechr() in store._buildlowerencodefun()
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Sep 2017 17:26:10 +0900] rev 34220
store: give name to lowerencode function
lambda function isn't easy to track in traceback.
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Sep 2017 15:32:45 +0900] rev 34219
py3: iterate bytes as a byte string in dagparser.py
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Sep 2017 15:28:39 +0900] rev 34218
py3: wrap string constants in dagparser.py with bytestr()
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Sep 2017 15:25:50 +0900] rev 34217
py3: drop use of str() in dagparser.py
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Sep 2017 15:22:54 +0900] rev 34216
dagparser: fix variable name in error message
There's no variable named 'type'.
Yuya Nishihara <yuya@tcha.org> [Sun, 03 Sep 2017 17:47:21 +0900] rev 34215
py3: convert function name to bytes in ui.configwith()
Augie Fackler <raf@durin42.com> [Wed, 23 Aug 2017 01:23:16 -0400] rev 34214
drawdag: port to python 3
Augie Fackler <raf@durin42.com> [Wed, 23 Aug 2017 10:51:26 -0400] rev 34213
drawdag: add a couple of doctests to help with python3 porting
Augie Fackler <raf@durin42.com> [Wed, 23 Aug 2017 01:24:01 -0400] rev 34212
drawdag: tagsmod.tag() takes a list of names, not a single name
We were getting lucky on Python 2 since we have only one-byte names,
but on Python 3 badness was happening.
Augie Fackler <raf@durin42.com> [Wed, 23 Aug 2017 01:22:59 -0400] rev 34211
bruterebase: port to python 3
Augie Fackler <raf@durin42.com> [Tue, 22 Aug 2017 21:21:13 -0400] rev 34210
exchange: use '%d' % x instead of str(x) to encode ints
Recommended by Yuya instead of using pycompat.bytestr() in this case.
Augie Fackler <raf@durin42.com> [Fri, 15 Sep 2017 19:44:32 -0400] rev 34209
posix: always pass a native str to unicodedata.normalize's first arg