Sun, 14 Aug 2016 18:25:22 -0700 profiling: make profiling functions context managers (API)
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 14 Aug 2016 18:25:22 -0700] rev 29794
profiling: make profiling functions context managers (API) This makes profiling more flexible since we can now call multiple functions when a profiler is active. But the real reason for this is to enable a future consumer to profile a function that returns a generator. We can't do this from the profiling function itself because functions can either be generators or have return values: they can't be both. So therefore it isn't possible to have a generic profiling function that can both consume and re-emit a generator and return a value.
Sun, 14 Aug 2016 16:35:58 -0700 dispatch: set profiling.enabled when profiling is enabled
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 14 Aug 2016 16:35:58 -0700] rev 29793
dispatch: set profiling.enabled when profiling is enabled We do this for other global command arguments. We don't for --profile for reasons that are unknown to me. Probably because nobody has needed it. An upcoming patch will introduce a new consumer of the profiling code. It doesn't have access to command line arguments. So let's set the config option during argument processing. We also remove a check for "options['profile']" because it is now redundant.
Sun, 14 Aug 2016 16:30:44 -0700 profiling: move profiling code from dispatch.py (API)
Gregory Szorc <gregory.szorc@gmail.com> [Sun, 14 Aug 2016 16:30:44 -0700] rev 29792
profiling: move profiling code from dispatch.py (API) Currently, profiling code lives in dispatch.py, which is a low-level module centered around command dispatch. Furthermore, dispatch.py imports a lot of other modules, meaning that importing dispatch.py to get at profiling functionality would often result in a module import cycle. Profiling is a generic activity. It shouldn't be limited to command dispatch. This patch moves profiling code from dispatch.py to the new profiling.py. The low-level "run a profiler against a function" functions have been moved verbatim. The code for determining how to invoke the profiler has been extracted to its own function. I decided to create a new module rather than stick this code elsewhere (such as util.py) because util.py is already quite large. And, I foresee this file growing larger once Facebook's profiling enhancements get added to it.
Mon, 15 Aug 2016 12:26:02 -0400 merge with stable
Augie Fackler <augie@google.com> [Mon, 15 Aug 2016 12:26:02 -0400] rev 29791
merge with stable
Sat, 13 Aug 2016 04:21:42 +0530 pycompat: avoid using an extra function
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 13 Aug 2016 04:21:42 +0530] rev 29790
pycompat: avoid using an extra function We have a single line function which just lowercase the letters and replaces "_" with "". Its better to avoid that function call. Moreover we calling this function around 33 times.
Sat, 13 Aug 2016 03:03:01 +0530 pycompat: remove multiple occurences of urlencode
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 13 Aug 2016 03:03:01 +0530] rev 29789
pycompat: remove multiple occurences of urlencode By mistake we had two occurences of urlencode.
Fri, 12 Aug 2016 17:51:48 -0400 osx: stamp the hg version into the version field in the pkg
Augie Fackler <augie@google.com> [Fri, 12 Aug 2016 17:51:48 -0400] rev 29788
osx: stamp the hg version into the version field in the pkg This is required for tools like https://github.com/munki/munki, and is also more semantically correct.
Thu, 28 Jul 2016 14:18:01 +0200 performance: disable workaround for an old bug of Python gc
Maciej Fijalkowski <fijall@gmail.com> [Thu, 28 Jul 2016 14:18:01 +0200] rev 29787
performance: disable workaround for an old bug of Python gc Since disabling the gc does things worse for pypy and the bug was fixed in 2.7, let's only enable it in <2.7
Fri, 12 Aug 2016 05:56:40 -0700 merge: always use other, not remote, in user prompts
Simon Farnsworth <simonfar@fb.com> [Fri, 12 Aug 2016 05:56:40 -0700] rev 29786
merge: always use other, not remote, in user prompts Now that we store and display merge labels in user prompts (not just conflict markets), we should rely on labels to clarify the two sides of a merge operation (hg merge, hg update, hg rebase etc). "remote" is not a great name here, as it conflates "remote" as in "remote server" with "remote" as in "the side of the merge that's further away". In cases where you're merging the "wrong way" around, remote can even be the "local" commit that you're merging with something pulled from the remote server.
Fri, 12 Aug 2016 06:01:42 -0700 merge: use labels in prompts to the user
Simon Farnsworth <simonfar@fb.com> [Fri, 12 Aug 2016 06:01:42 -0700] rev 29785
merge: use labels in prompts to the user Now that we persist the labels, we can consistently use the labels in prompts for the user without risk of confusion. This changes a huge amount of command output: This means that merge prompts like: no tool found to merge a keep (l)ocal, take (o)ther, or leave (u)nresolved? u and remote changed a which local deleted use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c become: no tool found to merge a keep (l)ocal [working copy], take (o)ther [destination], or leave (u)nresolved? u and remote [source] changed a which local [dest] deleted use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c where "working copy" and "destination" were supplied by the command that requested the merge as labels for conflict markers, and thus should be human-friendly.
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 +1000 +3000 +10000 tip