Yuya Nishihara <yuya@tcha.org> [Sun, 14 Jan 2018 13:28:20 +0900] rev 35739
fileset: move import of match module to top
Actually there was no circular import issue.
Paul Morelle <paul.morelle@octobus.net> [Sun, 14 Jan 2018 21:28:12 +0100] rev 35738
revlog: group delta computation methods under _deltacomputer object
Extracting these methods from revlog will allow changing the implementation of
the deltacomputer, by providing this interface:
__init__(self, revlog) - constructor that initialize the object from a given
revlog
buildtext(self, revinfo, fh) - builds the fulltext version of a revision from
a _revisioninfo object and the file handle to
the .d (or .i for inline mode) file.
finddeltainfo(self, revinfo, fh) - find a revision in the revlog against
which it is acceptable to build a delta,
and build the corresponding _deltainfo.
It should now be easier to write an experimental feature that would replace
_deltacomputer by another object, for example one that would know how to
parallelize the delta computation in order to quicken the storage of multiple
revisions.
Paul Morelle <paul.morelle@octobus.net> [Sun, 14 Jan 2018 14:36:22 +0100] rev 35737
revlog: refactor out _finddeltainfo from _addrevision
Splicing the code into smaller chunks should help understanding it,
and eventually override some parts in experimental branches to try
optimization.
Yuya Nishihara <yuya@tcha.org> [Fri, 19 Jan 2018 21:39:11 +0900] rev 35736
localrepo: micro-optimize __len__() to bypass repoview
Since len(changelog) isn't overridden, we don't have to validate a cache of
unfiltered changelog.
$ python -m timeit -n 10000 \
-s 'from mercurial import hg, ui; repo = hg.repository(ui.ui());' \
'len(repo)'
orig) 10000 loops, best of 3: 32.1 usec per loop
new) 10000 loops, best of 3: 1.79 usec per loop
Spotted by Jordi GutiƩrrez Hermoso.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 18 Jan 2018 21:18:10 -0500] rev 35735
lfs: defer registering the pre-push hook until blobs are committed
The hook searches outgoing commits for blobs, and uploads them before letting
the push occur. No reason to search for that which isn't there.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 18 Jan 2018 18:04:56 -0500] rev 35734
lfs: dump the full response on httperror in debug mode
This was immensely helpful in diagnosing the 500: Internal Server Error when
using workers to upload. It's a nasty wall of html, so we really can't do
anything else with it.
Matt Harbison <matt_harbison@yahoo.com> [Thu, 18 Jan 2018 15:59:21 -0500] rev 35733
lfs: default the User-Agent header for blob transfers to 'git-lfs'
The custom User-Agent for blob transfers was added in
e7bb5fc4570c. Now I've
hit another incompatibility with a server wanting the string to start with
'git' or 'git-lfs' [1]. I don't feel strongly about this either way, but a
Wireshark trace of git shows that when the Batch API is hit, the User-Agent is
'git-lfs/2.3.4'. So this would probably ensure maximum interoperability.
This still leaves the experimental knob in, just in case.
[1] https://bitbucket.org/sdorra/scm-manager/src/
095a027178888bc2b819aebfae3d2c192c858030/scm-plugins/scm-git-plugin/src/main/java/sonia/scm/web/GitUserAgentProvider.java?at=default&fileviewer=file-view-default#GitUserAgentProvider.java-117
Matt Harbison <matt_harbison@yahoo.com> [Thu, 18 Jan 2018 15:11:34 -0500] rev 35732
lfs: default to not using workers for upload/download
I ran into truncated uploads with this defaulting to on. Wojciech Lis diagnosed
it as creating keepalive connections prior to forking, and illegally
multiplexing the same connection. [1] I didn't notice a problem with the couple
of downloads I tried, but disabled both for simplicity and safety.
[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2018-January/109916.html
Matt Harbison <matt_harbison@yahoo.com> [Sun, 14 Jan 2018 17:00:24 -0500] rev 35731
lfs: add the '{lfsattrs}' template keyword to '{lfs_files}'
This provides access to the metadata dictionary contained within the tracked
pointer file. The OID is probably the most important attribute, and has its own
keyword. But we might as well have this for completeness.
I liked {pointer} better, but couldn't make it work with the singular/plural
forms.
Boris Feld <boris.feld@octobus.net> [Thu, 18 Jan 2018 16:47:14 +0100] rev 35730
debugdownload: read repository hgrc if there is one
The command does not require a repository, but will use it if there is one.
This simplifies the reading of the remote destination when testing for
largefile based url.
Matt Harbison <matt_harbison@yahoo.com> [Fri, 19 Jan 2018 00:18:45 -0500] rev 35729
test-blackbox: stabilize for Windows
This goes with
853bf7d90804.
Paul Morelle <paul.morelle@octobus.net> [Fri, 19 Jan 2018 08:35:22 +0100] rev 35728
debugdeltachain: cleanup the double call to _slicechunk
Follow-up to Yuya's review on
43154a76f3927c4f0c8c6b02be80f0069c7d8fdb:
> Nit: hasattr() isn't necessary. revlog._slicechunk() is used in the previous
> block.
hasattr() isn't necessary indeed, as we are protected by the withsparseread
option, which was introduced at the same time as revlog._slicechunk, in
e2ad93bcc084b97c48f54c179365376edb702858.
And, as Yuya noticed, _slicechunk could be called only once.
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 19 Jan 2018 14:10:18 +0530] rev 35727
blackbox: don't unpack the list while passing into str.join()
The current state may result in error TypeError.
Caught using evolve-tests.
Boris Feld <boris.feld@octobus.net> [Wed, 17 Jan 2018 17:07:55 +0100] rev 35726
atomicupdate: add an experimental option to use atomictemp when updating
In some cases Mercurial truncating files when updating causes problems. It can
happens when processes are currently reading the file or with big file or on
NFS mounts.
We add an experimental option to use the atomictemp option of vfs.__call__ in
order to avoid the problem.
The localrepository.wwrite seems to assume the files are created without the
`x` flag; with atomictempfile, the new file might inherit the `x` flag from
the destination. We force remove it afterward. This code could be refactored
and the flag processing could be moved inside vfs.
This patch should be tested with
`--extra-config-opt experimental.update.atomic-file=True`
as we disabled the option by default.
Differential Revision: https://phab.mercurial-scm.org/D1882
Boris Feld <boris.feld@octobus.net> [Wed, 17 Jan 2018 16:52:13 +0100] rev 35725
write: add the possibility to pass keyword argument from batchget to vfs
We are going to pass atomictemp keyword argument from merge.baychget to
vfs.__call__. Update all the frames to accept **kwargs and pass it to the next
function.
Differential Revision: https://phab.mercurial-scm.org/D1881
Joerg Sonnenberger <joerg@bec.de> [Thu, 18 Jan 2018 12:55:19 +0100] rev 35724
blackbox: if --debug is used, also trace ui.debug() calls
Differential Revision: https://phab.mercurial-scm.org/D1880
Alex Gaynor <agaynor@mozilla.com> [Thu, 18 Jan 2018 14:43:04 +0000] rev 35723
bdiff: handle the possibility of overflow when computing allocation size
Differential Revision: https://phab.mercurial-scm.org/D1904
Tom Prince <mozilla@hocat.ca> [Tue, 02 Jan 2018 10:09:08 -0700] rev 35722
phabricator: add a template item for linking to a differential review
Differential Revision: https://phab.mercurial-scm.org/D1802
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 14 Jan 2018 11:19:45 -0800] rev 35721
githelp: don't reference 3rd party commands for `git show`
`hg show` is a Facebook-ism. Reference functionality in core.
The logic here isn't terrific. But it is better than nothing.
Differential Revision: https://phab.mercurial-scm.org/D1729
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 18 Dec 2017 21:09:08 -0800] rev 35720
githelp: improve help for "reset"
The previous help referenced a `hg reset`, which is a Facebook-ism.
We convert that to `hg update`. We also recognize --soft.
Differential Revision: https://phab.mercurial-scm.org/D1728
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 18 Dec 2017 21:02:49 -0800] rev 35719
githelp: clean up reflog help
This referenced commands that don't exist in core. The new help
isn't great since it references an experimental extension. But
it is better than nothing.
While we're here, also add test coverage.
Differential Revision: https://phab.mercurial-scm.org/D1727
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 18 Dec 2017 20:58:00 -0800] rev 35718
githelp: replace suggestion of `hg record`
`hg record` is deprecated in favor of `hg commit --interactive`.
Differential Revision: https://phab.mercurial-scm.org/D1726
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 18 Dec 2017 20:56:01 -0800] rev 35717
githelp: remove reference to tweakdefaults
This is a Facebook-ism.
Differential Revision: https://phab.mercurial-scm.org/D1725
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 22 Dec 2017 18:38:29 -0700] rev 35716
githelp: recommend `hg import` for `git am`
This referenced a third party extension. It doesn't feel appropriate
to do that from a core extension. Reference `hg import` instead.
Differential Revision: https://phab.mercurial-scm.org/D1724