Fri, 12 Jun 2015 22:09:41 -0400 ui: flush stderr after printing a non-chained exception for Windows
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Jun 2015 22:09:41 -0400] rev 25568
ui: flush stderr after printing a non-chained exception for Windows There were consistent test failures in test-bad-extension.t, because Windows buffers stderr when redirected to a file (per the comment in ui.write_err()). That resulted in failures like this: --- c:/Users/Matt/Projects/hg/tests/test-bad-extension.t +++ c:/Users/Matt/Projects/hg/tests/test-bad-extension.t.err @@ -23,11 +23,11 @@ Traceback (most recent call last): Exception: bit bucket overflow *** failed to import extension badext2: No module named badext2 - Traceback (most recent call last): - ImportError: No module named badext2 hg help [-ec] [TOPIC] show help for a given topic or a help overview + Traceback (most recent call last): + ImportError: No module named badext2 show traceback for ImportError of hgext.name if debug is set (note that --debug option isn't applied yet when loading extensions) Instead of inserting another flush immediately after the print, to go along with the one recently added prior to the print (see 3ff4b07412ad), funnel the output through ui.write_err(). The flush prior to printing the traceback only mentions that stdout needs to be flushed, and only stderr needs to be flushed after printing the traceback. ui.write_err() does both for us without needing to redocument the quirky Windows behavior. It will also clear any progress bar.
Thu, 11 Jun 2015 19:02:24 -0700 revset: use parentsets.min in _children
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 19:02:24 -0700] rev 25567
revset: use parentsets.min in _children As stated in the comment, using the smartset 'min' will give more opportunity to be smart. It give a small but significant boost to the performance. Most of the time is still spend doing the actual computation but at least we can scrap some performance when it makes sense. revset #0: roots(0:tip) plain 0) 0.046600 1) 0.044109 94%
Thu, 11 Jun 2015 11:42:46 -0700 revset: prefetch all attributes before loop in _revsbetween
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 11:42:46 -0700] rev 25566
revset: prefetch all attributes before loop in _revsbetween Python is slow at attributes lookup. No, really, I mean -slow-. prefetching these three methods give use a measurable performance boost. revset #0: 0::tip plain 0) 0.037655 1) 0.034290 91%
Thu, 07 Feb 2013 00:32:26 +0000 hgweb: add some in-code documentation for 'web.view'
Pierre-Yves David <pierre-yves.david@logilab.fr> [Thu, 07 Feb 2013 00:32:26 +0000] rev 25565
hgweb: add some in-code documentation for 'web.view' This documentation was mostly intended for the user helps. However given the lack of request for such feature, we should keep it un-documented. We stick the help text in the code as it could still be useful to fellow contributors.
Thu, 11 Jun 2015 17:19:48 -0700 bookmark: informs of failure to upgrade a bookmark
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 17:19:48 -0700] rev 25564
bookmark: informs of failure to upgrade a bookmark When we explicitly requested to update a bookmark but the bookmark location was missing locally, we used to silently ignore the case. We now issue a message about it to point that something wrong is going on. By chance, we fixed all the cases where is case happened (for explicit pulling only, issue4700 is still open). But I think it is still valuable to have a warning in place in case such issue is reintroduced. This patch have been tested against issue4689 test (but without issue4689 fix). It give the better but expected failure seen below: > --- /home/pyd/src/mercurial-dev/tests/test-bookmarks-pushpull.t > +++ /home/pyd/src/mercurial-dev/tests/test-bookmarks-pushpull.t.err > @@ -337,12 +337,12 @@ > adding manifests > adding file changes > added 1 changesets with 1 changes to 1 files > - updating bookmark Y > + remote bookmark Y point to locally missing 0d60821d2197 > (run 'hg update' to get a working copy) > $ hg book > * @ 1:0d2164f0ce0d > X 1:0d2164f0ce0d > - Y 5:35d1ef0a8d1b > + Y 4:b0a5eff05604 > Z 1:0d2164f0ce0d > > Update a bookmark right after the initial lookup -r (issue4700) > @@ -387,12 +387,11 @@ > adding manifests > adding file changes > added 1 changesets with 1 changes to 1 files > - updating bookmark Y > (run 'hg update' to get a working copy) > $ hg book > * @ 1:0d2164f0ce0d > X 1:0d2164f0ce0d > - Y 6:0d60821d2197 > + Y 4:b0a5eff05604 > Z 1:0d2164f0ce0d > $ hg -R $TESTTMP/pull-race book > @ 1:0d2164f0ce0d
Thu, 11 Jun 2015 08:54:24 -0400 fancyopts: allow all callable as default parameter value
introom <i@introo.me> [Thu, 11 Jun 2015 08:54:24 -0400] rev 25563
fancyopts: allow all callable as default parameter value The current fancyopts allows function as default parameter value but not other callables. By supporting other callables, we can have the benefits of e.g., custom __str__ method, which will be printed by 'hg help' as the default value.
Sat, 13 Jun 2015 20:14:22 +0900 templater: evaluate arguments passed to diff() appropriately stable
Yuya Nishihara <yuya@tcha.org> [Sat, 13 Jun 2015 20:14:22 +0900] rev 25562
templater: evaluate arguments passed to diff() appropriately Before this patch, diff() crashed by passing non-string expression because it didn't evaluate arguments at all.
Fri, 12 Jun 2015 14:43:59 -0700 parsers: do not cache RevlogError type (issue4451) stable
Gregory Szorc <gregory.szorc@gmail.com> [Fri, 12 Jun 2015 14:43:59 -0700] rev 25561
parsers: do not cache RevlogError type (issue4451) Index lookups raise RevlogError when the lookup fails. The previous implementation was caching a reference to the RevlogError type in a static variable. This assumed that the "mercurial.error" module was only loaded once and there was only a single copy of it floating around in memory. Unfortunately, in some situations - including certain mod_wsgi configurations - this was not the case: the "mercurial.error" module could be reloaded. It was possible for a "RevlogError" reference from the first interpreter to be used by a second interpreter. While the underlying thing was a "mercurial.error.RevlogError," the object IDs were different, so the Python code in revlog.py was failing to catch the exception! This error has existed since the C index lookup code was implemented in changeset e8d37b78acfb, which was first released in Mercurial 2.2 in 2012. http://emptysqua.re/blog/python-c-extensions-and-mod-wsgi/#static-variables-are-shared contains more details. This patch removes the caching of the RevlogError type from the function. Since pretty much the entire function was refactored and the return value of the function wasn't used, I changed the function signature to not return anything. For reasons unknown to me, we were calling PyErr_SetObject() with the type of RevlogError and an instance of RevlogError. This was equivalent to the Python code "raise RevlogError(RevlogError)". This seemed wonky and completely unnecessary. The Python code only cares about the type of the exception, not its contents. So I got rid of this complexity. This is my first Python C extension patch. Please give extra scrutiny to it during review.
Fri, 12 Jun 2015 16:11:42 -0400 largefiles: restore the original converter class after lfconvert --to-normal
Matt Harbison <matt_harbison@yahoo.com> [Fri, 12 Jun 2015 16:11:42 -0400] rev 25560
largefiles: restore the original converter class after lfconvert --to-normal Not sure how much this really matters, but much of the largefiles code that monkey-patches like this restores things when it finishes.
Thu, 11 Jun 2015 13:02:21 -0700 push: only say we are trying to push obsmarkers when we actually try
Pierre-Yves David <pierre-yves.david@fb.com> [Thu, 11 Jun 2015 13:02:21 -0700] rev 25559
push: only say we are trying to push obsmarkers when we actually try The message was issued unconditionally. Move it inside the `if` that actually tries to push obsmarkers.
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip