Tue, 13 Nov 2018 12:32:05 -0800 revlog: automatically read from opened file handles
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Nov 2018 12:32:05 -0800] rev 40671
revlog: automatically read from opened file handles The revlog reading code commonly opens a new file handle for reading on demand. There is support for passing a file handle to revlog.revision(). But it is marked as an internal argument. When revlogs are written, we write() data as it is available. But we don't flush() data until all revisions are written. Putting these two traits together, it is possible for an in-process revlog reader during active writes to trigger the opening of a new file handle on a file with unflushed writes. The reader won't have access to all "available" revlog data (as it hasn't been flushed). And with the introduction of the previous patch, this can lead to the revlog raising an error due to a partial read. I witnessed this behavior when applying changegroup data (via `hg pull`) before issue6006 was fixed via different means. Having this and the previous patch in play would have helped cause errors earlier rather than manifesting as hash verification failures. While this has been a long-standing issue, I believe the relatively new delta computation code has tickled it into being more common. This is because the new delta computation code will compute deltas in more scenarios. This can lead to revlog reading. While the delta computation code is probably supposed to reuse file handles, it appears it isn't doing so in all circumstances. But the issue runs deeper than that. Theoretically, any code can access revision data during revlog writes. It appears we were just getting lucky that it wasn't. (The "add revision callback" passed to addgroup() provides an avenue to do this.) If I changed the revlog's behavior to not cache the full revision text or to clear caches after revision insertion during addgroup(), I was able to produce crashes 100% of the time when writing changelog revisions. This is because changelog's add revision callback attempts to resolve the revision data to access the changed files list. And without the revision's fulltext being cached, we performed a revlog read, which required opening a new file handle. This attempted to read unflushed data, leading to a partial read and a crash. This commit teaches the revlog to store the file handles used for writing multiple revisions during addgroup(). It also teaches the code for resolving a file handle when reading to use these handles, if available. This ensures that *any* reads (regardless of their source) use the active writing file handles, if available. These file handles have access to the unflushed data because they wrote it. This allows reads to complete without issue. Differential Revision: https://phab.mercurial-scm.org/D5267
Tue, 13 Nov 2018 12:30:59 -0800 revlog: detect incomplete revlog reads
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 13 Nov 2018 12:30:59 -0800] rev 40670
revlog: detect incomplete revlog reads _readsegment() is supposed to return N bytes of revlog revision data starting at a file offset. Surprisingly, its behavior before this patch never verified that it actually read and returned N bytes! Instead, it would perform the read(), then return whatever data was available. And even more surprisingly, nothing in the call chain appears to have been validating that it received all the data it was expecting. This behavior could lead to partial or incomplete revision chunks being operated on. This could result in e.g. cached deltas being applied against incomplete base revisions. The delta application process would happily perform this operation. Only hash verification would detect the corruption and save us. This commit changes the behavior of raw revlog reading to validate that we actually read() the number of bytes that were requested. We will raise a more specific error faster, rather than possibly have it go undetected or manifest later in the call stack, at delta application or hash verification. Differential Revision: https://phab.mercurial-scm.org/D5266
Tue, 30 Oct 2018 16:50:05 -0700 revlog: use single file handle when de-inlining revlog
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 30 Oct 2018 16:50:05 -0700] rev 40669
revlog: use single file handle when de-inlining revlog _getsegmentforrevs() will eventually call into _datareadfp() to resolve a file handle to read revision data. If no file handle is passed into _getsegmentforrevs(), it opens a new one. Explicit is better than implicit. This commit changes _enforceinlinesize() to open a file handle explicitly when converting inline revlogs to split revlogs and to pass this file handle into _getsegmentforrevs(). I haven't measured, but this change should improve performance, as we no longer reopen the revlog for reading for every revision in the revlog when it is converted from inline to split. Instead, we open it at most once and use it for the duration of the operation. That being said, I /think/ the chunk cache may mitigate the number of file opens required. Differential Revision: https://phab.mercurial-scm.org/D5265
Tue, 13 Nov 2018 18:44:09 +0300 store: raise ProgrammingError if unable to decode a storage path
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 13 Nov 2018 18:44:09 +0300] rev 40668
store: raise ProgrammingError if unable to decode a storage path Right now, the function magically return False which is dangerous, so let's raise ProgrammingError. Suggested by Augie in D5139. Differential Revision: https://phab.mercurial-scm.org/D5264
Tue, 13 Nov 2018 23:54:23 -0500 tests: document a known failing interaction between narrow and lfs
Matt Harbison <matt_harbison@yahoo.com> [Tue, 13 Nov 2018 23:54:23 -0500] rev 40667
tests: document a known failing interaction between narrow and lfs This is one of the two remaining aborts I found looking into issue5794. I've got no idea what's wrong with the hook, since the changes there fixed the other two problems noted in that bug report. It seems like it might go away when the narrow issue is fixed, but let's make sure this doesn't get lost. The stacktrace for the hook seems to indicate that the missing file *is* in ctx: remote: Traceback (most recent call last): remote: File "c:\Users\Matt\projects\hg\hgext\lfs\__init__.py", line 253, in checkrequireslfs remote: if any(f in ctx and match(f) and ctx[f].islfs() for f in ctx.files()): remote: File "c:\Users\Matt\projects\hg\hgext\lfs\__init__.py", line 253, in <genexpr> remote: if any(f in ctx and match(f) and ctx[f].islfs() for f in ctx.files()): remote: File "c:\Users\Matt\projects\hg\hgext\lfs\wrapper.py", line 191, in filectxislfs remote: return _islfs(self.filelog(), self.filenode()) remote: File "c:\Users\Matt\projects\hg\mercurial\context.py", line 631, in filenode remote: return self._filenode remote: File "c:\Users\Matt\projects\hg\mercurial\util.py", line 1528, in __get__ remote: result = self.func(obj) remote: File "c:\Users\Matt\projects\hg\mercurial\context.py", line 579, in _filenode remote: return self._filelog.lookup(self._fileid) remote: File "c:\Users\Matt\projects\hg\mercurial\filelog.py", line 68, in lookup remote: self._revlog.indexfile) remote: File "c:\Users\Matt\projects\hg\mercurial\utils\storageutil.py", line 218, in fileidlookup remote: raise error.LookupError(fileid, identifier, _('no match found')) remote: LookupError: data/inside2/f.i@f59b4e021835: no match found
Sun, 11 Nov 2018 12:55:58 +0900 logtoprocess: drop support for ui.log() call with invalid msg arguments (BC)
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 12:55:58 +0900] rev 40666
logtoprocess: drop support for ui.log() call with invalid msg arguments (BC) Before, the logtoprocess extension put a formatted message into $MSG1, and its arguments to $MSG2... If the specified arguments couldn't be formatted because of a caller bug, an unformatted message was passed in to $MSG1 instead of exploding. This behavior doesn't make sense. Since I'm planning to formalize the ui.log() interface such that we'll no longer have to extend the ui class, I want to remove any features not conforming to the ui.log() API. So this patch removes the support for ill-formed arguments, and $MSG{n} (where n > 1) parameters which seems useless as long as the message can be formatted. The $MSG1 variable isn't renamed for the maximum compatibility. In future patches, a formatted msg will be passed to a processlogger object, instead of overriding the ui.log() function. .. bc:: The logtoprocess extension no longer supports invalid ``ui.log()`` arguments. A log message is always formatted and passed in to the ``$MSG1`` environment variable.
Sun, 11 Nov 2018 12:35:38 +0900 py3: byte-stringify inline extension in test-logtoprocess.t
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 12:35:38 +0900] rev 40665
py3: byte-stringify inline extension in test-logtoprocess.t
Sun, 11 Nov 2018 12:33:14 +0900 logtoprocess: rewrite dict building in py3-compatible way
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 12:33:14 +0900] rev 40664
logtoprocess: rewrite dict building in py3-compatible way
Sun, 11 Nov 2018 12:27:23 +0900 logtoprocess: leverage procutil.shellenviron() to stringify variables (BC)
Yuya Nishihara <yuya@tcha.org> [Sun, 11 Nov 2018 12:27:23 +0900] rev 40663
logtoprocess: leverage procutil.shellenviron() to stringify variables (BC) This should make the extension more Py3 friendly. The environment variables of the main process are copied to the dict by shellenviron(). .. bc:: Boolean options passed to the logtoprocess extension are now formatted as ``0`` or ``1`` instead of ``None``, ``False``, or ``True``.
Tue, 13 Nov 2018 22:15:30 +0900 templater: check invalid use of list expression properly (issue5920)
Yuya Nishihara <yuya@tcha.org> [Tue, 13 Nov 2018 22:15:30 +0900] rev 40662
templater: check invalid use of list expression properly (issue5920) The error message is still cryptic, but it should be better.
Tue, 13 Nov 2018 18:08:55 +0300 py3: add b suffix to make sure file is opened in bytes mode
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 13 Nov 2018 18:08:55 +0300] rev 40661
py3: add b suffix to make sure file is opened in bytes mode Differential Revision: https://phab.mercurial-scm.org/D5263
Tue, 13 Nov 2018 18:08:17 +0300 py3: don't use dict.iterkeys()
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 13 Nov 2018 18:08:17 +0300] rev 40660
py3: don't use dict.iterkeys() dict.iterkeys() is not present on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5262
Tue, 13 Nov 2018 18:07:21 +0300 py3: use node.hex(h.digest()) instead of h.hexdigest()
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 13 Nov 2018 18:07:21 +0300] rev 40659
py3: use node.hex(h.digest()) instead of h.hexdigest() hashlib.sha1.hexdigest() returns str on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5261
Tue, 13 Nov 2018 17:41:54 +0300 py3: make second argument of fdopen() a str
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 13 Nov 2018 17:41:54 +0300] rev 40658
py3: make second argument of fdopen() a str # skip-blame as just r'' prefixes Differential Revision: https://phab.mercurial-scm.org/D5260
Tue, 13 Nov 2018 17:41:26 +0300 py3: fix keyword arguments handling in hgext/remotefilelog/
Pulkit Goyal <pulkit@yandex-team.ru> [Tue, 13 Nov 2018 17:41:26 +0300] rev 40657
py3: fix keyword arguments handling in hgext/remotefilelog/ Keys of kwargs on Python 3 should be strings. This patch fixes them by appending r'' prefixes, and using pycompat.byteskwargs() and pycompat.strkwargs(). Differential Revision: https://phab.mercurial-scm.org/D5259
Sat, 13 Oct 2018 05:09:18 +0300 py3: add __pycache__ to .hgignore
Pulkit Goyal <pulkit@yandex-team.ru> [Sat, 13 Oct 2018 05:09:18 +0300] rev 40656
py3: add __pycache__ to .hgignore Something changed with Python 3 just like million on things. Maybe they should named Python 3 as anaconda or cobra instead of just increasing the version number. This makes test-custom-filters.t pass on Python 3. Differential Revision: https://phab.mercurial-scm.org/D5039
Thu, 08 Nov 2018 16:07:16 +0100 sparse-revlog: stop using a heap to track selected gap
Boris Feld <boris.feld@octobus.net> [Thu, 08 Nov 2018 16:07:16 +0100] rev 40655
sparse-revlog: stop using a heap to track selected gap Same logic as for 'gapsheap', we don't actually need a heap.
Thu, 08 Nov 2018 16:01:30 +0100 sparse-revlog: stop using a heap to track gaps
Boris Feld <boris.feld@octobus.net> [Thu, 08 Nov 2018 16:01:30 +0100] rev 40654
sparse-revlog: stop using a heap to track gaps The heap doesn't bring any performance advantage as we can simply sort the final list. Moreover, the lesser complexity helps a lot when we later implement it in C.
Thu, 08 Nov 2018 15:29:58 +0100 sparse-revlog: fast-path before computing payload size
Boris Feld <boris.feld@octobus.net> [Thu, 08 Nov 2018 15:29:58 +0100] rev 40653
sparse-revlog: fast-path before computing payload size In this fast-path case, we do not need to compute the full delta chain payload. Since it comes with a significant cost, we avoid doing so if possible.
Tue, 16 Oct 2018 14:46:28 +0200 sparse-revlog: drop unused deltainfo parameter from segmentspan
Boris Feld <boris.feld@octobus.net> [Tue, 16 Oct 2018 14:46:28 +0200] rev 40652
sparse-revlog: drop unused deltainfo parameter from segmentspan We no longer need to deal with slicing logic including uncommitted revision. We drop the associated code.
Tue, 16 Oct 2018 14:43:51 +0200 sparse-revlog: drop unused deltainfo parameter from _slicechunktodensity
Boris Feld <boris.feld@octobus.net> [Tue, 16 Oct 2018 14:43:51 +0200] rev 40651
sparse-revlog: drop unused deltainfo parameter from _slicechunktodensity We no longer need to deal with slicing logic including uncommitted revision. We drop the associated code.
Mon, 15 Oct 2018 15:45:08 +0200 sparse-revlog: skip the span check in the sparse-revlog case
Boris Feld <boris.feld@octobus.net> [Mon, 15 Oct 2018 15:45:08 +0200] rev 40650
sparse-revlog: skip the span check in the sparse-revlog case This significantly improves the performance on unbundling on smaller repositories. Mercurial: unbundling 1K revisions no-sparse-revlog: 500 ms sparse-revlog-before: 689 ms sparse-revlog-after: 484 ms Pypy: unbundling 1K revisions no-sparse-revlog: 1.242 s sparse-revlog-before: 1.135 s sparse-revlog-after: 0.860 s NetBeans: unbundling 1K revisions no-sparse-revlog: 1.386 s sparse-revlog-before: 2.368 s sparse-revlog-after: 1.191 s Mozilla: unbundling 1K revisions no-sparse-revlog: 3.103 s sparse-revlog-before: 3.367 s sparse-revlog-after: 3.093 s
Wed, 17 Oct 2018 17:15:42 -0400 histedit: import chistedit curses UI from hg-experimental
Augie Fackler <augie@google.com> [Wed, 17 Oct 2018 17:15:42 -0400] rev 40649
histedit: import chistedit curses UI from hg-experimental I don't tend to like curses interfaces, but this gets enough use at work that it seems like it's worth bringing into core. This is a minimal import from hg-experimental revision 4c7f33bf5f00, in that I've done the smallest amount of code movement and editing in order to import the functionality. .. feature:: `hg histedit` will now present a curses UI if curses is available and `ui.interface` or `ui.interface.histedit` is set to `curses`. Differential Revision: https://phab.mercurial-scm.org/D5146
Mon, 12 Nov 2018 20:32:58 -0500 manifest: perform cheap checks before potentially allocating memory
Augie Fackler <augie@google.com> [Mon, 12 Nov 2018 20:32:58 -0500] rev 40648
manifest: perform cheap checks before potentially allocating memory Differential Revision: https://phab.mercurial-scm.org/D5258
Mon, 12 Nov 2018 20:31:57 -0500 manifest: also reject obviously-too-short lines when parsing lines
Augie Fackler <augie@google.com> [Mon, 12 Nov 2018 20:31:57 -0500] rev 40647
manifest: also reject obviously-too-short lines when parsing lines Differential Revision: https://phab.mercurial-scm.org/D5257
Mon, 12 Nov 2018 20:35:22 -0500 manifest: make sure there's a filename before bothering to look for newline
Augie Fackler <augie@google.com> [Mon, 12 Nov 2018 20:35:22 -0500] rev 40646
manifest: make sure there's a filename before bothering to look for newline There's no valid manifest that would have no characters before the NUL byte on a line, and this fixes some erratic timeouts in the fuzzer. Differential Revision: https://phab.mercurial-scm.org/D5256
Tue, 06 Nov 2018 11:12:56 -0500 revlog: replace PyInt_AS_LONG with a more portable helper function
Augie Fackler <augie@google.com> [Tue, 06 Nov 2018 11:12:56 -0500] rev 40645
revlog: replace PyInt_AS_LONG with a more portable helper function PyInt_AS_LONG disappears on Python, and our previous #define was producing some problems on Python 3. Let's give up and make an inline helper function that makes this more sane. Differential Revision: https://phab.mercurial-scm.org/D5235
Mon, 12 Nov 2018 22:51:36 +0900 help: document weird behavior of uisetup()
Yuya Nishihara <yuya@tcha.org> [Mon, 12 Nov 2018 22:51:36 +0900] rev 40644
help: document weird behavior of uisetup() While refactoring ui.log() API, it was really annoying that uisetup() is actually an extsetup() the phase 1. Let's document that. I'm planning to add another uisetup() which is called per ui instance, though I can't think of a good name for it.
Mon, 12 Nov 2018 22:26:24 +0900 help: merge section about uisetup() and extsetup()
Yuya Nishihara <yuya@tcha.org> [Mon, 12 Nov 2018 22:26:24 +0900] rev 40643
help: merge section about uisetup() and extsetup() They are technically the same callback, called only once per process. The section name "ui setup" is confusing, so shouldn't be used.
Mon, 12 Nov 2018 21:28:54 +0900 help: add internals.extensions topic
Yuya Nishihara <yuya@tcha.org> [Mon, 12 Nov 2018 21:28:54 +0900] rev 40642
help: add internals.extensions topic I think it's better to include the API overview in core as we now have the internals section in our help system. Retrieved from the wiki, and formatted as reST. Several wiki links are removed since they are invalid in the help. The sections about example extension are removed at all as they seemed too verbose. https://www.mercurial-scm.org/wiki/WritingExtensions
Sun, 04 Nov 2018 12:51:14 +0900 commandserver: send raw progress information to message channel
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Nov 2018 12:51:14 +0900] rev 40641
commandserver: send raw progress information to message channel This is pretty basic implementation to support GUI progress bar.
Sun, 04 Nov 2018 12:38:49 +0900 commandserver: make getpass() request distinct from normal prompt
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Nov 2018 12:38:49 +0900] rev 40640
commandserver: make getpass() request distinct from normal prompt Otherwise, GUI clients would have to parse the prompt text.
Sun, 04 Nov 2018 12:17:20 +0900 commandserver: attach prompt default and choices to message
Yuya Nishihara <yuya@tcha.org> [Sun, 04 Nov 2018 12:17:20 +0900] rev 40639
commandserver: attach prompt default and choices to message These attributes are important to provide a GUI prompt to user.
Thu, 08 Nov 2018 22:25:04 +0900 test-commandserver: clean up quoting and location of dbgui extension
Yuya Nishihara <yuya@tcha.org> [Thu, 08 Nov 2018 22:25:04 +0900] rev 40638
test-commandserver: clean up quoting and location of dbgui extension This helps embedding '$' in the script.
Sun, 18 Jan 2015 17:55:28 +0900 ui: extract helpers to write message with type or label
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Jan 2015 17:55:28 +0900] rev 40637
ui: extract helpers to write message with type or label This provides a 'type' attribute to command-server clients, which seems more solid than relying on 'ui.<type>' labels. In future patches, type='progress' will be added to send raw progress information.
Sun, 18 Jan 2015 18:49:59 +0900 commandserver: add experimental option to use separate message channel
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Jan 2015 18:49:59 +0900] rev 40636
commandserver: add experimental option to use separate message channel This is loosely based on the idea of the TortoiseHg's pipeui extension, which attaches ui.label to message text so the command-server client can capture prompt text, for example. https://bitbucket.org/tortoisehg/thg/src/4.7.2/tortoisehg/util/pipeui.py I was thinking that this functionality could be generalized to templating, but changed mind as doing template stuff would be unnecessarily complex. It's merely a status message, a simple serialization option should suffice. Since this slightly changes the command-server protocol, it's gated by a config knob. If the config is enabled, and if it's supported by the server, "message-encoding: <name>" is advertised so the client can stop parsing 'o'/'e' channel data and read encoded messages from the 'm' channel. As we might add new message encodings in future releases, client can specify a list of encoding names in preferred order. This patch includes 'cbor' encoding as example. Perhaps, 'json' should be supported as well.
Wed, 07 Nov 2018 22:37:51 +0900 commandserver: fix reference before assignment error in pipeservice cleanup
Yuya Nishihara <yuya@tcha.org> [Wed, 07 Nov 2018 22:37:51 +0900] rev 40635
commandserver: fix reference before assignment error in pipeservice cleanup Spotted by the next patch.
Sun, 18 Jan 2015 18:43:23 +0900 dispatch: pass around ui.fmsg channel
Yuya Nishihara <yuya@tcha.org> [Sun, 18 Jan 2015 18:43:23 +0900] rev 40634
dispatch: pass around ui.fmsg channel This will be set by the command server. See the next patch.
Sat, 10 Nov 2018 12:01:21 +0900 test-subrepo: document why share magically works even if subrepos are missing
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 12:01:21 +0900] rev 40633
test-subrepo: document why share magically works even if subrepos are missing I was confused how it's working while reviewing fb490d798be0, "share: reload repo after adjusting it in postshare()."
Sun, 11 Nov 2018 14:13:08 -0500 packaging: add Fedora 29 target
Augie Fackler <raf@durin42.com> [Sun, 11 Nov 2018 14:13:08 -0500] rev 40632
packaging: add Fedora 29 target Differential Revision: https://phab.mercurial-scm.org/D5254
Sat, 10 Nov 2018 11:52:32 +0900 store: pass in decoded filename to narrow matcher
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 11:52:32 +0900] rev 40631
store: pass in decoded filename to narrow matcher
Sat, 10 Nov 2018 11:47:36 +0900 test-narrow-clone-stream: include no usefncache case which is broken
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 11:47:36 +0900] rev 40630
test-narrow-clone-stream: include no usefncache case which is broken Since 9aeb9e2d28a7, encoded filenames are filtered by the narrow matcher, which is clearly wrong.
Sat, 10 Nov 2018 11:36:22 +0900 test-narrow-clone-stream: include uppercase letter in filename
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 11:36:22 +0900] rev 40629
test-narrow-clone-stream: include uppercase letter in filename This makes encoded filenames differ from the original names.
Sat, 10 Nov 2018 13:37:18 -0500 phase: use the `phases.cmdphasenames` constant to walk available command flags
Matt Harbison <matt_harbison@yahoo.com> [Sat, 10 Nov 2018 13:37:18 -0500] rev 40628
phase: use the `phases.cmdphasenames` constant to walk available command flags This reverts 1ea6772fb415.
Fri, 09 Nov 2018 23:19:53 -0500 phases: add a list of names usable by the phase command
Matt Harbison <matt_harbison@yahoo.com> [Fri, 09 Nov 2018 23:19:53 -0500] rev 40627
phases: add a list of names usable by the phase command This is useful in TortoiseHg for example, which has until recently just added all names in the `phasenames` list to the context menu that changes the phase. The ones not supported by the command would just error out.
Wed, 07 Nov 2018 19:59:38 +0100 transaction: display data about why the transaction failed to rollback
Boris Feld <boris.feld@octobus.net> [Wed, 07 Nov 2018 19:59:38 +0100] rev 40626
transaction: display data about why the transaction failed to rollback We saw more of these a while back. Having more data available would be nice.
Sat, 10 Nov 2018 12:07:26 +0900 merge with stable
Yuya Nishihara <yuya@tcha.org> [Sat, 10 Nov 2018 12:07:26 +0900] rev 40625
merge with stable
Fri, 09 Nov 2018 10:47:24 -0800 remotefilelog: avoid accessing repo instance after dispatch
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 10:47:24 -0800] rev 40624
remotefilelog: avoid accessing repo instance after dispatch Upstream commit c5e6c1ba1c79 (hg: don't reuse repo instance after unshare(), 2018-09-12) poisoned the repo instance after unshare(). That made `hg unshare` fail with remotefilelog because we tried to close the fileserverclient after dispatch by accessing it via the repo. This patch fixes that by storing the reference to the fileserverclient at the beginning of dispatch. An analogous patch was sent for remotefilelog version in FB's hg-experimental as D5246. Differential Revision: https://phab.mercurial-scm.org/D5253
Fri, 09 Nov 2018 11:28:05 -0800 share: avoid a now-unnecessary reload of the repo
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 11:28:05 -0800] rev 40623
share: avoid a now-unnecessary reload of the repo hg.share() now returns an already-reloaded repo, so let's just use that. (This would have failed test-subrepo-recursion.t without the previous patch.) Differential Revision: https://phab.mercurial-scm.org/D5252
Fri, 09 Nov 2018 10:46:02 -0800 share: reload repo after adjusting it in postshare()
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 10:46:02 -0800] rev 40622
share: reload repo after adjusting it in postshare() When sharing a repo that's using remotefilelog, the update that happens at the end of the `hg share` call does not see the remote repo path that's copied in hg.postshare(). This patch reloads the repo after hg.postshare() to address that. This changes a subrepo test case. Note that `hg share -U; hg co tip` worked there before, so I don't see see why `hg share` should fail. I also don't know what a "locally referenced subrepo". So maybe this is fixing a bug? Hopefully it's not breaking something someone actually cares about at least. Maybe someone who knows and cares about subrepos can review this. Differential Revision: https://phab.mercurial-scm.org/D5251
Fri, 09 Nov 2018 09:36:16 -0800 tests: don't load strip extension via mq extension for remotefilelog tests
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 09:36:16 -0800] rev 40621
tests: don't load strip extension via mq extension for remotefilelog tests The proper way to get the `hg strip` command has been via the "strip" extension since 2013. Differential Revision: https://phab.mercurial-scm.org/D5250
Fri, 09 Nov 2018 09:35:05 -0800 remotefilelog: remove unused configs for {data,history}pack version
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 09:35:05 -0800] rev 40620
remotefilelog: remove unused configs for {data,history}pack version Differential Revision: https://phab.mercurial-scm.org/D5249
Fri, 09 Nov 2018 09:27:37 -0800 tests: remove obsolete PYTHONPATH override from remotefilelog tests
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 09:27:37 -0800] rev 40619
tests: remove obsolete PYTHONPATH override from remotefilelog tests They were added in https://bitbucket.org/facebook/hg-experimental/commits/fdcad37a6a68cfbaf5920f3eeaa0cc9cae42bd26, which says this: When remotefilelog moved from its own repo, the tests needed to be updated to adjust the PYTHONPATH to ensure the in-repo remotefilelog was loaded instead of the system one. This meant any local runs of remotefilelog tests would've been using the system remotefilelog unless the user had manually set the PYTHONPATH themselves. That doesn't seem relevant with remotefilelog in core. Differential Revision: https://phab.mercurial-scm.org/D5248
Fri, 09 Nov 2018 08:19:08 -0800 tests: drop obsolete "hginit" alias in remotefilelog tests
Martin von Zweigbergk <martinvonz@google.com> [Fri, 09 Nov 2018 08:19:08 -0800] rev 40618
tests: drop obsolete "hginit" alias in remotefilelog tests Differential Revision: https://phab.mercurial-scm.org/D5247
Thu, 08 Nov 2018 12:35:26 -0800 fix: add extra field to fixed revisions to avoid creating obsolescence cycles
Danny Hooper <hooper@google.com> [Thu, 08 Nov 2018 12:35:26 -0800] rev 40617
fix: add extra field to fixed revisions to avoid creating obsolescence cycles The extra field prevents sequential invocations of fix from producing the same hash twice. Previously, this could cause problems because it would create an obsolescence cycle instead of the expected new successor. This change also adds an explicit check for whether a new revision should be committed. Until now, the code relied on memctx.commit() to quietly do nothing if the node already exists. Because of the new extra field, this no longer covers the case where we don't want to replace an unchanged node. Differential Revision: https://phab.mercurial-scm.org/D5245
Thu, 08 Nov 2018 12:29:56 -0800 cleanup: use revision numbers instead of hashes in test output
Danny Hooper <hooper@google.com> [Thu, 08 Nov 2018 12:29:56 -0800] rev 40616
cleanup: use revision numbers instead of hashes in test output This allows changes to the hashes produced by fix to not needlessly modify this area of the test. Differential Revision: https://phab.mercurial-scm.org/D5244
Wed, 07 Nov 2018 15:42:56 -0800 tests: make the commands.resolve.confirm tests not pollute the test-wide hgrc
Kyle Lippincott <spectral@google.com> [Wed, 07 Nov 2018 15:42:56 -0800] rev 40615
tests: make the commands.resolve.confirm tests not pollute the test-wide hgrc I want to add tests after these tests that create a new repo and use it, and was confused for a bit as to why they were seeing different behavior than I expected. Differential Revision: https://phab.mercurial-scm.org/D5242
Wed, 07 Nov 2018 15:41:18 -0800 tests: fix a couple typos in test-resolve.t comments and add a comment
Kyle Lippincott <spectral@google.com> [Wed, 07 Nov 2018 15:41:18 -0800] rev 40614
tests: fix a couple typos in test-resolve.t comments and add a comment Differential Revision: https://phab.mercurial-scm.org/D5241
Tue, 06 Nov 2018 15:50:41 -0800 fix: add suboption for configuring execution order of tools
Danny Hooper <hooper@google.com> [Tue, 06 Nov 2018 15:50:41 -0800] rev 40613
fix: add suboption for configuring execution order of tools This could be accomplished by using wrapper scripts, but that would diminish the usefulness of the incremental formatting logic. Configuring execution order along with other things in the hgrc is probably more convenient anyway. This change highlights some awkwardness with suboptions and default values, which should be addressed separately. Differential Revision: https://phab.mercurial-scm.org/D5237
Wed, 07 Nov 2018 14:21:39 -0500 tests: fix up some import statements caught by Python 3
Augie Fackler <augie@google.com> [Wed, 07 Nov 2018 14:21:39 -0500] rev 40612
tests: fix up some import statements caught by Python 3 I'm curious how the import checker manages to be so much more pedantic in Python 3, but not enough to bother exploring. Differential Revision: https://phab.mercurial-scm.org/D5240
(0) -30000 -10000 -3000 -1000 -300 -100 -60 +60 +100 +300 +1000 +3000 +10000 tip