Sun, 14 Jan 2018 14:36:22 +0100 revlog: refactor out _finddeltainfo from _addrevision
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.
Fri, 19 Jan 2018 21:39:11 +0900 localrepo: micro-optimize __len__() to bypass repoview
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.
Thu, 18 Jan 2018 21:18:10 -0500 lfs: defer registering the pre-push hook until blobs are committed
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.
Thu, 18 Jan 2018 18:04:56 -0500 lfs: dump the full response on httperror in debug mode
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.
Thu, 18 Jan 2018 15:59:21 -0500 lfs: default the User-Agent header for blob transfers to 'git-lfs'
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
Thu, 18 Jan 2018 15:11:34 -0500 lfs: default to not using workers for upload/download
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
Sun, 14 Jan 2018 17:00:24 -0500 lfs: add the '{lfsattrs}' template keyword to '{lfs_files}'
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.
Thu, 18 Jan 2018 16:47:14 +0100 debugdownload: read repository hgrc if there is one
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.
Fri, 19 Jan 2018 00:18:45 -0500 test-blackbox: stabilize for Windows
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.
Fri, 19 Jan 2018 08:35:22 +0100 debugdeltachain: cleanup the double call to _slicechunk
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.
Fri, 19 Jan 2018 14:10:18 +0530 blackbox: don't unpack the list while passing into str.join()
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.
Wed, 17 Jan 2018 17:07:55 +0100 atomicupdate: add an experimental option to use atomictemp when updating
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
Wed, 17 Jan 2018 16:52:13 +0100 write: add the possibility to pass keyword argument from batchget to vfs
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
Thu, 18 Jan 2018 12:55:19 +0100 blackbox: if --debug is used, also trace ui.debug() calls
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
Thu, 18 Jan 2018 14:43:04 +0000 bdiff: handle the possibility of overflow when computing allocation size
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
Tue, 02 Jan 2018 10:09:08 -0700 phabricator: add a template item for linking to a differential review
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
Sun, 14 Jan 2018 11:19:45 -0800 githelp: don't reference 3rd party commands for `git show`
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
Mon, 18 Dec 2017 21:09:08 -0800 githelp: improve help for "reset"
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
Mon, 18 Dec 2017 21:02:49 -0800 githelp: clean up reflog help
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
Mon, 18 Dec 2017 20:58:00 -0800 githelp: replace suggestion of `hg record`
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
Mon, 18 Dec 2017 20:56:01 -0800 githelp: remove reference to tweakdefaults
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
Fri, 22 Dec 2017 18:38:29 -0700 githelp: recommend `hg import` for `git am`
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
Mon, 18 Dec 2017 20:51:20 -0800 githelp: improve help for `git add`
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 18 Dec 2017 20:51:20 -0800] rev 35715
githelp: improve help for `git add` The old code was referencing record and crecord, which are deprecated. `hg commit --interactive` is the preferred mechanism to use. In addition, there was duplicate code in this function. It has been removed. Tests have been added to cover this function. Differential Revision: https://phab.mercurial-scm.org/D1723
Mon, 18 Dec 2017 20:44:59 -0800 githelp: vendor Facebook authored extension
Gregory Szorc <gregory.szorc@gmail.com> [Mon, 18 Dec 2017 20:44:59 -0800] rev 35714
githelp: vendor Facebook authored extension This commit vendors the Facebook-authored "githelp" extension. This extension provides a "githelp" command that can be used to try to convert a `git` command to its Mercurial equivalent. This functionality is useful for Git users learning Mercurial. The extension was copied from the repository at revision 32ceeccb832c433b36e9af8196814b8e5a526775. The following modifications were made: * The "testedwith" value has been changed to match core's conventions. * Support for a custom footer has been removed, as it is Facebook specific. The feature is useful. But the implementation wasn't appropriate for core. * A test referencing "tweakdefaults" has been removed. * Imports changed to match Mercurial's style convention. * Double newlines in test removed. * Pager activation changed to ui.pager(). * Initial line of githelp.py changed to add description of file. The removal of the custom footer code was the only significant source change. The rest were mostly cosmetic. There are still some Facebook-isms in the extension. I'll address these as follow-ups. .. feature:: githelp extension The "githelp" extension provides the ``hg githelp`` command. This command attempts to convert a ``git`` command to its Mercurial equivalent. The extension can be useful to Git users new to Mercurial. Differential Revision: https://phab.mercurial-scm.org/D1722
Thu, 18 Jan 2018 19:40:17 +0530 merge: use public interface ms.localctx instead of ms._local
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 18 Jan 2018 19:40:17 +0530] rev 35713
merge: use public interface ms.localctx instead of ms._local
Tue, 16 Jan 2018 14:28:57 +0100 bookmarks: display the obsfate of hidden revision we create a bookmark on
Boris Feld <boris.feld@octobus.net> [Tue, 16 Jan 2018 14:28:57 +0100] rev 35712
bookmarks: display the obsfate of hidden revision we create a bookmark on Display the same message we added recently to the filtered error message create a bookmark on an hidden revision. Differential Revision: https://phab.mercurial-scm.org/D1870
Tue, 16 Jan 2018 14:08:54 +0100 update: display the obsfate of hidden revision we update to
Boris Feld <boris.feld@octobus.net> [Tue, 16 Jan 2018 14:08:54 +0100] rev 35711
update: display the obsfate of hidden revision we update to Display the same message we added recently to the filtered error message when updating to a hidden obsolete changeset. Differential Revision: https://phab.mercurial-scm.org/D1869
Sun, 14 Jan 2018 00:02:40 -0800 evolution: make reporting of new unstable changesets optional
Martin von Zweigbergk <martinvonz@google.com> [Sun, 14 Jan 2018 00:02:40 -0800] rev 35710
evolution: make reporting of new unstable changesets optional This makes it possible to turn off the reporting of unstable changesets (e.g. "1 new orphan changesets"), just in case it's too slow for some users. Anyone who's been using the evolve extension has already been accepting the cost of the reporting, so this is just for the few users who have turned on obsmarkers but not been using the evolve extension (as I believe Facebook has). Differential Revision: https://phab.mercurial-scm.org/D1868
Sun, 14 Jan 2018 23:59:17 -0800 evolution: report new unstable changesets
Martin von Zweigbergk <martinvonz@google.com> [Sun, 14 Jan 2018 23:59:17 -0800] rev 35709
evolution: report new unstable changesets This adds a transaction summary callback that reports the number of new orphan, content-divergent and phase-divergent changesets. The code for reporting it is based on the code from the evolve extension, but simplified a bit. It simply counts the numbers for each kind of instability before and after the transaction. That's obviously not very efficient, but it's easy to reason about, so I'm doing this as a first step that can make us quite confident about the test case changes. We can optimize it later and make sure that the tests are not affected. The code has been used in the evolve extension for a long time and has apparently been sufficiently fast, so it doesn't seem like a pressing issue. Unlike the evolve extension's version of this report, this version applies to all commands (or all transactions run as part of any command, to be exact). Differential Revision: https://phab.mercurial-scm.org/D1867
Wed, 10 Jan 2018 14:00:23 -0800 transaction: register summary callbacks only at start of transaction (BC)
Martin von Zweigbergk <martinvonz@google.com> [Wed, 10 Jan 2018 14:00:23 -0800] rev 35708
transaction: register summary callbacks only at start of transaction (BC) We currently register summary callbacks every time localrepo.transaction() is called, so both when the transaction is started and when a nested transaction is created. That seems a little weirdly asymmetric, because the summary callbacks are thus not necessarily registred at the beginning of the outermost transaction, but they are only called when the outermost transaction closes (not when a nested transaction closes). I want to add another summary callback that records the repo state at the beginning of the transaction and compares to that when the transaction closes. However, because of the registration that happens when a nested transaction is created, that would need to go through extra trouble to not overwrite the callback and report the difference from the start time of the innermost transaction to the close of the outermost transaction. Also, the callbacks are registered with a name based on the order they are defined in the registersummarycallback(). For example, if both the "new changesets %s" and the "obsoleted %i changesets" hooks are registered, the first would be called 00-txnreport and the second would be called 01-txnreport. That gets really weird if registersummarycallback() gets called multiple times, because the last one wins, and a depending on which of the two callbacks get registered, we might hypothetically even overwrite on type of callback with another. For example, if when the outer transaction was started, we registered the "new changesets %s" callback first, and when the inner transaction was started, we registered only the "obsoleted %i changesets" callback, then only the latter message would get printed. What makes it hypothetical is that what gets registered depends on the transaction name, and the set of transaction names that we match on for the former latter message is a subset of the set of names we match on for the former. Still, that seems like a bug waiting to happen. That second issue could be solved independently, but the first issue seems enough for me to consider it a bug (affecting developers, not users), so this patch simply drops that extra registration. Note that this affects "hg transplant" in a user-visible way. When "hg transplant" is asked to transplant from a remote repo so it involves a pull, then the outermost transaction name is "transplant" and an inner transaction is created for "pull". That inner transaction is what led us to sometimes report "new changesets %s" from "hg transplant". After this patch, that no longer happens. That seems fine to me. We can make it instead print the message for all "hg transplant" invocations if we want (not just those involving a remote), but I'll leave that for someone else to do if they think it's important. Differential Revision: https://phab.mercurial-scm.org/D1866
(0) -30000 -10000 -3000 -1000 -300 -100 -50 -30 +30 +50 +100 +300 +1000 +3000 +10000 tip