Fri, 09 Jun 2017 11:42:45 +0100 profile: make the contextmanager object available to the callers
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jun 2017 11:42:45 +0100] rev 32786
profile: make the contextmanager object available to the callers This will allow calling methods on the object in the code using the context manager.
Fri, 09 Jun 2017 11:41:47 +0100 profile: introduce a knob to control if the context is actually profiling
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jun 2017 11:41:47 +0100] rev 32785
profile: introduce a knob to control if the context is actually profiling This is a step toward allowing context where the profiling in enabled withing the context range. This also open the way to kill the dedicated "maybeprofile" context manager and keep only one of 'profile' and 'maybeprofile'.
Fri, 09 Jun 2017 11:39:53 +0100 profile: introduce a "start" method to the profile context
Pierre-Yves David <pierre-yves.david@octobus.net> [Fri, 09 Jun 2017 11:39:53 +0100] rev 32784
profile: introduce a "start" method to the profile context The start method is doing all profiler setup and activation. It is currently unconditionally called by '__init__' but this will be made more flexible in later changesets.
Thu, 08 Jun 2017 01:38:48 +0100 profile: upgrade the "profile" context manager to a full class
Pierre-Yves David <pierre-yves.david@octobus.net> [Thu, 08 Jun 2017 01:38:48 +0100] rev 32783
profile: upgrade the "profile" context manager to a full class So far we have been able to use a simple decorator for this. However using the current context manager makes the scope of the profiling in dispatch constrainted and the time frame to decide to enable profiling quite limited (using "maybeprofile") This is the first step toward the ability to enable the profiling from within the profiling scope. eg:: with maybeprofiling(ui) as profiler: ... bar.foo(): ... if options['profile']: profiler.start() ... fooz() ... My target usecase is adding support for "--profile" to alias definitions with effect. These are to be used with "profiling.output=blackbox" to gather data about operation that get slow from time to time (eg: pull being minutes instead of seconds from time to time). Of course, in such case, the scope of the profiling would be smaller since profiler would be started after running extensions 'reposetup' (and other potentially costly logic), but these are not relevant for my target usecase (multiple second commits, multiple tens of seconds pull). Currently adding '--profile' to a command through alias requires to re-spin a Mercurial binary (using "!$HG" in alias), which as a significant performance impact, especially in context where startup performance is being worked on... An alternative approach would be to stop using the context manager in dispatch and move back to a try/finally setup.
Fri, 09 Jun 2017 22:15:53 -0400 setup: avoid linker warnings on Windows about multiple export specifications
Matt Harbison <matt_harbison@yahoo.com> [Fri, 09 Jun 2017 22:15:53 -0400] rev 32782
setup: avoid linker warnings on Windows about multiple export specifications The PyMODINIT_FUNC macro contains __declspec(dllexport), and then the build process adds an "/EXPORT func" to the command line. The 64-bit linker flags this [1]. Everything except zstd.c and bser.c are covered by redefining the macro in util.h [2]. These modules aren't built with util.h in the #include path, so the redefining hack would have to be open coded two more times. After seeing that extra_linker_flags didn't work, I couldn't find anything authoritative indicating why, though I did see an offhand comment on SO that CFLAGS is also ignored on Windows. I also don't fully understand the interaction between msvccompiler and msvc9compiler- I first subclassed the latter, but it isn't used when building with VS2008. I know the camelcase naming isn't the standard, but the HackedMingw32CCompiler class above it was introduced 5 years ago (and I think the current style was in place by then), so I assume that there's some reason for it. [1] https://support.microsoft.com/en-us/help/835326/you-receive-an-lnk4197-error-in-the-64-bit-version-of-the-visual-c-compiler [2] https://bugs.python.org/issue9709#msg120859
Sat, 10 Jun 2017 16:00:18 -0700 memctx: always use cache for filectxfn
Sean Farley <sean@farley.io> [Sat, 10 Jun 2017 16:00:18 -0700] rev 32781
memctx: always use cache for filectxfn I don't see a downside to doing this unless I'm missing something. Thanks to foozy for correcting my previous bad logic.
Sat, 10 Jun 2017 00:06:57 -0400 test-hardlinks: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 10 Jun 2017 00:06:57 -0400] rev 32780
test-hardlinks: stabilize for Windows This broke in c2cb0de25120, which breaks hardlinks when the executable bit is toggled.
Sun, 04 Jun 2017 00:16:45 +0200 releasenotes: add more tests for formatting and merging of release notes
Rishabh Madan <rishabhmadan96@gmail.com> [Sun, 04 Jun 2017 00:16:45 +0200] rev 32779
releasenotes: add more tests for formatting and merging of release notes
Fri, 02 Jun 2017 23:33:30 +0200 releasenotes: command to manage release notes files
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 02 Jun 2017 23:33:30 +0200] rev 32778
releasenotes: command to manage release notes files Per discussion on the mailing list, we want better release notes for Mercurial. This patch introduces an extension that provides a command for producing release notes files. Functionality is implemented as an extension because it could be useful outside of the Mercurial project and because there is some code (like rst parsing) that already exists in Mercurial and it doesn't make sense to reinvent the wheel. The general idea with the extension is that changeset authors declare release notes in commit messages using rst directives. Periodically (such as at publishing or release time), a project maintainer runs `hg releasenotes` to extract release notes fragments from commit messages and format them to an auto-generated release notes file. More details are explained inline in docstrings. There are several things that need addressed before this is ready for prime time: * Moar tests * Interactive merge mode * Implement similarity detection for individual notes items * Support customizing section names/titles * Parsing improvements for bullet lists and paragraphs * Document which rst primitives can be parsed * Retain arbitrary content (e.g. header section/paragraphs) from existing release notes file * Better error messages (line numbers, hints, etc)
Mon, 12 Jun 2017 03:23:58 +0900 packagelib: use LANGUAGE=C for "hg version"
Toshi MARUYAMA <marutosijp2@gmail.com> [Mon, 12 Jun 2017 03:23:58 +0900] rev 32777
packagelib: use LANGUAGE=C for "hg version" If "hg version" does not contain "version" (e.g. Japanese), $hgversion was empty and rpmbuild failed.
Mon, 12 Jun 2017 03:23:56 +0900 rpms: add hgdemandimport in files
Toshi MARUYAMA <marutosijp2@gmail.com> [Mon, 12 Jun 2017 03:23:56 +0900] rev 32776
rpms: add hgdemandimport in files
Mon, 12 Jun 2017 03:22:45 +0900 rpms: remove '%if "%{?pythonver}" != "2.4"'
Toshi MARUYAMA <marutosijp2@gmail.com> [Mon, 12 Jun 2017 03:22:45 +0900] rev 32775
rpms: remove '%if "%{?pythonver}" != "2.4"' Mercurial requires python >= 2.7.
Fri, 02 Jun 2017 20:49:42 -0700 obsstore: do not load all markers to detect duplication
Jun Wu <quark@fb.com> [Fri, 02 Jun 2017 20:49:42 -0700] rev 32774
obsstore: do not load all markers to detect duplication This will make duplication detection something like O(newmarkers) instead of O(obsstore).
Sat, 10 Jun 2017 11:33:57 -0700 clonebundles: reference correct config option
Gregory Szorc <gregory.szorc@gmail.com> [Sat, 10 Jun 2017 11:33:57 -0700] rev 32773
clonebundles: reference correct config option This option is no longer experimental.
Sat, 10 Jun 2017 14:09:54 -0700 filestat: move __init__ to frompath constructor
Siddharth Agarwal <sid0@fb.com> [Sat, 10 Jun 2017 14:09:54 -0700] rev 32772
filestat: move __init__ to frompath constructor We're going to add a `fromfp` constructor soon, and this also allows a filestat object for a non-existent file to be created.
Sat, 10 Jun 2017 14:07:31 -0700 test-dirstate-race: ensure that a isn't in the lookup set at the end
Siddharth Agarwal <sid0@fb.com> [Sat, 10 Jun 2017 14:07:31 -0700] rev 32771
test-dirstate-race: ensure that a isn't in the lookup set at the end We're going to rely on this in upcoming patches.
Sat, 10 Jun 2017 14:07:31 -0700 hghave: add test for whether fsmonitor is enabled
Siddharth Agarwal <sid0@fb.com> [Sat, 10 Jun 2017 14:07:31 -0700] rev 32770
hghave: add test for whether fsmonitor is enabled This uses the HGFSMONITOR_TESTS environment variable that fsmonitor-run-tests.py adds.
Sat, 10 Jun 2017 14:07:30 -0700 tests: add a wrapper to run fsmonitor tests
Siddharth Agarwal <sid0@fb.com> [Sat, 10 Jun 2017 14:07:30 -0700] rev 32769
tests: add a wrapper to run fsmonitor tests This script does a bunch of non-trivial configuration work: in particular, it sets up an isolated instance of Watchman which isn't affected by global state and can be torn down on completion. This script also sets the HGFSMONITOR_TESTS environment variable, which hghave will use in the next patch to allow gating on whether fsmonitor is enabled. With fsmonitor enabled, there appear to be a number of failures in the test suite. It's not yet clear to me why they're happening, but if someone would like to jump in and fix some of them I hope this will be helpful for that.
Sat, 10 Jun 2017 18:47:09 +0100 setdiscovery: improves logged message
Pierre-Yves David <pierre-yves.david@octobus.net> [Sat, 10 Jun 2017 18:47:09 +0100] rev 32768
setdiscovery: improves logged message The 'srvheads' list contains all server heads including the common ones. We adjust 'ui.log' message to provide more useful information about server heads locally unknown. The performance impact of turning the list to set is negligible (about 1e-4s) compared to the rest of the discovery cost, so I'm taking the easy path.
Sat, 10 Jun 2017 10:46:06 -0400 tests: handle variation between pure and normal output in annotate --skip
Augie Fackler <raf@durin42.com> [Sat, 10 Jun 2017 10:46:06 -0400] rev 32767
tests: handle variation between pure and normal output in annotate --skip I'm pretty sure that both results are valid, depending on how you slice the edits.
Fri, 09 Jun 2017 20:12:39 -0400 bisect: improve option validation message
Brandon McCaig <bamccaig@gmail.com> [Fri, 09 Jun 2017 20:12:39 -0400] rev 32766
bisect: improve option validation message
Sat, 10 Jun 2017 10:24:33 -0400 context: inline makememctx (API)
Sean Farley <sean@farley.io> [Sat, 10 Jun 2017 10:24:33 -0400] rev 32765
context: inline makememctx (API) I have always thought it weird that we have a helper method instead of just using __init__. So, I ripped it out.
Fri, 09 Jun 2017 13:39:13 -0700 context: add convenience method for returning a memfilectx from a patch
Sean Farley <sean@farley.io> [Fri, 09 Jun 2017 13:39:13 -0700] rev 32764
context: add convenience method for returning a memfilectx from a patch This is mostly a copy of what makememctx does but refactored to make it behave more like our other convenience methods.
Fri, 09 Jun 2017 13:25:02 -0700 memctx: refactor inline getfilectx into convenience method
Sean Farley <sean@farley.io> [Fri, 09 Jun 2017 13:25:02 -0700] rev 32763
memctx: refactor inline getfilectx into convenience method No actual logic is changing, just moving code so __init__ is easier to read.
Fri, 09 Jun 2017 13:55:51 -0700 hgweb: refresh styling of gitweb's search form
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 13:55:51 -0700] rev 32762
hgweb: refresh styling of gitweb's search form gitweb was missing the hint hover box. So that was added. Also, the positioning of the form was absolute and it didn't vertically align on all pages. The element has been moved inline with the navigation links (which now are contained in a div) and flexbox is used to obtain sane alignment of the navigation links and search form. For those new to flexbox, "justify-content: space-between" basically says to maximize space elements. You can use it to easily get left and right justified containers without having to worry about width, floating, etc. "align-items: center" centers all items in a cross-axis. I've literally wasted hours trying to figure out both these problems before flexbox. Flexbox is amazing. Flexbox has been supported by Chrome and Firefox for a few years. But it is only supported by IE 11. I'm willing to wager that people using this either won't be using IE or will be using IE 11. So I'm willing to be a bit aggressive in adopting flexbox because it makes CSS alignment so much easier.
Fri, 09 Jun 2017 13:45:36 -0700 hgweb: consistently add search form to all gitweb pages
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 13:45:36 -0700] rev 32761
hgweb: consistently add search form to all gitweb pages Paper has it on all pages. Not sure why gitweb doesn't. I think it should be everywhere because it is a useful feature. Also, we weren't consistently adding the HTML in the same place. This was OK since the element is absolutely positioned. But this bothered me a bit, so I went ahead and fixed it.
Fri, 09 Jun 2017 13:42:38 -0700 hgweb: consolidate search form for gitweb
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 13:42:38 -0700] rev 32760
hgweb: consolidate search form for gitweb
Fri, 09 Jun 2017 13:41:10 -0700 hgweb: consolidate search form for monoblue
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 13:41:10 -0700] rev 32759
hgweb: consolidate search form for monoblue Same deal as for paper.
Fri, 09 Jun 2017 13:59:13 -0700 hgweb: consolidate search form for paper
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 13:59:13 -0700] rev 32758
hgweb: consolidate search form for paper AFAICT this was mostly a bunch of copy pasta. The only variation is some pages defined a "value" attribute. The "query" variable will just be empty on pages that don't accept it. So let's consolidate the template and remove the redundancy.
Fri, 09 Jun 2017 23:56:50 -0400 test-extension: fix load path for Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 09 Jun 2017 23:56:50 -0400] rev 32757
test-extension: fix load path for Windows The previous code was trying to load the extension from /tmp/hgtests.xxx/..., but the actual path for tests is C:\Users\...\Temp\hgtests.xxx\... I assume that the former is an MSYS path that maps somewhere under C:\MinGW.
Sat, 10 Jun 2017 00:11:54 -0400 test-setdiscovery: stabilize for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sat, 10 Jun 2017 00:11:54 -0400] rev 32756
test-setdiscovery: stabilize for Windows Windows wants double quotes here.
Sat, 10 Jun 2017 02:20:14 -0400 convert: correct the documentation about whitespace in branchmap branches
Matt Harbison <matt_harbison@yahoo.com> [Sat, 10 Jun 2017 02:20:14 -0400] rev 32755
convert: correct the documentation about whitespace in branchmap branches Might as well let the users know they can get rid of branch names with spaces.
Thu, 08 Jun 2017 00:51:46 +0530 py3: use pycompat.bytestr() instead of str()
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 08 Jun 2017 00:51:46 +0530] rev 32754
py3: use pycompat.bytestr() instead of str()
Fri, 02 Jun 2017 16:57:21 +0530 py3: convert bool variables to bytes
Pulkit Goyal <7895pulkit@gmail.com> [Fri, 02 Jun 2017 16:57:21 +0530] rev 32753
py3: convert bool variables to bytes
Fri, 09 Jun 2017 13:07:49 +0900 context: avoid writing outdated dirstate out (issue5584)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 13:07:49 +0900] rev 32752
context: avoid writing outdated dirstate out (issue5584) Before this patch, workingctx.status() may cause writing outdated dirstate out, if: - .hg/dirstate is changed simultaneously after last loading it, - there is any file, which should be dirstate.normal()-ed Typical issue case is: - the working directory is updated by "hg update" - .hg/dirstate is updated in background (e.g. fsmonitor) This patch compares identities of dirstate before and after acquisition of wlock, and avoids writing outdated dirstate out, if change of .hg/dirstate is detected.
Fri, 09 Jun 2017 13:07:49 +0900 tests: factor external procedures out for portability
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 13:07:49 +0900] rev 32751
tests: factor external procedures out for portability Fortunately, "&&" is treated as "execute next, if previous doesn't fail" both on POSIX and Windows. But keeping portability of "dirstaterace.command" manually is troublesome. This patch factors external procedures out as a shell script for portability. "sh SCRIPT" always allows scripting in POSIX style. This change is also for convenience. Fixed script name can reduce command line arguments. "r" prefix is needed for "sh '$TESTTMP/dirstaterace.sh'", because $TESTTMP contains backslash on Windows.
Fri, 09 Jun 2017 13:07:48 +0900 dirstate: add identity information to detect simultaneous changing in storage
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 13:07:48 +0900] rev 32750
dirstate: add identity information to detect simultaneous changing in storage This identity is used to examine whether dirstate is simultaneously changed in storage after previous caching (see issue5584 for detail). util.cachestat can't be used for this purpose, because it has no valuable information on Windows. On the other hand, util.filestat can detect changing dirstate in storage certainly, regardless of platforms. https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan Strictly speaking, if underlying filesystem doesn't support ctime/mtime, util.filestat can't detect simultaneous changing in storage as expected. But simultaneous changing on such (very rare) platform can't be detected regardless of this patch series. Therefore, util.filestat should be reasonable identity for almost all usecases.
Fri, 09 Jun 2017 13:07:48 +0900 util: make filestat.__eq__ return True if both of self and old have None stat
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 13:07:48 +0900] rev 32749
util: make filestat.__eq__ return True if both of self and old have None stat For convenience to compare two filestat objects regardless of None-ness of stat field.
Fri, 09 Jun 2017 12:58:18 +0900 vfs: create copy at renaming to avoid file stat ambiguity if needed
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 12:58:18 +0900] rev 32748
vfs: create copy at renaming to avoid file stat ambiguity if needed In order to fix issue5418, bff5ccbe5ead made vfs.rename(checkambig=True) omit advancing mtime of renamed file, if renamed file is owned by another (EPERM is raised in this case). But this omission causes rewinding mtime at restoration in such situation, and makes avoiding file stat ambiguity difficult, because ExactCacheValidationPlan assumes that mtime should be advanced, if a file is changed in same ctime. https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan Ambiguity of file stat also requires issue5584 to be fixed with other than file stat, but "hash of file", "generation ID" and so on were already rejected ideas (please see original RFC linked from "Outline of issue" in ExactCacheValidationPlan page). This omission occurs: - only for non append-only files (dirstate, bookmarks, and phaseroots), and - only if previous transaction is rollbacked by another user The latter means "sharing a repository clone via group permission". This is reasonable usecase, but not ordinary for many users, IMHO. "hg rollback" itself has been deprecated since Mercurial 2.7, too. Therefore, increasing the cost at rollbacking previous transaction executed by another a little seems reasonable, for avoidance of file stat ambiguity. This patch does: - create copy of (already renamed) source file, if advancing mtime fails for EPERM - rename from copied file to destination file, and - advance mtime of renamed file, which is now owned by current user This patch also factors "self.join(src)" out to reduce redundancy.
Fri, 09 Jun 2017 12:58:18 +0900 vfs: factor out "rename and avoid ambiguity" to reuse
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 12:58:18 +0900] rev 32747
vfs: factor out "rename and avoid ambiguity" to reuse This makes subsequent patch simple.
Fri, 09 Jun 2017 12:58:17 +0900 util: make filestat.avoidambig() return whether ambiguity is avoided or not
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Fri, 09 Jun 2017 12:58:17 +0900] rev 32746
util: make filestat.avoidambig() return whether ambiguity is avoided or not
Fri, 09 Jun 2017 10:42:19 -0700 debugcommands: issue warning when repo has secret changesets (issue5589)
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 10:42:19 -0700] rev 32745
debugcommands: issue warning when repo has secret changesets (issue5589) This seems like a prudent thing to do. As the inline comment says, we may want to make this abort once the functionality is stabilized as part of `hg bundle`. Let's save that debate for another day.
Fri, 09 Jun 2017 10:41:13 -0700 streamclone: consider secret changesets (BC) (issue5589)
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 09 Jun 2017 10:41:13 -0700] rev 32744
streamclone: consider secret changesets (BC) (issue5589) Previously, a repo containing secret changesets would be served via stream clone, transferring those secret changesets. While secret changesets aren't meant to imply strong security (if you really want to keep them secret, others shouldn't have read access to the repo), we should at least make an effort to protect secret changesets when possible. After this commit, we no longer serve stream clones for repos containing secret changesets by default. This is backwards incompatible behavior. In case anyone is relying on the behavior, we provide a config option to opt into the old behavior. Note that this defense is only beneficial for remote repos accessed via the wire protocol: if a client has access to the files backing a repo, they can get to the raw data and see secret revisions.
Fri, 09 Jun 2017 21:33:15 +0900 json: pass formatting options recursively
Yuya Nishihara <yuya@tcha.org> [Fri, 09 Jun 2017 21:33:15 +0900] rev 32743
json: pass formatting options recursively This bug was introduced in 654e9a1c8a6c. It's okay to escape <>, but is unnecessary for command output.
Sun, 23 Apr 2017 13:40:18 +0900 json: avoid extra string manipulation of dict keys
Yuya Nishihara <yuya@tcha.org> [Sun, 23 Apr 2017 13:40:18 +0900] rev 32742
json: avoid extra string manipulation of dict keys A key must be string per JSON spec, and that's also true for template dicts.
Fri, 09 Jun 2017 21:45:22 +0900 test-obsolete: include <> in user field to check JSON escapes
Yuya Nishihara <yuya@tcha.org> [Fri, 09 Jun 2017 21:45:22 +0900] rev 32741
test-obsolete: include <> in user field to check JSON escapes I found json() filter doesn't pass formatting options recursively. That's why <> are escaped.
Fri, 09 Jun 2017 21:28:22 +0900 templatefilers: correct filename in header comment
Yuya Nishihara <yuya@tcha.org> [Fri, 09 Jun 2017 21:28:22 +0900] rev 32740
templatefilers: correct filename in header comment
Thu, 08 Jun 2017 20:28:13 -0700 repoview: remove special casing of "requirements"
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 08 Jun 2017 20:28:13 -0700] rev 32739
repoview: remove special casing of "requirements" At the time this code was introduced (3a6ddacb7198), the inline comment was true. This changed in e3a928bd1cd4. The proxy is no longer needed.
Wed, 07 Jun 2017 19:32:16 +0100 bookmarks: move variable initialization earlier
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jun 2017 19:32:16 +0100] rev 32738
bookmarks: move variable initialization earlier Since we no longer set '_clean = False' during the initialization loop, we can move the attribute assignment earlier in the function for clarity. (no speed improvement expected or measured ;-) )
Wed, 07 Jun 2017 19:13:09 +0100 bookmarks: directly use base dict 'setitem'
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jun 2017 19:13:09 +0100] rev 32737
bookmarks: directly use base dict 'setitem' The bmstore '__setitem__' method is setting an extra flag that is not needed during initialization. Skipping the method will allow further cleanup and yield some speedup as a side effect. Before: ! wall 0.009120 comb 0.010000 user 0.010000 sys 0.000000 (best of 312) After: ! wall 0.007874 comb 0.010000 user 0.010000 sys 0.000000 (best of 360)
Wed, 07 Jun 2017 19:22:39 +0100 bookmarks: rely on exception for malformed lines
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jun 2017 19:22:39 +0100] rev 32736
bookmarks: rely on exception for malformed lines Since we already have an exception context open, for other thing, we can simplify the code a bit and rely on exception handling for invalid lines. Speed is not the main motivation for this changes. However as I'm in the middle of benchmarking things we can see a small positive impact. Before: ! wall 0.009358 comb 0.000000 user 0.000000 sys 0.000000 (best of 303) After: ! wall 0.009173 comb 0.010000 user 0.010000 sys 0.000000 (best of 310)
Wed, 07 Jun 2017 22:26:43 +0100 bookmarks: explicitly convert to 'node' during initialization
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jun 2017 22:26:43 +0100] rev 32735
bookmarks: explicitly convert to 'node' during initialization We know the content of the file is supposed to be full hex. So we can do the translation ourselves and directly check if the node is known. As nice side effect we now have proper error handling for invalid node value. Before: ! wall 0.021580 comb 0.020000 user 0.020000 sys 0.000000 (best of 134) After: ! wall 0.009342 comb 0.010000 user 0.010000 sys 0.000000 (best of 302)
Wed, 07 Jun 2017 19:21:02 +0100 bookmarks: prefetch 'lookup' outside of the loop
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jun 2017 19:21:02 +0100] rev 32734
bookmarks: prefetch 'lookup' outside of the loop Skipping the attribute lookup up raise a significant speedup. Example on a repository with about 4000 bookmarks. Before: ! wall 0.026027 comb 0.020000 user 0.020000 sys 0.000000 (best of 112) After: ! wall 0.021580 comb 0.020000 user 0.020000 sys 0.000000 (best of 134) (This is also in its own changeset to clarify the perf win from another coming changesets)
Wed, 07 Jun 2017 18:22:11 +0100 perf: add a perfbookmarks command
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jun 2017 18:22:11 +0100] rev 32733
perf: add a perfbookmarks command A new command dedicated to benchmark of bookmark initialization.
Tue, 23 May 2017 02:27:41 +0200 perfphases: add a flag to also include file access time
Pierre-Yves David <pierre-yves.david@octobus.net> [Tue, 23 May 2017 02:27:41 +0200] rev 32732
perfphases: add a flag to also include file access time The flag purges all phases data so we'll have to read the file from disk again.
Wed, 07 Jun 2017 17:31:30 +0100 perf: have a generic "clearstorecache" function
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jun 2017 17:31:30 +0100] rev 32731
perf: have a generic "clearstorecache" function There are multiple places where we will want to purge some store cache. So we promote the existing _clearobsstore function to a something reusable.
Thu, 08 Jun 2017 23:23:37 -0700 localrepo: move filtername to __init__
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 08 Jun 2017 23:23:37 -0700] rev 32730
localrepo: move filtername to __init__ This is obviously an instance attribute, not a type attribute. The modern Python style is to use __init__ for defining these. This exposes statichttprepo as inheriting from localrepository without calling its __init__. As a result, its __init__ defines a lot of variables that methods on localrepository's methods need. But factoring the common bits into a separate class is for another day.
Thu, 08 Jun 2017 21:54:30 -0700 obsolete: move obsstore creation logic from localrepo
Gregory Szorc <gregory.szorc@gmail.com> [Thu, 08 Jun 2017 21:54:30 -0700] rev 32729
obsolete: move obsstore creation logic from localrepo This code has more to do with obsolete.py than localrepo.py. Let's move it there.
Thu, 08 Jun 2017 22:18:17 -0700 match: allow pats to be None
Martin von Zweigbergk <martinvonz@google.com> [Thu, 08 Jun 2017 22:18:17 -0700] rev 32728
match: allow pats to be None match.match already interprets "!bool(patterns)" as matching everything (but includes and excludes still apply). We might as well allow None, which lets us simplify some callers a bit. I originally wrote this patch while trying to change match.match(patterns=[]) to mean to match no patterns. This patch is one step towards that goal. I'm not sure it'll be worth the effort to go all the way there, but I think this patch still makes sense on its own.
Tue, 06 Jun 2017 11:16:38 -0400 tests: add a test for installing hg with pip in a virtualenv
Augie Fackler <augie@google.com> [Tue, 06 Jun 2017 11:16:38 -0400] rev 32727
tests: add a test for installing hg with pip in a virtualenv Since we're doing so much clever junk in our setup.py, let's have a test that exercises it. Thanks to Matt Harbison for testing this on Windows and verifying that installenv/*/hg would work as a way to work around bin being called Scripts on Windows.
Tue, 06 Jun 2017 11:16:10 -0400 hghave: add check for virtualenv
Augie Fackler <augie@google.com> [Tue, 06 Jun 2017 11:16:10 -0400] rev 32726
hghave: add check for virtualenv
Tue, 06 Jun 2017 11:02:30 -0400 setup: introduce dummy copies of setuptools flags
Augie Fackler <augie@google.com> [Tue, 06 Jun 2017 11:02:30 -0400] rev 32725
setup: introduce dummy copies of setuptools flags Since we're filtering out some egg gunk, we need to emulate these flags which disable eggs so that pip still works.
Tue, 06 Jun 2017 10:09:48 -0400 extensions: catch uisetup and extsetup failures and don't let them break hg
Augie Fackler <augie@google.com> [Tue, 06 Jun 2017 10:09:48 -0400] rev 32724
extensions: catch uisetup and extsetup failures and don't let them break hg Otherwise users of the patience diff extension will be unable to run anything at all in hg 4.3 until they figure out what's broken.
Tue, 06 Jun 2017 10:03:16 -0400 tests: add test demonstrating how broken third-party extensions can get
Augie Fackler <augie@google.com> [Tue, 06 Jun 2017 10:03:16 -0400] rev 32723
tests: add test demonstrating how broken third-party extensions can get I intend to fix this, but will do the fix as a separate change to make the behavior change obvious. This was inspired by some users having the patience diff extension, which broke when we moved bdiff.so so thoroughly the users can't even run 'hg debuginstall'.
Thu, 08 Jun 2017 10:44:53 -0400 extensions: move wrapfilecache function from fsmonitor
Augie Fackler <augie@google.com> [Thu, 08 Jun 2017 10:44:53 -0400] rev 32722
extensions: move wrapfilecache function from fsmonitor It makes more sense to put this in core, so other extensions can trivially get access to it without having to rely on importing fsmonitor.
Wed, 26 Apr 2017 16:05:22 +0200 chmod: create a new file when flags are set on a hardlinked file
Koen Van Hoof <koen.van_hoof@nokia.com> [Wed, 26 Apr 2017 16:05:22 +0200] rev 32721
chmod: create a new file when flags are set on a hardlinked file For performance reasons we have several repositories where the files in the working directory of 1 repo are hardlinks to the files of the other repo When an update in one repo results in a chmod of a such a file, the hardlink has to be deleted and replaced by a regular file to make sure that the change does not happen in the other repo
Wed, 07 Jun 2017 21:17:24 -0700 run-tests: make --restart work with output dir
Siddharth Agarwal <sid0@fb.com> [Wed, 07 Jun 2017 21:17:24 -0700] rev 32720
run-tests: make --restart work with output dir
Wed, 07 Jun 2017 21:17:06 -0700 run-tests: output coverage to output dir
Siddharth Agarwal <sid0@fb.com> [Wed, 07 Jun 2017 21:17:06 -0700] rev 32719
run-tests: output coverage to output dir There do not appear to be any tests for this, and I've never used either of these options before, but this works.
Wed, 07 Jun 2017 20:46:43 -0700 run-tests: write JSON reports to output dir
Siddharth Agarwal <sid0@fb.com> [Wed, 07 Jun 2017 20:46:43 -0700] rev 32718
run-tests: write JSON reports to output dir
Wed, 07 Jun 2017 20:32:11 -0700 run-tests: write test times to output dir
Siddharth Agarwal <sid0@fb.com> [Wed, 07 Jun 2017 20:32:11 -0700] rev 32717
run-tests: write test times to output dir
Wed, 07 Jun 2017 20:30:08 -0700 run-tests: allow specifying an output dir to write .errs to
Siddharth Agarwal <sid0@fb.com> [Wed, 07 Jun 2017 20:30:08 -0700] rev 32716
run-tests: allow specifying an output dir to write .errs to I'm trying to use run-tests.py on a read-only file system. This series allows that to happen.
Wed, 07 Jun 2017 15:47:06 -0700 run-tests: add information about skipped tests to XUnit output
Siddharth Agarwal <sid0@fb.com> [Wed, 07 Jun 2017 15:47:06 -0700] rev 32715
run-tests: add information about skipped tests to XUnit output The XUnit spec supports skipped tests.
Wed, 07 Jun 2017 15:47:06 -0700 run-tests: wrap failures in an XUnit 'failure' element
Siddharth Agarwal <sid0@fb.com> [Wed, 07 Jun 2017 15:47:06 -0700] rev 32714
run-tests: wrap failures in an XUnit 'failure' element This is closer to what most XUnit consumers can understand.
Wed, 07 Jun 2017 10:44:11 +0100 discovery: log discovery result in non-trivial cases
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jun 2017 10:44:11 +0100] rev 32713
discovery: log discovery result in non-trivial cases We log the discovery summary, the number of roundtrips and the elapsed time. This is useful to understand where slow push might come from when lloking at the blackbox.
Wed, 07 Jun 2017 10:29:39 +0100 discovery: include timing in the debug output
Pierre-Yves David <pierre-yves.david@octobus.net> [Wed, 07 Jun 2017 10:29:39 +0100] rev 32712
discovery: include timing in the debug output Having such date easily available is useful. It also prepare the inclusion of some discovery related data in blackbox.
Sun, 28 May 2017 21:33:33 -0400 tests: remove sys.executable from "required tools"
Augie Fackler <raf@durin42.com> [Sun, 28 May 2017 21:33:33 -0400] rev 32711
tests: remove sys.executable from "required tools" In practice this doesn't appear to have been true for some time - we reference Python using the $PYTHON variable in all the tests now (which we have to for PyPy and Python 3), and I've been using ~/.../python.exe to test with tip of the cpython 3.6 release branch while working on manifest tests in Python 3 and everything seems to be just fine. The only real observable difference from this change is that I stop getting a warning about python.exe not being a thing on $PATH, which seems like an improvement.
Mon, 05 Jun 2017 16:24:01 +0100 perfbranchmap: add an option to purge the revbranch cache
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 05 Jun 2017 16:24:01 +0100] rev 32710
perfbranchmap: add an option to purge the revbranch cache The perf extension needs to be able to reflect this reality too. (eg: 4s vs 60s on a Million-ish revisions repository).
Mon, 29 May 2017 05:53:58 +0200 push: add a way to allow concurrent pushes on unrelated heads
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:53:58 +0200] rev 32709
push: add a way to allow concurrent pushes on unrelated heads Client has a mechanism for the server to check that nothing changed server side since the client prepared a push. That check is wide and any head changed on the server will lead to an aborted push. We introduce a way for the client to send a less strict checking. That logic will check that no heads impacted by the push have been affected. If other unrelated heads (including named branches heads) have been affected, the push will proceed. This is very helpful for repositories with high developers traffic on different heads, a common setup. That behavior is currently controlled by an experimental option. The config should live in the "server" section but bike-shedding of the name will happen in the next changesets. Servers advertise this capability through a new bundle2 capability 'checkeads', using the value 'related'. The 'test-push-race.t' is updated to check that new capabilities on the documented cases.
Mon, 29 May 2017 05:52:13 +0200 headsummary: expose the 'discardedheads' set in the headssummary
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:52:13 +0200] rev 32708
headsummary: expose the 'discardedheads' set in the headssummary That information will be useful to detect push race on related part of the history. See next changeset for details.
Mon, 29 May 2017 05:47:27 +0200 checkheads: perform obsolescence post processing directly in _headssummary
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:47:27 +0200] rev 32707
checkheads: perform obsolescence post processing directly in _headssummary The goal is to have the function directly return something meaningful and useful for the whole pull. Note: we skip adding post-processing in '_oldheadssummary' because if a client is too old for branchmap it will be too old for obsolescence too.
Mon, 29 May 2017 10:56:00 +0200 headssummary: directly feed the function with the 'pushop' object
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 10:56:00 +0200] rev 32706
headssummary: directly feed the function with the 'pushop' object Our goal is to be able to perform the post processing directly into the '_headssummary' function. However before this patch the '_headsummary' function only had access to repo, remote, outgoing while the '_postprocessobsolete' function takes a 'pushop' object. Experience shows that having the 'pushop' object helps extensions so we update '_headssummary' to take a pushop object as argument.
Mon, 29 May 2017 05:45:59 +0200 checkheads: gather the postprocessing with other obsolescence specific code
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:45:59 +0200] rev 32705
checkheads: gather the postprocessing with other obsolescence specific code We extract this function from the loop and gather it with the rest of the obsolescence specific code. That will help to clarify the move of the whole logic inside the "heads summary" computation.
Tue, 06 Jun 2017 14:38:59 -0700 run-tests: add a way to list tests, with JSON and XUnit support
Siddharth Agarwal <sid0@fb.com> [Tue, 06 Jun 2017 14:38:59 -0700] rev 32704
run-tests: add a way to list tests, with JSON and XUnit support Some test runners are interested in listing tests, so they can do their own filtering on top (usually based on attributes like historically observed runtime). Add support for that.
Tue, 06 Jun 2017 13:56:53 -0700 run-tests: install hg after computing tests to run
Siddharth Agarwal <sid0@fb.com> [Tue, 06 Jun 2017 13:56:53 -0700] rev 32703
run-tests: install hg after computing tests to run We're going to add a way to list tests, and we don't need to install hg for that.
Tue, 06 Jun 2017 13:52:25 -0700 run-tests: make time field optional for xunit report
Siddharth Agarwal <sid0@fb.com> [Tue, 06 Jun 2017 13:52:25 -0700] rev 32702
run-tests: make time field optional for xunit report We're going to use XUnit to list tests, and we don't have a time field in that case.
Tue, 06 Jun 2017 13:10:55 -0700 run-tests: factor out json write code into another method
Siddharth Agarwal <sid0@fb.com> [Tue, 06 Jun 2017 13:10:55 -0700] rev 32701
run-tests: factor out json write code into another method We're going to use this code to output a JSON-formatted listing of tests.
Tue, 06 Jun 2017 13:10:55 -0700 run-tests: factor out xunit write code into another method
Siddharth Agarwal <sid0@fb.com> [Tue, 06 Jun 2017 13:10:55 -0700] rev 32700
run-tests: factor out xunit write code into another method We're going to use this code to output an XUnit-formatted listing of tests.
Sat, 27 May 2017 10:25:09 -0700 revset: lookup descendents for negative arguments to ancestor operator
David Soria Parra <davidsp@fb.com> [Sat, 27 May 2017 10:25:09 -0700] rev 32699
revset: lookup descendents for negative arguments to ancestor operator Negative offsets to the `~` operator now search for descendents. The search is aborted when a node has more than one child as we do not have a definition for 'nth child'. Optionally we can introduce such a notion and take the nth child ordered by rev number. The current revset language does provides a short operator for ancestor lookup but not for descendents. This gives user a simple revset to move to the previous changeset, e.g. `hg up '.~1'` but not to the 'next' changeset. With this change userse can now use `.~-1` as a shortcut to move to the next changeset. This fits better into allowing users to specify revisions via revsets and avoiding the need for special `hg next` and `hg prev` operations. The alternative to negative offsets is adding a new operator. We do not have many operators in ascii left that do not require bash escaping (',', '_', and '/' come to mind). If we decide that we should add a more convenient short operator such as ('/', e.g. './1') we can later add it and allow ascendents lookup via negative numbers.
Tue, 06 Jun 2017 22:17:39 +0530 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 06 Jun 2017 22:17:39 +0530] rev 32698
update: show the commit to which we updated in case of multiple heads (BC) Currently when we have multiple heads on the same branch, update tells us that there some more heads for the current branch but does not tells us the head to which the repository has been updated to. It makes more sense showing the head we updated to and then telling there are some more heads.
Fri, 19 May 2017 20:29:11 -0700 revlog: skeleton support for version 2 revlogs
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 19 May 2017 20:29:11 -0700] rev 32697
revlog: skeleton support for version 2 revlogs There are a number of improvements we want to make to revlogs that will require a new version - version 2. It is unclear what the full set of improvements will be or when we'll be done with them. What I do know is that the process will likely take longer than a single release, will require input from various stakeholders to evaluate changes, and will have many contentious debates and bikeshedding. It is unrealistic to develop revlog version 2 up front: there are just too many uncertainties that we won't know until things are implemented and experiments are run. Some changes will also be invasive and prone to bit rot, so sitting on dozens of patches is not practical. This commit introduces skeleton support for version 2 revlogs in a way that is flexible and not bound by backwards compatibility concerns. An experimental repo requirement for denoting revlog v2 has been added. The requirement string has a sub-version component to it. This will allow us to declare multiple requirements in the course of developing revlog v2. Whenever we change the in-development revlog v2 format, we can tweak the string, creating a new requirement and locking out old clients. This will allow us to make as many backwards incompatible changes and experiments to revlog v2 as we want. In other words, we can land code and make meaningful progress towards revlog v2 while still maintaining extreme format flexibility up until the point we freeze the format and remove the experimental labels. To enable the new repo requirement, you must supply an experimental and undocumented config option. But not just any boolean flag will do: you need to explicitly use a value that no sane person should ever type. This is an additional guard against enabling revlog v2 on an installation it shouldn't be enabled on. The specific scenario I'm trying to prevent is say a user with a 4.4 client with a frozen format enabling the option but then downgrading to 4.3 and accidentally creating repos with an outdated and unsupported repo format. Requiring a "challenge" string should prevent this. Because the format is not yet finalized and I don't want to take any chances, revlog v2's version is currently 0xDEAD. I figure squatting on a value we're likely never to use as an actual revlog version to mean "internal testing only" is acceptable. And "dead" is easily recognized as something meaningful. There is a bunch of cleanup that is needed before work on revlog v2 begins in earnest. I plan on doing that work once this patch is accepted and we're comfortable with the idea of starting down this path.
Tue, 06 Jun 2017 08:58:27 -0700 check-code: ban grep's context flags (-A/-B/-C) since they're not on Solaris
Danek Duvall <danek.duvall@oracle.com> [Tue, 06 Jun 2017 08:58:27 -0700] rev 32696
check-code: ban grep's context flags (-A/-B/-C) since they're not on Solaris
Tue, 06 Jun 2017 08:52:51 +0200 patchbomb: avoid -r and -B options at the same time
David Demelier <demelier.david@gmail.com> [Tue, 06 Jun 2017 08:52:51 +0200] rev 32695
patchbomb: avoid -r and -B options at the same time
Mon, 05 Jun 2017 16:19:41 -0700 debugbundle: add --part-type flag to emit only named part types
Danek Duvall <danek.duvall@oracle.com> [Mon, 05 Jun 2017 16:19:41 -0700] rev 32694
debugbundle: add --part-type flag to emit only named part types This removes the need in the tests for grep -A, which is not supported on Solaris.
Mon, 05 Jun 2017 20:37:45 -0400 test-obsolete-bundle-strip: add globs for Windows
Matt Harbison <matt_harbison@yahoo.com> [Mon, 05 Jun 2017 20:37:45 -0400] rev 32693
test-obsolete-bundle-strip: add globs for Windows
Sun, 04 Jun 2017 00:38:11 -0700 obsstore: move header encoding to a separate function
Jun Wu <quark@fb.com> [Sun, 04 Jun 2017 00:38:11 -0700] rev 32692
obsstore: move header encoding to a separate function This patch moves encodeheader from encodemarkers. So markers and header could be encoded separately.
Sun, 04 Jun 2017 08:49:15 -0700 obsstore: move _version to a propertycache
Jun Wu <quark@fb.com> [Sun, 04 Jun 2017 08:49:15 -0700] rev 32691
obsstore: move _version to a propertycache This makes sure _version is correct even if "_all" is not called.
Fri, 02 Jun 2017 20:38:01 -0700 obsstore: separate marker parsing from obsstore reading
Jun Wu <quark@fb.com> [Fri, 02 Jun 2017 20:38:01 -0700] rev 32690
obsstore: separate marker parsing from obsstore reading This allows us to get raw obsstore content without parsing any markers. Reading obsstore is much cheaper than parsing markers.
Fri, 02 Jun 2017 19:34:56 -0700 obsstore: move marker version reading to a separate function
Jun Wu <quark@fb.com> [Fri, 02 Jun 2017 19:34:56 -0700] rev 32689
obsstore: move marker version reading to a separate function This allows us to read marker version without reading markers.
Fri, 02 Jun 2017 19:32:27 -0700 obsstore: minor optimization for the obsolete revset
Jun Wu <quark@fb.com> [Fri, 02 Jun 2017 19:32:27 -0700] rev 32688
obsstore: minor optimization for the obsolete revset Use local variables in a loop.
Sun, 23 Apr 2017 00:31:29 +0900 dispatch: do not close stdout and stderr, just flush() instead
Yuya Nishihara <yuya@tcha.org> [Sun, 23 Apr 2017 00:31:29 +0900] rev 32687
dispatch: do not close stdout and stderr, just flush() instead Since 3a4c0905f357 "util: always force line buffered stdout when stdout is a tty", we have two file objects attached to the same STDOUT_FILENO. If one is closed, the underlying file descriptor is also closed, and writing to the other file object would crash the Python interpreter in a hard way, at least on Windows. So, it seems safer to not close the standard streams. This also matches the behavior of the default sys.stdout/stderr.close(), which never close the FILE* streams in C layer. https://hg.python.org/cpython/file/v2.7.13/Python/sysmodule.c#l1401
Mon, 05 Jun 2017 23:36:35 +0900 windows: do not close stdout on flush() failure
Yuya Nishihara <yuya@tcha.org> [Mon, 05 Jun 2017 23:36:35 +0900] rev 32686
windows: do not close stdout on flush() failure It's been there since e817c68edfed (2007-02-19), but seems wrong since any I/O operations to a closed file would raise ValueError, not IOError. We should keep the file object open even if the underlying file descriptor is half dead.
Mon, 05 Jun 2017 23:23:03 +0900 test-obsolete-bundle-strip: do not include \n in filename (issue5586)
Yuya Nishihara <yuya@tcha.org> [Mon, 05 Jun 2017 23:23:03 +0900] rev 32685
test-obsolete-bundle-strip: do not include \n in filename (issue5586)
Fri, 19 Aug 2016 18:26:04 +0900 revlog: add support for partial matching of wdir node id
Yuya Nishihara <yuya@tcha.org> [Fri, 19 Aug 2016 18:26:04 +0900] rev 32684
revlog: add support for partial matching of wdir node id The idea is simple. If the given node id prefix is 'ff...f', add +1 to the number of matches (e.g. ambiguous if partial + maybewdir > 1). This patch also fixes id() revset and shortest() template since _partialmatch() can raise WdirUnsupported exception.
Sat, 20 Aug 2016 18:15:19 +0900 revset: add support for branch(wdir()) and wdir() & branch()
Yuya Nishihara <yuya@tcha.org> [Sat, 20 Aug 2016 18:15:19 +0900] rev 32683
revset: add support for branch(wdir()) and wdir() & branch()
Sun, 04 Jun 2017 16:08:50 -0700 dirstate: add docstring for invalidate
Siddharth Agarwal <sid0@fb.com> [Sun, 04 Jun 2017 16:08:50 -0700] rev 32682
dirstate: add docstring for invalidate This always confuses me, and we already have a docstring on localrepo.invalidatedirstate.
Fri, 02 Jun 2017 23:05:03 -0700 tests: simplify and clarify test-obsolete-bundle-strip.t a little
Martin von Zweigbergk <martinvonz@google.com> [Fri, 02 Jun 2017 23:05:03 -0700] rev 32681
tests: simplify and clarify test-obsolete-bundle-strip.t a little
Fri, 02 Jun 2017 23:29:20 -0700 tests: add missing parens in test-obsolete-bundle-strip.t
Martin von Zweigbergk <martinvonz@google.com> [Fri, 02 Jun 2017 23:29:20 -0700] rev 32680
tests: add missing parens in test-obsolete-bundle-strip.t The "(not ${revs})" was missing parens around ${revs}, so when revs was "A + B", it became "(not A + B)" when actually "(not (A + B))" was intended. Fixing that leads to some more testing of strip. Similarly, the parens were missing in "${revs}::", making it "A + B::" instead of "(A + B)::". Thanks to Yuya for noticing this part. This did not affect any existing tests.
Sun, 04 Jun 2017 20:37:32 -0400 test-clonebundles: conditionalize output for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 04 Jun 2017 20:37:32 -0400] rev 32679
test-clonebundles: conditionalize output for Windows This was the fallout from 9d6031df42c8 (on stable). Now that individual lines can be conditionalized, it seems better to be explicit, rather than mash all of this into one regex. "getaddrinfo failed" was added in 4e566f513fd8 to support Windows.
Sun, 04 Jun 2017 20:11:59 -0400 tests: adjust recent output changes for Windows
Matt Harbison <matt_harbison@yahoo.com> [Sun, 04 Jun 2017 20:11:59 -0400] rev 32678
tests: adjust recent output changes for Windows
Mon, 22 May 2017 21:45:02 -0400 killdaemons: close pid file before killing processes
Matt Harbison <matt_harbison@yahoo.com> [Mon, 22 May 2017 21:45:02 -0400] rev 32677
killdaemons: close pid file before killing processes With #serve enabled on Windows, I was getting occasional stacktraces like this: Errored test-hgweb-json.t: Traceback (most recent call last): File "./run-tests.py", line 724, in run self.tearDown() File "./run-tests.py", line 805, in tearDown killdaemons(entry) File "./run-tests.py", line 540, in killdaemons logfn=vlog) File "...\tests\killdaemons.py", line 94, in killdaemons os.unlink(pidfile) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '...\\hgtests.zmpqj3\\child80\\daemon.pids' Adrian suggested using util.posixfile, which works. However, the 'mercurial' package isn't in sys.path when invoking run-tests.py, and it isn't clear that hacking[1] it in is a good thing (especially for test-run-tests.t, which uses an installation in a temp folder). I tried using ProcessMonitor to figure out what the other process is, but that monitoring slows things down to such a degree that the issue doesn't occur. I was ready to blame the virus scanner, but it happens without that too. Looking at the code, I don't see anything that would have the pid file open. But I was able to get through about 20 full test runs without an issue with this minor change, whereas before it was pretty certain to hit this at least once in two or three runs. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-May/097907.html
Sun, 21 May 2017 18:58:51 -0400 win32: drop a py26 daemonizing hack
Matt Harbison <matt_harbison@yahoo.com> [Sun, 21 May 2017 18:58:51 -0400] rev 32676
win32: drop a py26 daemonizing hack I'm not sure what the referenced hang specifically was, but the whole test suite (with #serve) still runs on python 2.7.13. Aside from no longer prepending "cmd.exe /c", this backs out ca6aa8362f33. I'm trying to track down a rare failure of TerminateProcess() with an access error, and I've seen random extra python processes hanging around after running tests sometimes, so this might help. However, e48cb1c7a902 forces this change. Since the pid object is no longer converted to a string, the cmd.exe pid was being saved instead of the hg pid, and none of the daemons were being killed.
Mon, 29 May 2017 05:23:30 +0200 checkheads: simplify the code around obsolescence post-processing
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:23:30 +0200] rev 32675
checkheads: simplify the code around obsolescence post-processing The 'discardedheads' return become unused and the relationship between newheads and newhs can be clarified. Our next goal here is to be able to extract the _postprocessobsolete call outside of the loop. We keep returning the 'discardedheads' because we'll start using it again soon in this series.
Mon, 29 May 2017 05:21:38 +0200 checkheads: drop now unused filtering of 'unsyncedheads'
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:21:38 +0200] rev 32674
checkheads: drop now unused filtering of 'unsyncedheads' Now that unsynced heads are no longer in the function inputs or returns, we can simplify the code a bit.
Mon, 29 May 2017 05:20:09 +0200 checkheads: clarify that we no longer touch the head unknown locally
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:20:09 +0200] rev 32673
checkheads: clarify that we no longer touch the head unknown locally Since c6cb21ddf74a, heads unknown locally no longer get any post processing from obsolescence markers. We clarify this fact by only feeding the list of locally known new heads to the function. This simplification of the input will help moving that post-processing earlier in the function.
Mon, 29 May 2017 05:33:59 +0200 headssummary: ensure all returned lists are sorted
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:33:59 +0200] rev 32672
headssummary: ensure all returned lists are sorted This is a simple step that will help to keep a stable output in coming refactoring.
Mon, 29 May 2017 05:37:19 +0200 discovery: also use lists for the returns of '_oldheadssummary'
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:37:19 +0200] rev 32671
discovery: also use lists for the returns of '_oldheadssummary' The '_headssummary' function is documenting and using list objects in its return. We now use them in _oldheadssummary too for consistency. This does not affect any usages of these values.
Mon, 29 May 2017 05:53:51 +0200 test: add a push race case where the updated head is obsoleted
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:53:51 +0200] rev 32670
test: add a push race case where the updated head is obsoleted This is the mirror of the previously added case. We check the case where the racing-push obsoletes a head while the raced-push updates that same head.
Mon, 29 May 2017 05:53:24 +0200 test: add a push race case where obsoleted head is updated
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 29 May 2017 05:53:24 +0200] rev 32669
test: add a push race case where obsoleted head is updated We check the case where the raced-push obsoletes a head while the racing-push updates that same head.
Fri, 02 Jun 2017 14:08:26 -0700 keepalive: set buffering=True to do more efficient reads of headers
Kyle Lippincott <spectral@google.com> [Fri, 02 Jun 2017 14:08:26 -0700] rev 32668
keepalive: set buffering=True to do more efficient reads of headers Support for buffering was added to python in d09d6fe31b61, first released with python2.7. Without this, the entirety of the response headers is read byte-by-byte (it does more efficient reads when it gets to the non-header part of the response).
Thu, 01 Jun 2017 18:23:20 -0700 keepalive: pass the correct arguments to HTTPResponse
Kyle Lippincott <spectral@google.com> [Thu, 01 Jun 2017 18:23:20 -0700] rev 32667
keepalive: pass the correct arguments to HTTPResponse python2.7's httplib.HTTPResponse takes the arguments in the following order: sock, debuglevel, strict, method, buffering This was previously passing them in as positional and skipped strict, so we set strict=method. I'm explicitly setting strict=True now to preserve the previous behavior that has been there since this file was created.
(0) -30000 -10000 -3000 -1000 -120 +120 +1000 +3000 +10000 tip