Thu, 02 Mar 2017 03:23:18 +0100 clonebundle: use 'repo.vfs' instead of 'repo.opener'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Mar 2017 03:23:18 +0100] rev 31146
clonebundle: use 'repo.vfs' instead of 'repo.opener' The later is a 5 years old form.
Fri, 05 Aug 2016 13:53:45 +0200 localrepo: deprecated 'repo.wopener' (API)
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 13:53:45 +0200] rev 31145
localrepo: deprecated 'repo.wopener' (API) The "new" 'repo.wvfs' attribute have been around for almost 5 years. I think we can deprecate the old form now ;-)
Fri, 05 Aug 2016 13:49:05 +0200 localrepo: add some comment about role of various vfs object
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 05 Aug 2016 13:49:05 +0200] rev 31144
localrepo: add some comment about role of various vfs object This should make things clearer for most people.
Thu, 19 Jan 2017 16:27:08 -0500 tests: un-nest the `order` repo in test-rebase-scenario-global
Augie Fackler <augie@google.com> [Thu, 19 Jan 2017 16:27:08 -0500] rev 31143
tests: un-nest the `order` repo in test-rebase-scenario-global This wasn't hurting anything, but it's more in line with how we manage other tests.
Mon, 06 Feb 2017 15:19:32 -0500 osx: install bash and zsh completions by default
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 15:19:32 -0500] rev 31142
osx: install bash and zsh completions by default The zsh location appears to be on the default $fpath for zsh. bash, on the other hand, appears to have no default location for completion scripts, so we follow the lead of Apple's Git distribution and select a semi-arbitrary place in /usr/local for the file.
Thu, 02 Mar 2017 10:12:40 -0800 util: add allowhardlinks module variable
Durham Goode <durham@fb.com> [Thu, 02 Mar 2017 10:12:40 -0800] rev 31141
util: add allowhardlinks module variable To enable extensions to enable hardlinks for certain environments, let's move the 'if False' to be an 'if allowhardlinks' and let extensions modify the allowhardlinks variable. Tests on linux ext4 pass with it set to True and to False.
Thu, 02 Mar 2017 20:30:56 -0500 merge with stable
Augie Fackler <raf@durin42.com> [Thu, 02 Mar 2017 20:30:56 -0500] rev 31140
merge with stable
Thu, 02 Mar 2017 20:19:45 -0500 Added signature for changeset 25703b624d27 stable
Augie Fackler <raf@durin42.com> [Thu, 02 Mar 2017 20:19:45 -0500] rev 31139
Added signature for changeset 25703b624d27
Thu, 02 Mar 2017 20:19:43 -0500 Added tag 4.1.1 for changeset 25703b624d27 stable
Augie Fackler <raf@durin42.com> [Thu, 02 Mar 2017 20:19:43 -0500] rev 31138
Added tag 4.1.1 for changeset 25703b624d27
Thu, 02 Mar 2017 20:07:35 -0500 merge with i18n stable 4.1.1
Augie Fackler <raf@durin42.com> [Thu, 02 Mar 2017 20:07:35 -0500] rev 31137
merge with i18n
Thu, 02 Mar 2017 11:08:20 -0300 i18n-pt_BR: synchronized with 7074589cf22a stable
Wagner Bruna <wbruna@softwareexpress.com.br> [Thu, 02 Mar 2017 11:08:20 -0300] rev 31136
i18n-pt_BR: synchronized with 7074589cf22a
Wed, 01 Mar 2017 16:43:22 +0900 i18n-ja: synchronized with 7074589cf22a stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Wed, 01 Mar 2017 16:43:22 +0900] rev 31135
i18n-ja: synchronized with 7074589cf22a
Wed, 01 Mar 2017 19:51:05 -0800 revert: remove set(mf) because it's O(manifest)
Durham Goode <durham@fb.com> [Wed, 01 Mar 2017 19:51:05 -0800] rev 31134
revert: remove set(mf) because it's O(manifest) The revert code had a 'set(manifest)' line in it, which has a runtime equivalent to the size of the manifest. With alternative manifest implementations, like treemanifest, this can be extra expensive. Let's rewrite it to be O(changes) instead of O(manifest size).
Mon, 13 Feb 2017 14:05:24 +0100 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com> [Mon, 13 Feb 2017 14:05:24 +0100] rev 31133
share: add --relative flag to store a relative path to the source Storing a relative path the source repository is useful when exporting repositories over the network or when they're located on external drives where the mountpoint isn't always fixed. Currently, Mercurial interprets paths in `.hg/shared` relative to $PWD. I suspect this is very much unintentional, and you have to manually edit `.hg/shared` in order to trigger this behaviour. However, on the off chance that someone might rely on it, I added a new capability called 'relshared'. In addition, this makes earlier versions of Mercurial fail with a graceful error. I should note that I haven't tested this patch on Windows.
Wed, 15 Feb 2017 11:49:12 -0800 minirst: support passing admonitions into findadmonitions() and parse()
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 15 Feb 2017 11:49:12 -0800] rev 31132
minirst: support passing admonitions into findadmonitions() and parse() This will allow consumers to declare a custom list of admonitions to parse. Without this patch, custom admonitions would get removed when prunecomments() is run. We could add an argument controlling whether prunecomments() is run. However, it is better to convert the "paragraph" block to an "admonition" block so consumers don't have to parse for custom admonitions.
Wed, 15 Feb 2017 11:47:14 -0800 minirst: dynamically compile admonitions regexp
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 15 Feb 2017 11:47:14 -0800] rev 31131
minirst: dynamically compile admonitions regexp Currently, parsing admonitions uses a static regular expression created from a pre-defined list of admonitions. A future patch will introduce a feature that needs to parse custom admonitions. Prepare for this by compiling the admonitions regular expression during each function invocation. Strictly speaking, there is a slight performance loss here. But we only run this code as part of displaying help text. I don't think the loss will be noticeable and I don't think we care if it were.
Wed, 15 Feb 2017 16:42:17 -0800 minirst: detect bullet lists using asterisks
Gregory Szorc <gregory.szorc@gmail.com> [Wed, 15 Feb 2017 16:42:17 -0800] rev 31130
minirst: detect bullet lists using asterisks Previously, the "bullet" regular expression excluded the asterisk ('*') as a character denoting a bulleted list. Why I'm not sure because the asterisk seems to be the canonical bullet character in reST these days. This patch makes asterisk-prefixed lines parse as bulleted lists.
Wed, 01 Mar 2017 20:22:04 +0100 color: update the help table
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 01 Mar 2017 20:22:04 +0100] rev 31129
color: update the help table We also need to reference the new topic in the great old help table.
Sat, 25 Feb 2017 14:09:55 +0900 ui: remove superfluous indent in _write()
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Feb 2017 14:09:55 +0900] rev 31128
ui: remove superfluous indent in _write()
Sat, 18 Feb 2017 17:37:52 +0900 smartset: reorder initialization of baseset in more intuitive way
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Feb 2017 17:37:52 +0900] rev 31127
smartset: reorder initialization of baseset in more intuitive way What we want to do is to assign either _set or _list per the given data type.
Tue, 28 Feb 2017 20:23:10 +0100 config: update the Windows example config file
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Feb 2017 20:23:10 +0100] rev 31126
config: update the Windows example config file We move from the color extensions to the 'ui.color' config.
Tue, 21 Feb 2017 22:53:38 +0100 help: use 'churn' instead of 'color' as an example extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 21 Feb 2017 22:53:38 +0100] rev 31125
help: use 'churn' instead of 'color' as an example extension The 'color' extensions is now deprecated.
Tue, 21 Feb 2017 22:17:33 +0100 config: suggest the 'ui.color' instead of the 'color' extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 21 Feb 2017 22:17:33 +0100] rev 31124
config: suggest the 'ui.color' instead of the 'color' extension The extensions is deprecated now so we should offer the core way to handle color instead.
Tue, 21 Feb 2017 20:04:55 +0100 color: update main documentation
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 21 Feb 2017 20:04:55 +0100] rev 31123
color: update main documentation Now that the feature no longer lives in the extension, we document it in the help of the core config. This include the new 'ui.color' option introduced in the previous changesets. As a result the color extensions can now be deprecated. This is a documentation patch only; color is still disabled by default.
Tue, 28 Feb 2017 20:12:08 +0100 pager: drop the 'color' dependant code
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Feb 2017 20:12:08 +0100] rev 31122
pager: drop the 'color' dependant code The 'color' implementation is in core and no longer wrap '_runcommand'. We drop the extra complexity.
Sat, 25 Feb 2017 19:43:14 +0100 color: cleanup 'debugcolor' logic
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 25 Feb 2017 19:43:14 +0100] rev 31121
color: cleanup 'debugcolor' logic Now that style are carried by the 'ui' object, we no longer need complicated logic to restore the original style. We just need to copy the 'ui' and work on the copied version.
Tue, 21 Feb 2017 18:41:37 +0100 color: move 'debugcolor' into the 'debugcommands' modules
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 21 Feb 2017 18:41:37 +0100] rev 31120
color: move 'debugcolor' into the 'debugcommands' modules This is the last bits we needed to move out of the extensions. 'hgext/color.py' now only contains logic to changes the default color behavior to 'auto'. However, more cleanups are on the way and we need to document the new config directly in core.
Tue, 28 Feb 2017 11:13:25 -0800 merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Tue, 28 Feb 2017 11:13:25 -0800] rev 31119
merge with stable
Sat, 25 Feb 2017 12:48:50 +0900 worker: flush messages written by child processes before exit stable
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Feb 2017 12:48:50 +0900] rev 31118
worker: flush messages written by child processes before exit I found some child outputs were lost while testing the previous patch. Since os._exit() does nothing special, we need to do that explicitly.
Sat, 25 Feb 2017 12:33:37 +0900 worker: add basic test to ensure child processes are managed well stable
Yuya Nishihara <yuya@tcha.org> [Sat, 25 Feb 2017 12:33:37 +0900] rev 31117
worker: add basic test to ensure child processes are managed well This should catch the bug fixed by "worker: ignore meaningless exit status indication returned by os.waitpid()." Before, worker.py was untested since test repositories are relatively small.
Sun, 06 Nov 2016 20:16:54 +0100 color: rename '_styles' to '_defaultstyles' for clarity
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 06 Nov 2016 20:16:54 +0100] rev 31116
color: rename '_styles' to '_defaultstyles' for clarity This should make it clear the dict is only used for new config. Extensions should not modify it directly anyway since we have 'extraloader' logic for loading '_styles' too.
Sun, 06 Nov 2016 20:16:01 +0100 color: move 'styles' definition on the 'ui' object
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 06 Nov 2016 20:16:01 +0100] rev 31115
color: move 'styles' definition on the 'ui' object Same logic as for '_terminfoparams'. The content depends on the config so it should be specific to each 'ui instance.
Sun, 06 Nov 2016 20:10:53 +0100 color: pass 'ui' to 'win32print'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sun, 06 Nov 2016 20:10:53 +0100] rev 31114
color: pass 'ui' to 'win32print' Same logic as before,'win32print' relies on some data we will move on the 'ui' object soon, we update the API beforehand for clarity.
Sat, 25 Feb 2017 15:00:51 +0100 color: move the dict with terminfo parameters on the ui object
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 25 Feb 2017 15:00:51 +0100] rev 31113
color: move the dict with terminfo parameters on the ui object This dictionnary is affected by the content of the config, so we should have one for each ui config. We rename the global dict to '_baseterminfoparams' to make the situation clearer.
Sat, 25 Feb 2017 15:00:44 +0100 color: add ui to effect rendering
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 25 Feb 2017 15:00:44 +0100] rev 31112
color: add ui to effect rendering We'll carry more and more color specific data on the ui object. This will help isolating different color configuration from each other. For example repository config might configure special style that should not affect other ui object. The first step is to make sure the ui object is available were we will needs it.
Sat, 25 Feb 2017 18:34:01 +0100 color: initialize color for the localrepo ui
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 25 Feb 2017 18:34:01 +0100] rev 31111
color: initialize color for the localrepo ui The 'ui' object dedicated to a 'localrepo' is independent from the one available in dispatch (and 'uisetup'). In addition, it is created from the 'baseui' (apparently for good reason). As a result, we need to run the color setup on it after the local repository config is read. This was overlooked when the rest of the initialization changed but did not had impact yet because all setup is still global. We fix it before it is too late.
Sat, 25 Feb 2017 19:44:23 +0100 color: add a 'ui.color' option to control color behavior
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Sat, 25 Feb 2017 19:44:23 +0100] rev 31110
color: add a 'ui.color' option to control color behavior This new option control whether or not color will be used. It mirror the behavior of '--color'. I usually avoid adding new option to '[ui]' as the section is already filled with many option. However, I feel like 'color' is central enough to deserves a spot in this '[ui]' section. For now the option is not documented so it is still marked as experimental. Once it get documented and official, we should be able to deprecate the color extensions. There is more cleanup to do before that documentation is written, but we need this option early to made them. Having that option will allow for more cleanup of the initialisation process and proper separation between color configuration.
Tue, 28 Feb 2017 11:42:07 +0100 color: reinvent dictionary
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 28 Feb 2017 11:42:07 +0100] rev 31109
color: reinvent dictionary move the module lever dictionary declaration to a more standard (and practical indentation)
Sun, 19 Feb 2017 01:16:45 +0900 chg: deduplicate error handling of ui.system()
Yuya Nishihara <yuya@tcha.org> [Sun, 19 Feb 2017 01:16:45 +0900] rev 31108
chg: deduplicate error handling of ui.system() This moves 'onerr' handling from low-level util.system() to higher level, which seems better API separation.
Sun, 19 Feb 2017 01:00:10 +0900 chg: refactor ui.system() to be partly overridden
Yuya Nishihara <yuya@tcha.org> [Sun, 19 Feb 2017 01:00:10 +0900] rev 31107
chg: refactor ui.system() to be partly overridden Since fd598149112b changed the signature of ui.system(), chgui.system() should have been updated. This patch factors out the util.system() call so that chg can override how a shell command is executed.
Tue, 21 Feb 2017 18:22:07 +0100 color: have the 'ui' object carry the '_colormode' directly
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 21 Feb 2017 18:22:07 +0100] rev 31106
color: have the 'ui' object carry the '_colormode' directly Before this changeset, the value was carried by the class to work around limitation of the extensions initialisation. Now that the initialisation is cleanly handled in 'dispatch', we can drop this work around.
Tue, 21 Feb 2017 18:20:12 +0100 color: move triggering of the initialisation logic in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 21 Feb 2017 18:20:12 +0100] rev 31105
color: move triggering of the initialisation logic in core We now run the color initialisation as part of the standard dispatch. This is opening the way for multiple cleanups since we now have access to the multiple 'ui' object and we'll be able to see difference between global and local config. This cleanup will arrive in later changesets. As a side effect, the '--color' flag is now working without the extension. Since we now properly initialize color for each ui idependently, we get a warning message twice.
Tue, 21 Feb 2017 18:09:21 +0100 color: add the definition of '--color' in core
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 21 Feb 2017 18:09:21 +0100] rev 31104
color: add the definition of '--color' in core If we want to be able to move the initialisation in core, we need core to be aware of that '--color' flag at all time. So we now have the definition in core. That flag is currently unprocessed without the extensions (will be fixed soon). In addition the default value for this flag in core is 'never'. Enabling the extensions change that default value to 'auto'.
Tue, 21 Feb 2017 17:51:43 +0100 color: handle 'ui.plain()' directly in mode setup
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 21 Feb 2017 17:51:43 +0100] rev 31103
color: handle 'ui.plain()' directly in mode setup If 'ui.plain()' is set we should not colorize. We move that logic into the function that determine and setup the color mode. As all other code respect the resulting mode this will be equivalent.
Tue, 21 Feb 2017 17:50:04 +0100 color: move git-subrepo support into the subrepo module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Tue, 21 Feb 2017 17:50:04 +0100] rev 31102
color: move git-subrepo support into the subrepo module Now that all ui instance carry a '_colormode' attribute, we can access and comply to it directly in the subrepo code. The actual implementation could probably be a bit smarter, but we stick close to the current one for the sake of simplicity.
Thu, 22 Dec 2016 14:30:46 +0100 color: move 'modesetup' into the core module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 14:30:46 +0100] rev 31101
color: move 'modesetup' into the core module Yet another piece of code moving from the extensions to the module in core!
Thu, 22 Dec 2016 14:17:52 +0100 color: move 'terminfosetup' into the core module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 14:17:52 +0100] rev 31100
color: move 'terminfosetup' into the core module Another step closer to have all the logic living in core
Sat, 25 Feb 2017 21:13:59 -0500 subrepo: run the repo decoders when archiving
Matt Harbison <matt_harbison@yahoo.com> [Sat, 25 Feb 2017 21:13:59 -0500] rev 31099
subrepo: run the repo decoders when archiving The decoders were already run by default for the main repo, so this seemed like an oversight. The extdiff extension has been using 'archive' since 68822b7cdd01 to support -S, and a colleague noticed that after diffing, making changes, and closing it, the line endings were wrong for the diff-tool modified files in the subrepository. (Files in the parent repo were correct, with the same .hgeol settings.) The editor (Visual Studio in this case) reloads the file, but doesn't notice the EOL change. It still adds new lines with the original EOL setting, and the file ends up inconsistent. Without this change, the first file `cat`d in the test prints '\r (esc)' EOL, but the second doesn't on Windows or Linux.
Sat, 25 Feb 2017 21:44:34 -0500 wix: include the help for pager
Matt Harbison <matt_harbison@yahoo.com> [Sat, 25 Feb 2017 21:44:34 -0500] rev 31098
wix: include the help for pager Similar (I assume) to 65d2538ac993.
Sun, 26 Feb 2017 10:16:47 -0800 manifest: check 'if x is None' instead of 'if not x'
Durham Goode <durham@fb.com> [Sun, 26 Feb 2017 10:16:47 -0800] rev 31097
manifest: check 'if x is None' instead of 'if not x' The old code here would end up executing __len__ on a tree manifest to determine if 'not _data' was true or not. This was very expensive on large repos. Since this function just cares about memoization, we can just check 'if _data is None' instead and save a bunch of time.
Sat, 25 Feb 2017 03:42:43 +0530 pager: add support to --patch, --list and --stat options of hg shelve
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 25 Feb 2017 03:42:43 +0530] rev 31096
pager: add support to --patch, --list and --stat options of hg shelve
Mon, 20 Feb 2017 12:42:35 +0100 color: drop the 'colorui' class
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 20 Feb 2017 12:42:35 +0100] rev 31095
color: drop the 'colorui' class Now that all logics formally bared by 'colorui' have been moved to the main ui class, that class is empty and can be dropped. As a nice side effect we can get rid of the baroque Initialization associated to it. There was much rejoicing.
Mon, 20 Feb 2017 12:42:23 +0100 color: move 'write-err' logic to the core ui class
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 20 Feb 2017 12:42:23 +0100] rev 31094
color: move 'write-err' logic to the core ui class This is similar to what we needed for 'write', we move the logic from the extension to the core class. Beside the dispatch to 'win32print', we just apply label to the argument.
Fri, 24 Feb 2017 19:53:41 +0100 ui: extract low level part of 'write_err' in its own method
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 24 Feb 2017 19:53:41 +0100] rev 31093
ui: extract low level part of 'write_err' in its own method Same as for 'write' and '_write' we needs it available for some of the color logic.
Fri, 24 Feb 2017 19:28:45 +0100 ui: extract buffer write from protect and timed 'write_err' output
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 24 Feb 2017 19:28:45 +0100] rev 31092
ui: extract buffer write from protect and timed 'write_err' output That subcall to 'self.write' is never doing actual write but only store things in buffers. So we do not need to protect it for exception not to time its execution. This will make it easier to extract a '_write_err' function as we did for 'write'.
Mon, 20 Feb 2017 12:31:39 +0100 color: move 'write' logic to the core ui class
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 20 Feb 2017 12:31:39 +0100] rev 31091
color: move 'write' logic to the core ui class One more step, the support for writing color is not directly in core. No behavior change for the default case ('_colormode' = None). Here are the details of what we have to change to the core method: * apply to 'self.label' to input in the buffered case * dispatch to 'win32print' when applicable * apply to 'self.label' to input when applicable
Fri, 24 Feb 2017 19:27:00 +0100 ui: extract the low level part of 'write' in a dedicated function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 24 Feb 2017 19:27:00 +0100] rev 31090
ui: extract the low level part of 'write' in a dedicated function We are about to add some extra logic related to color. That logic will need to access the low level layer of ui doing the actual write to a stream. (eg: 'win32print'). We extract this logic into a private method for this purpose.
Fri, 24 Feb 2017 21:34:07 +0100 color: add multiple messages input support to 'win32print'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 24 Feb 2017 21:34:07 +0100] rev 31089
color: add multiple messages input support to 'win32print' All other function doing writes support any number of input message. For simplicity, we make 'win32print' able to do the same.
Fri, 24 Feb 2017 21:31:47 +0100 color: clarify name of an argument of 'win32print'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 24 Feb 2017 21:31:47 +0100] rev 31088
color: clarify name of an argument of 'win32print' In the current code, the function called to write happens to the 'orig' version of the method calling 'win32print' (obtained with a 'super' call). However, the variable could have a better name. That will be useful when we'll stop having inheritance in play.
Thu, 23 Feb 2017 19:45:32 +0100 color: move the 'colorlabel' call to the core 'ui' class
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 23 Feb 2017 19:45:32 +0100] rev 31087
color: move the 'colorlabel' call to the core 'ui' class This bring us closer to supporting color in core natively. Core already have a 'label' method that was a no-op. We update its to call the new 'colorlabel' function. Behavior is unchanged when colormode = None.
Thu, 23 Feb 2017 19:10:24 +0100 color: move the 'colorlabel' function in the core module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 23 Feb 2017 19:10:24 +0100] rev 31086
color: move the 'colorlabel' function in the core module The extract code is relocated in core.
Thu, 23 Feb 2017 19:00:26 +0100 color: extract the label code into its own function
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 23 Feb 2017 19:00:26 +0100] rev 31085
color: extract the label code into its own function We extract the logic into a function. This will allow us to move the logic into the core 'color' module and later call it directly from core.
Mon, 20 Feb 2017 12:13:23 +0100 color: inline the 'showlabel' method
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 20 Feb 2017 12:13:23 +0100] rev 31084
color: inline the 'showlabel' method This function is quite simple and only have one call siteā€¦ located a handful of line under the definition. We inline the function for the sake of simplicity. One of the motivation to do that now is that it reduce the amount of new method we will have to add to the core 'ui' class for color support.
Mon, 20 Feb 2017 12:12:08 +0100 color: move '_colormode' to the core 'ui' class
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 20 Feb 2017 12:12:08 +0100] rev 31083
color: move '_colormode' to the core 'ui' class Having all 'ui' objects aware of 'color' allows us to update the core code to handle color. The mode will stay 'None' in the default case so that will not introduce any changes.
Tue, 17 Jan 2017 17:25:48 +0100 hgweb: explictly pass basectx in webutil.diffs
Denis Laxalde <denis.laxalde@logilab.fr> [Tue, 17 Jan 2017 17:25:48 +0100] rev 31082
hgweb: explictly pass basectx in webutil.diffs There's only one case where `basectx` parameter is None (over two usages), so it's probably not worth handling the special case as it makes code-reading harder. Along the way, use ctx.p1() instead of checking for ctx.parents() being empty which should not occur.
Wed, 22 Feb 2017 18:26:12 -0800 serve: mark --stdio and --cmdserver as "(ADVANCED)" flags
Jun Wu <quark@fb.com> [Wed, 22 Feb 2017 18:26:12 -0800] rev 31081
serve: mark --stdio and --cmdserver as "(ADVANCED)" flags This will hide them from the default --help output.
Tue, 01 Nov 2016 14:50:45 +0000 help: hide command line options marked as "advanced"
Jun Wu <quark@fb.com> [Tue, 01 Nov 2016 14:50:45 +0000] rev 31080
help: hide command line options marked as "advanced" Previously, we have keywords like "(DEPRECATED)" and "(EXPERIMENTAL)" to hide command line options in non-verbose help output. However, sometimes an option is neither deprecated nor experimental. It's well-tested and working, but just not designed to average users. This patch adds a keyword "(ADVANCED)" to fit in such use cases. Thanks rom1dep for the suggestion of the word "advanced".
Thu, 23 Feb 2017 21:27:25 +0900 pager: do not try to run an empty pager command
Yuya Nishihara <yuya@tcha.org> [Thu, 23 Feb 2017 21:27:25 +0900] rev 31079
pager: do not try to run an empty pager command If pagercmd is explicitly set to '', the pager process would exit silently and the output would be lost. We'd better disable the pager in such case.
Thu, 23 Feb 2017 21:20:26 +0900 graphlog: restore pager lost at 1cec1d863008
Yuya Nishihara <yuya@tcha.org> [Thu, 23 Feb 2017 21:20:26 +0900] rev 31078
graphlog: restore pager lost at 1cec1d863008
Wed, 22 Feb 2017 12:09:17 +0100 gitweb: add "more" and "less" navigation links in filelog template
Denis Laxalde <denis.laxalde@logilab.fr> [Wed, 22 Feb 2017 12:09:17 +0100] rev 31077
gitweb: add "more" and "less" navigation links in filelog template
Mon, 16 Jan 2017 17:14:36 +0100 context: also return ancestor's line range in blockancestors
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 16 Jan 2017 17:14:36 +0100] rev 31076
context: also return ancestor's line range in blockancestors
Mon, 16 Jan 2017 17:08:25 +0100 context: add a followfirst flag to blockancestors
Denis Laxalde <denis.laxalde@logilab.fr> [Mon, 16 Jan 2017 17:08:25 +0100] rev 31075
context: add a followfirst flag to blockancestors
Mon, 20 Feb 2017 18:40:42 +0530 py3: use pycompat.fsencode() to convert __file__ to bytes
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 20 Feb 2017 18:40:42 +0530] rev 31074
py3: use pycompat.fsencode() to convert __file__ to bytes __file__ returns unicodes on Python 3. This patch uses pycompat.fsencode() to convert them to bytes.
Wed, 22 Feb 2017 10:14:18 -0800 wireproto: remove unused code
Jun Wu <quark@fb.com> [Wed, 22 Feb 2017 10:14:18 -0800] rev 31073
wireproto: remove unused code Removed an unused line introduced by f3807a135e43.
Thu, 22 Dec 2016 06:18:45 +0100 color: set initial default value for 'colormode' to None
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 06:18:45 +0100] rev 31072
color: set initial default value for 'colormode' to None This should not introduce any behavior changes when using the color extension. In practive, the colormode will be setup at early at run time to the proper value (from config and environment). We do this change as this gets us closer of a state were we can have all the mechanisms associated to color in core with the feature disabled by default.
Thu, 22 Dec 2016 13:19:12 +0100 color: minor reversal of two conditional clause for clarity
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 13:19:12 +0100] rev 31071
color: minor reversal of two conditional clause for clarity Another minor cleanup while reading the code. The two branches of the conditional have similar complexity so we go for the order that give us the simplest condition (we drop the negation).
Thu, 16 Feb 2017 10:52:27 +0100 color: merge two identical 'for' loops
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 16 Feb 2017 10:52:27 +0100] rev 31070
color: merge two identical 'for' loops The previous changeset made it clear that we are iterating twice on the same items. We gather the two loops into a single one.
Thu, 22 Dec 2016 13:06:53 +0100 color: minor simplification of some terminfo setup code
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 13:06:53 +0100] rev 31069
color: minor simplification of some terminfo setup code No logic change is introduced. The previous code were using a 'dict.update' with a complex generator. That was a bit confusing to read and not so compact. Instead we now use an explicit loop and conditional for the sake of clarity. This also allow for more simplification coming in the next changeset.
Thu, 22 Dec 2016 06:17:40 +0100 color: make a test for curse availability explicite
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 06:17:40 +0100] rev 31068
color: make a test for curse availability explicite We won't use terminfo when curse failed to load. Before this change, we were doing an indirect test, relying on the fact some variable ('_terminfo_params') would be empty if curses failed to load. We update the code to be more explicit and directly checks if we managed to load the curse module.
Thu, 22 Dec 2016 03:11:19 +0100 color: move 'win32' declaration to the core module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 03:11:19 +0100] rev 31067
color: move 'win32' declaration to the core module This is another part of moving color implementation into core. before we can move the advance logic, we need to move the basic definition and building bricks. This is one more step on that road.
Tue, 21 Feb 2017 16:29:31 -0800 smartset: preserve istopo for baseset operations
Jun Wu <quark@fb.com> [Tue, 21 Feb 2017 16:29:31 -0800] rev 31066
smartset: preserve istopo for baseset operations This is a follow-up of "smartset: use native set operations as fast paths". It's more correct to just preserve the "istopo" information for "&" and "-" operations, like what filteredset does.
Thu, 23 Feb 2017 11:23:17 -0800 record: update help to describe ui.interface stable
eloimorlaas <eloimorlaas@fb.com> [Thu, 23 Feb 2017 11:23:17 -0800] rev 31065
record: update help to describe ui.interface hg help record was not accurate if using another interface than the text one
Sat, 25 Feb 2017 16:57:21 +0530 ui: replace obsolete default-push with default:pushurl (issue5485) stable
Rishabh Madan <rishabhmadan96@gmail.com> [Sat, 25 Feb 2017 16:57:21 +0530] rev 31064
ui: replace obsolete default-push with default:pushurl (issue5485) Default-push has been deprecated in favour of default:pushurl. But "hg clone" still inserts this in every hgrc file it creates. This patch updates the message by replacing default-push with default:pushurl and also makes the necessary changes to test files.
Sat, 25 Feb 2017 01:07:52 +0900 worker: ignore meaningless exit status indication returned by os.waitpid() stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sat, 25 Feb 2017 01:07:52 +0900] rev 31063
worker: ignore meaningless exit status indication returned by os.waitpid() Before this patch, worker implementation assumes that os.waitpid() with os.WNOHANG returns '(0, 0)' for still running child process. This is explicitly specified as below in Python API document. os.WNOHANG The option for waitpid() to return immediately if no child process status is available immediately. The function returns (0, 0) in this case. On the other hand, POSIX specification doesn't define the "stat_loc" value returned by waitpid() with WNOHANG for such child process. http://pubs.opengroup.org/onlinepubs/9699919799/functions/waitpid.html CPython implementation for os.waitpid() on POSIX doesn't take any care of this gap, and this may cause unexpected "exit status indication" even on POSIX conformance platform. For example, os.waitpid() with os.WNOHANG returns non-zero "exit status indication" on FreeBSD. This implies os.kill() with own pid or sys.exit() with non-zero exit code, even if no child process fails. To ignore meaningless exit status indication returned by os.waitpid(), this patch skips subsequent steps forcibly, if os.waitpid() returns 0 as pid. This patch also arranges examination of 'p' value for readability. FYI, there are some issues below about this behavior reported for CPython. https://bugs.python.org/issue21791 https://bugs.python.org/issue27808
Tue, 07 Feb 2017 17:13:25 -0500 pager: add a config knob to just globally turn off the pager
Augie Fackler <augie@google.com> [Tue, 07 Feb 2017 17:13:25 -0500] rev 31062
pager: add a config knob to just globally turn off the pager
Tue, 07 Feb 2017 00:07:53 -0500 pager: move most help to a new help topic and deprecate extension
Augie Fackler <augie@google.com> [Tue, 07 Feb 2017 00:07:53 -0500] rev 31061
pager: move most help to a new help topic and deprecate extension
Tue, 21 Feb 2017 14:20:05 -0500 dispatch: rearrange 'unknown command' code to better employ pager
Augie Fackler <augie@google.com> [Tue, 21 Feb 2017 14:20:05 -0500] rev 31060
dispatch: rearrange 'unknown command' code to better employ pager dispatch calls help like a ninja if you give it a truly unknown command, and that might want to be paged. If it gets paged, then the 'hg: unknown command' text gets eaten by a grue, unless we call the pager first. This change rearranges the codepaths so we can safely only invoke the pager in the case where we'll have long output from the help command code, rather than just a short message like "did you mean stat instead of start" or "fetch is provided by the fetch extension".
Tue, 21 Feb 2017 14:17:31 -0500 help: move rst formatting of help documents into help.py
Augie Fackler <augie@google.com> [Tue, 21 Feb 2017 14:17:31 -0500] rev 31059
help: move rst formatting of help documents into help.py This slight refactor will help me improve the 'unknown command' experience in our new glorious pager future.
Tue, 21 Feb 2017 11:06:02 -0500 outgoing: avoid running pager until we're actually showing changes
Augie Fackler <augie@google.com> [Tue, 21 Feb 2017 11:06:02 -0500] rev 31058
outgoing: avoid running pager until we're actually showing changes Consistent with the new behavior of incoming in the previous patch.
Tue, 21 Feb 2017 10:53:13 -0500 incoming: delay pager activation until right before printing changes
Augie Fackler <augie@google.com> [Tue, 21 Feb 2017 10:53:13 -0500] rev 31057
incoming: delay pager activation until right before printing changes This prevents authentication and other brief status messages from being paged.
Sat, 18 Feb 2017 21:30:28 +1100 histedit: modify rollup to discard date from the rollup commit (issue4820)
Ben Schmidt <insightfuls@users.noreply.github.com> [Sat, 18 Feb 2017 21:30:28 +1100] rev 31056
histedit: modify rollup to discard date from the rollup commit (issue4820) This change adjusts and documents the new behaviour of 'roll'. It now fits nicely with the behaviour of 'commit --amend' and the 'edit' action, by discarding the date as well as the commit message of the second commit. Previously it used the later date, like 'fold', but this often wasn't desirable, for example, in the common use case of using 'roll' to add forgotten changes to a changeset (because 'hg add' was previously forgotten or not all changes were identified while using 'hg record').
Sat, 18 Feb 2017 21:30:28 +1100 histedit: improve documentation and behaviour of dates
Ben Schmidt <insightfuls@users.noreply.github.com> [Sat, 18 Feb 2017 21:30:28 +1100] rev 31055
histedit: improve documentation and behaviour of dates This clarifies in the histedit documentation that the 'edit' action preserves the date and that the 'fold' action uses the later date. The documentation was previously silent on this issue which left users in doubt.
Tue, 21 Feb 2017 01:21:00 +0900 localrepo: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 21 Feb 2017 01:21:00 +0900] rev 31054
localrepo: check HG_PENDING strictly Before this patch, checking HG_PENDING for changelog in localrepo.py might cause unintentional reading unrelated '00changelog.i.a' in, because HG_PENDING is checked by str.startswith(). An external hook spawned by inner repository in nested ones satisfies this condition. This patch uses txnutil.mayhavepending() to check HG_PENDING strictly. BTW, this patch may cause failure of bisect in the repository of Mercurial itself, if examination at bisecting assumes that an external hook can see all pending changes while nested transactions across repositories. This invisibility issue will be fixed by subsequent patch, which allows HG_PENDING to refer multiple repositories.
Tue, 21 Feb 2017 01:21:00 +0900 phases: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 21 Feb 2017 01:21:00 +0900] rev 31053
phases: check HG_PENDING strictly Before this patch, checking HG_PENDING in phases.py might cause unintentional reading unrelated 'phaseroots.pending' in, because it just examines existence of HG_PENDING environment variable. This patch uses txnutil.trypending() to check HG_PENDING strictly. BTW, this patch may cause failure of bisect in the repository of Mercurial itself, if examination at bisecting assumes that an external hook can see all pending changes while nested transactions across repositories. This invisibility issue will be fixed by subsequent patch, which allows HG_PENDING to refer multiple repositories.
Tue, 21 Feb 2017 01:21:00 +0900 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 21 Feb 2017 01:21:00 +0900] rev 31052
bookmarks: check HG_PENDING strictly Before this patch, checking HG_PENDING in bookmarks.py might cause unintentional reading unrelated '.hg/bookmarks.pending' in, because it just examines existence of HG_PENDING environment variable. This patch uses txnutil.trypending() to check HG_PENDING strictly. This patch also changes share extension. Enabling share extension (+ bookmark sharing) makes bookmarks._getbkfile() receive repo to be shared (= "srcrepo"). On the other hand, HG_PENDING always refers current working repo (= "currepo"), and bookmarks.pending is written only into currepo. Therefore, we should try to read .hg/bookmarks.pending of currepo in at first. If it doesn't exist, we try to read .hg/bookmarks of srcrepo in. Even after this patch, an external hook spawned in currepo can't see pending changes in currepo via srcrepo, even though such changes become visible after closing transaction, because there is no easy and cheap way to know existence of pending changes in currepo via srcrepo. Please see https://www.mercurial-scm.org/wiki/SharedRepository, too. BTW, this patch may cause failure of bisect in the repository of Mercurial itself, if examination at bisecting assumes that an external hook can see all pending changes while nested transactions across repositories. This invisibility issue will be fixed by subsequent patch, which allows HG_PENDING to refer multiple repositories.
Tue, 21 Feb 2017 01:20:59 +0900 tests: make directory to prevent test process from going out of $TESTTMP
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 21 Feb 2017 01:20:59 +0900] rev 31051
tests: make directory to prevent test process from going out of $TESTTMP Before this patch, test process for test-bookmarks.t goes out of $TESTTMP at "cd .." before creation of "orderrepo" repository. To prevent test process from going out of $TESTTMP, this patch makes directory "repo" sub-directory and executes almost all test scenarios in test-bookmarks.t under it. This is preparation for new test added in subsequent patch.
Tue, 21 Feb 2017 01:20:59 +0900 txnutil: factor out the logic to read file in according to HG_PENDING
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Tue, 21 Feb 2017 01:20:59 +0900] rev 31050
txnutil: factor out the logic to read file in according to HG_PENDING This patch adds new file txnutil.py, because: - transaction.py is too large to import small utility logic - scmutil.py or so causes cyclic importing in phases.py mayhavepending() is defined separately for convenience in subsequent patch.
Mon, 20 Feb 2017 01:54:07 -0800 repoview: separate cache hash computation from cache reading
Stanislau Hlebik <stash@fb.com> [Mon, 20 Feb 2017 01:54:07 -0800] rev 31049
repoview: separate cache hash computation from cache reading This change will make it easier for extensions to use another cache hash.
Mon, 20 Feb 2017 18:27:29 +0100 tests: make test suite more immune to environment variables
Dr Rainer Woitok <rainer.woitok@gmail.com> [Mon, 20 Feb 2017 18:27:29 +0100] rev 31048
tests: make test suite more immune to environment variables Plenty of tests break when "make tests" is run while environment variables "HGPLAIN" or "HGPLAINEXCEPT" are set (test "test-obsolete- checkheads.t" is just a single example). This patch causes script "run-tests.py" to also remove these two variables from the environment the tests are executed in.
Mon, 06 Feb 2017 23:08:49 -0500 version: enable pager if --verbose is specified
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:08:49 -0500] rev 31047
version: enable pager if --verbose is specified `hg version` output is very short without --verbose, but with --verbose it tends to scroll off the user's screen.
Mon, 06 Feb 2017 23:07:16 -0500 tags: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:07:16 -0500] rev 31046
tags: enable pager
Mon, 06 Feb 2017 23:06:59 -0500 summary: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:06:59 -0500] rev 31045
summary: enable pager
Mon, 06 Feb 2017 23:06:32 -0500 status: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:06:32 -0500] rev 31044
status: enable pager
Mon, 06 Feb 2017 23:06:10 -0500 resolve: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:06:10 -0500] rev 31043
resolve: enable pager
Mon, 06 Feb 2017 23:06:01 -0500 paths: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:06:01 -0500] rev 31042
paths: enable pager
Mon, 06 Feb 2017 23:04:44 -0500 outgoing: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:04:44 -0500] rev 31041
outgoing: enable pager The structure here is similar to incoming, and requires similar treatment.
Mon, 06 Feb 2017 23:04:26 -0500 manifest: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:04:26 -0500] rev 31040
manifest: enable pager
Mon, 06 Feb 2017 23:04:10 -0500 locate: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:04:10 -0500] rev 31039
locate: enable pager
Mon, 06 Feb 2017 23:03:48 -0500 incoming: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:03:48 -0500] rev 31038
incoming: enable pager The design of incoming means we have to activate the pager in several places, depending on which codepath gets chosen.
Mon, 06 Feb 2017 23:09:21 -0500 help: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:09:21 -0500] rev 31037
help: enable pager
Mon, 06 Feb 2017 23:09:15 -0500 grep: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:09:15 -0500] rev 31036
grep: enable pager
Mon, 06 Feb 2017 23:02:48 -0500 files: enable pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:02:48 -0500] rev 31035
files: enable pager
Mon, 06 Feb 2017 23:01:42 -0500 config: activate pager if not starting an editor
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:01:42 -0500] rev 31034
config: activate pager if not starting an editor This demonstrates the power of the non-attend-based pager API.
Mon, 06 Feb 2017 23:57:21 -0500 qdiff: migrate to modern pager API
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:57:21 -0500] rev 31033
qdiff: migrate to modern pager API This results in the default pager-attend list being empty. Sadly, we can't let the code be that way, because some legacy extensions depend on hooking the pager's attend list at import time (and we'd like to not break them), and if the list is actually *empty* that triggers magic behavior in the extension that attends everything. Instead, we put a long, improbable command name as the only entry in the attend list.
Mon, 06 Feb 2017 22:59:25 -0500 log: migrate to modern pager API
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 22:59:25 -0500] rev 31032
log: migrate to modern pager API
Mon, 06 Feb 2017 22:58:54 -0500 export: migrate to modern pager API
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 22:58:54 -0500] rev 31031
export: migrate to modern pager API
Mon, 06 Feb 2017 22:58:26 -0500 diff: migrate to modern pager API
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 22:58:26 -0500] rev 31030
diff: migrate to modern pager API
Mon, 06 Feb 2017 22:57:52 -0500 cat: migrate to modern pager API
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 22:57:52 -0500] rev 31029
cat: migrate to modern pager API
Sun, 19 Feb 2017 15:09:41 -0500 annotate: start pager after we're sure we wont abort
Augie Fackler <augie@google.com> [Sun, 19 Feb 2017 15:09:41 -0500] rev 31028
annotate: start pager after we're sure we wont abort This avoids needlessly putting a short error message into the pager.
Sun, 19 Feb 2017 20:16:11 -0500 dispatch: consolidate pager flag handling to a single place
Augie Fackler <augie@google.com> [Sun, 19 Feb 2017 20:16:11 -0500] rev 31027
dispatch: consolidate pager flag handling to a single place This makes a little more sense, thanks to Martin for suggesting it.
Sun, 19 Feb 2017 20:12:52 -0500 ui: rename neverpager to disablepager
Augie Fackler <augie@google.com> [Sun, 19 Feb 2017 20:12:52 -0500] rev 31026
ui: rename neverpager to disablepager I agree this is a clearer name for this method.
Sun, 19 Feb 2017 20:00:18 +0900 scmutil: proxy revrange() through repo to break import cycles
Yuya Nishihara <yuya@tcha.org> [Sun, 19 Feb 2017 20:00:18 +0900] rev 31025
scmutil: proxy revrange() through repo to break import cycles This was one of the hardest import cycles as scmutil is widely used and revset functions are likely to depend on a variety of modules. New repo.anyrevs() does not expand user aliases by default to copy the behavior of the existing repo.revs(). I don't want to add new function to localrepository, but this function is quite similar to repo.revs() so it won't increase the complexity of the localrepository class so much.
Sun, 19 Feb 2017 18:19:33 +0900 revset: split language services to revsetlang module (API)
Yuya Nishihara <yuya@tcha.org> [Sun, 19 Feb 2017 18:19:33 +0900] rev 31024
revset: split language services to revsetlang module (API) New revsetlang module hosts parser, tokenizer, and miscellaneous functions working on parsed tree. It does not include functions for evaluation such as getset() and match(). 2288 mercurial/revset.py 684 mercurial/revsetlang.py 2972 total get*() functions are aliased since they are common in revset.py.
Sun, 19 Feb 2017 18:16:09 +0900 revset: import set classes directly from smartset module
Yuya Nishihara <yuya@tcha.org> [Sun, 19 Feb 2017 18:16:09 +0900] rev 31023
revset: import set classes directly from smartset module Follows up 1be65deb3d54.
Sat, 18 Feb 2017 18:00:01 +0900 help: add pointer how to narrow list of resolved/unresolved files (issue5469)
Yuya Nishihara <yuya@tcha.org> [Sat, 18 Feb 2017 18:00:01 +0900] rev 31022
help: add pointer how to narrow list of resolved/unresolved files (issue5469)
Sun, 19 Feb 2017 10:56:08 +0100 shelve: add -n/--name option to unshelve (issue5475)
liscju <piotr.listkiewicz@gmail.com> [Sun, 19 Feb 2017 10:56:08 +0100] rev 31021
shelve: add -n/--name option to unshelve (issue5475) This makes using shelve/unshelve more consistent because shelving can be done using name option and unshelving as well. Author of the idea of this improvement and solution is joshgold.
Sat, 18 Feb 2017 17:23:43 -0800 smartset: use native set operations as fast paths
Jun Wu <quark@fb.com> [Sat, 18 Feb 2017 17:23:43 -0800] rev 31020
smartset: use native set operations as fast paths For set operations like "&" and "-", where we know both basesets have their sets ready, and the first set is sorted, use the native Python set operations as a fast path. Note: "+" is not optimized as that will break the ordering. This leads to noticeable improvements on performance: revset | before | after | delta ---------------------------------------------------------------- draft() & draft() & draft() & draft() | 776 | 477 | -39% draft() + draft() + draft() + draft() | 2849 | 2864 | draft() - draft() + draft() - draft() | 943 | 240 | -75% draft() - draft() - draft() - draft() | 557 | 197 | -64% (time measured in microseconds)
Sat, 18 Feb 2017 16:30:07 -0800 smartset: add some doctests
Jun Wu <quark@fb.com> [Sat, 18 Feb 2017 16:30:07 -0800] rev 31019
smartset: add some doctests Add doctests explaining the set / list behavior. This will make the following changes more confident.
Sat, 18 Feb 2017 00:55:20 -0800 obsolete: avoid using revset language to compute the obsolete revset
Jun Wu <quark@fb.com> [Sat, 18 Feb 2017 00:55:20 -0800] rev 31018
obsolete: avoid using revset language to compute the obsolete revset This is part of a refactoring that moves some phase query optimization from revset.py to phases.py. See previous patches for the motivation. Now we have APIs in phasecache to get the non-public set efficiently, let's use it directly instead of going through the "not public()" revset language in "obsolete()" computation. This patch was meaured using: for i in 'public()' 'not public()' 'draft()' 'not draft()'; do hg perfrevset "$i"; hg perfrevset "$i" --hidden; done and no noticeable (> 1%) performance difference was observed.
Sat, 18 Feb 2017 00:39:31 -0800 revset: use phasecache.getrevset
Jun Wu <quark@fb.com> [Sat, 18 Feb 2017 00:39:31 -0800] rev 31017
revset: use phasecache.getrevset This is part of a refactoring that moves some phase query optimization from revset.py to phases.py. See the previous patch for motivation. This patch changes revset code to use phasecache.getrevset so it no longer accesses the private field: _phasecache._phasesets directly. For performance impact, this patch was tested using the following query, on my hg-committed repo: for i in 'public()' 'not public()' 'draft()' 'not draft()'; do echo $i; hg perfrevset "$i"; hg perfrevset "$i" --hidden; done For the CPython implementation, most operations are unchanged (within +/- 1%), while "not public()" and "draft()" is noticeably faster on an unfiltered repo. It may be because the new code avoids a set copy if filteredrevs is empty. revset | public() | not public() | draft() | not draft() hidden | yes | no | yes | no | yes | no | yes | no ------------------------------------------------------------------ before | 19006 | 17352 | 239 | 286 | 180 | 228 | 7690 | 5745 after | 19137 | 17231 | 240 | 207 | 182 | 150 | 7687 | 5658 delta | | -38% | | -52% | (timed in microseconds) For the pure Python implementation, some operations are faster while "not draft()" is noticeably slower: revset | public() | not public() | draft() | not draft() hidden | yes | no | yes | no | yes | no | yes | no ------------------------------------------------------------------------ before | 18852 | 17183 | 17758 | 15921 | 17505 | 15973 | 41521 | 39822 after | 18924 | 17380 | 17558 | 14545 | 16727 | 13593 | 48356 | 43992 delta | | -9% | -5% | -15% | +16% | +10% That may be the different performance characters of generatorset vs. filteredset. The "not draft()" query could be optimized in this case where both "public" and "secret" are passed to "getrevsets" so it won't iterate the whole repo twice.
Fri, 17 Feb 2017 22:49:05 -0800 phases: add a getrevset method to phasecache
Jun Wu <quark@fb.com> [Fri, 17 Feb 2017 22:49:05 -0800] rev 31016
phases: add a getrevset method to phasecache This is part of a refactoring that moves some phase query optimization from revset.py to phases.py. The motivation behind this was chg repo preloading - to make the obsstore depend on less things (like the revset language). The refactoring also looks good by itself - phasecache does not expose its private field "_phasesets" via public methods and revset.py is accessing it in a hacky way. This patch adds a "getrevset" method, which takes multiple phases and returns a revset in an best-effort efficient way - for "public" phase, it returns a lazy generatorset; for "draft" and "secret", it returns efficient "baseset".
Fri, 17 Feb 2017 20:59:29 -0800 smartset: convert set to list lazily
Jun Wu <quark@fb.com> [Fri, 17 Feb 2017 20:59:29 -0800] rev 31015
smartset: convert set to list lazily If the caller only wants to construct a baseset via a set, and then do "__contains__" tests. It's unnecessary to initialize the list. Testing on my unfiltered hg-committed repo where len(draft()) is 2600, this patch shows about 6% improvement on set intensive queries: Before: $ for i in `seq 5`; hg perfrevset 'draft() & draft() & draft() & draft()' ! wall 0.001196 comb 0.000000 user 0.000000 sys 0.000000 (best of 2011) ! wall 0.001191 comb 0.000000 user 0.000000 sys 0.000000 (best of 2099) ! wall 0.001186 comb 0.010000 user 0.010000 sys 0.000000 (best of 1953) ! wall 0.001182 comb 0.000000 user 0.000000 sys 0.000000 (best of 2135) ! wall 0.001193 comb 0.000000 user 0.000000 sys 0.000000 (best of 2177) After: $ for i in `seq 5`; hg perfrevset 'draft() & draft() & draft() & draft()' ! wall 0.001128 comb 0.000000 user 0.000000 sys 0.000000 (best of 2247) ! wall 0.001119 comb 0.000000 user 0.000000 sys 0.000000 (best of 2317) ! wall 0.001115 comb 0.000000 user 0.000000 sys 0.000000 (best of 2244) ! wall 0.001131 comb 0.000000 user 0.000000 sys 0.000000 (best of 2093) ! wall 0.001124 comb 0.000000 user 0.000000 sys 0.000000 (best of 2134) It could have bigger impact on larger sets in theory.
Thu, 16 Feb 2017 11:34:50 -0500 ui: construct _keepalnum list in a python3-friendly way
Augie Fackler <augie@google.com> [Thu, 16 Feb 2017 11:34:50 -0500] rev 31014
ui: construct _keepalnum list in a python3-friendly way It'll be more expensive, but it preserves the behavior.
Mon, 13 Feb 2017 17:03:14 -0800 match: making visitdir() deal with non-recursive entries
Rodrigo Damazio Bovendorp <rdamazio@google.com> [Mon, 13 Feb 2017 17:03:14 -0800] rev 31013
match: making visitdir() deal with non-recursive entries Primarily as an optimization to avoid recursing into directories that will never have a match inside, this classifies each matcher pattern's root as recursive or non-recursive (erring on the side of keeping it recursive, which may lead to wasteful directory or manifest walks that yield no matches). I measured the performance of "rootfilesin" in two repos: - The Firefox repo with tree manifests, with "hg files -r . -I rootfilesin:browser". The browser directory contains about 3K files across 249 subdirectories. - A specific Google-internal directory which contains 75K files across 19K subdirectories, with "hg files -r . -I rootfilesin:REDACTED". I tested with both cold and warm disk caches. Cold cache was produced by running "sync; echo 3 > /proc/sys/vm/drop_caches". Warm cache was produced by re-running the same command a few times. These were the results: Cold cache Warm cache Before After Before After firefox 0m5.1s 0m2.18s 0m0.22s 0m0.14s google3 dir 2m3.9s 0m1.57s 0m8.12s 0m0.16s Certain extensions, notably narrowhg, can depend on this for correctness (not trying to recurse into directories for which it has no information).
Mon, 13 Feb 2017 15:39:29 -0800 match: adding support for matching files inside a directory
Rodrigo Damazio Bovendorp <rdamazio@google.com> [Mon, 13 Feb 2017 15:39:29 -0800] rev 31012
match: adding support for matching files inside a directory This adds a new "rootfilesin" matcher type which matches files inside a directory, but not any subdirectories (so it matches non-recursively). This has the "root" prefix per foozy's plan for other matchers (rootglob, rootpath, cwdre, etc.).
Fri, 17 Feb 2017 01:21:15 -0800 runtests: add an IPv6 command line flag
Jun Wu <quark@fb.com> [Fri, 17 Feb 2017 01:21:15 -0800] rev 31011
runtests: add an IPv6 command line flag Now we have all IPv6 related issues fixed, add a command line flag so people could actually run tests with IPv6.
Thu, 16 Feb 2017 08:43:59 -0800 runtests: always set web.ipv6
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 08:43:59 -0800] rev 31010
runtests: always set web.ipv6 Previously, we only set web.ipv6 if IPv6 is used, but not on the IPv4 case. Since we already have set web.address, it makes sense to move "web.ipv6" out from "extra config options".
Thu, 16 Feb 2017 00:13:29 -0800 runtests: set web.address to localhost
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 00:13:29 -0800] rev 31009
runtests: set web.address to localhost Previously, "hg serve" will listen on "", which is not clear which interface it will actually listen on - it could listen on all interfaces (ex. 0.0.0.0 on IPv4). The run-tests.py script only checks "localhost" for available ports. So let's make it the same for "hg serve" by explicitly setting "web.address" to "localhost". This resolves some IPv6 EADDRINUSE errors.
Thu, 16 Feb 2017 09:38:52 -0800 tests: use LOCALIP
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 09:38:52 -0800] rev 31008
tests: use LOCALIP This patch replaces hardcoded 127.0.0.1 with $LOCALIP in all tests. Till now, the IPv6 series should make tests pass on common IPv6 systems where the local device has the address "::1" and the hostname "localhost" resolves to "::1".
Wed, 15 Feb 2017 23:24:03 -0800 dummyssh: use LOCALIP
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 23:24:03 -0800] rev 31007
dummyssh: use LOCALIP This patch replaces hard-coded 127.0.0.1 with $LOCALIP in dummyssh.
Thu, 16 Feb 2017 08:01:19 -0800 runtests: export LOCALIP
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 08:01:19 -0800] rev 31006
runtests: export LOCALIP Previously, tests hard-code local IP address as "127.0.0.1". That won't work for IPv6. This patch exports the $LOCALIP environment variable, which is set to "::1" if we decide to use IPv6.
Wed, 15 Feb 2017 22:53:45 -0800 tinyproxy: use IPv6 if HGIPV6 is set to 1
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 22:53:45 -0800] rev 31005
tinyproxy: use IPv6 if HGIPV6 is set to 1 This patch makes tinyproxy.py work in IPv6 mode if HGIPV6 is set to 1. This will make test-http-proxy.t pass on IPv6 machines.
Wed, 15 Feb 2017 21:09:00 -0800 dumbhttp: use IPv6 if HGIPV6 is set to 1
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 21:09:00 -0800] rev 31004
dumbhttp: use IPv6 if HGIPV6 is set to 1 This will fix flaky tests using dumbhttp. The patch was tested on gcc112.fsffrance.org using the following command: ./run-tests.py -j 40 --runs-per-test 120 test-bundle2-remote-changegroup.t
Wed, 15 Feb 2017 21:03:42 -0800 runtests: export HGIPV6 to hint test scripts whether to use IPv6
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 21:03:42 -0800] rev 31003
runtests: export HGIPV6 to hint test scripts whether to use IPv6 Previously, run-tests.py only exports HGPORT, and scripts in tests do not know if IPv6 should be used. And that breaks scripts like dumbhttp.py which always uses IPv4. This patch makes run-tests.py export HGIPV6, which can help test scripts like dumbhttp.py and tinyproxy.py to decide whether to use IPv6 or not.
Fri, 17 Feb 2017 00:59:09 -0800 runtests: prefer IPv4 to IPv6
Jun Wu <quark@fb.com> [Fri, 17 Feb 2017 00:59:09 -0800] rev 31002
runtests: prefer IPv4 to IPv6 To make IPv6 work, there are multiple areas that need to fix. Before they all get fixed, use IPv4 by default. This should fix tests caused on IPv6 systems.
Fri, 17 Feb 2017 11:08:36 +0100 doc: correct example concerning "hg purge" alias in man page "hgrc.5"
Rainer Woitok <Rainer.Woitok@Gmail.Com> [Fri, 17 Feb 2017 11:08:36 +0100] rev 31001
doc: correct example concerning "hg purge" alias in man page "hgrc.5" The "hg purge" alias as currently described in "hgrc.5" issues a possibly confusing error message like rm: missing operand Try 'rm --help' for more information. if no files are to be purged at all. This patch slightly modifies the example by adding a "-f" option to the "rm" command.
Mon, 06 Feb 2017 23:22:04 -0500 tests: prove that ignore works
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:22:04 -0500] rev 31000
tests: prove that ignore works
Mon, 06 Feb 2017 22:52:47 -0500 annotate: migrate to modern pager API
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 22:52:47 -0500] rev 30999
annotate: migrate to modern pager API
Mon, 06 Feb 2017 23:55:54 -0500 ui: add a debug print right before we start the pager
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:55:54 -0500] rev 30998
ui: add a debug print right before we start the pager This makes it easier to figure out why a command is getting paginated.
Mon, 06 Feb 2017 23:42:04 -0500 ui: respect historic pager.attend-$COMMAND=no
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:42:04 -0500] rev 30997
ui: respect historic pager.attend-$COMMAND=no I'm on the fence about this behavior, but the user's intent was pretty specific and it's not expensive to support this case.
Mon, 06 Feb 2017 23:45:30 -0500 tests: clean up a bunch of pager testing that is about to be invalidated
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:45:30 -0500] rev 30996
tests: clean up a bunch of pager testing that is about to be invalidated All this attend logic and potential bugs just no longer make sense to test.
Mon, 06 Feb 2017 23:21:45 -0500 ui: add ignore-single-command functionality
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:21:45 -0500] rev 30995
ui: add ignore-single-command functionality This closes the last feature gap other than the attend list from the extension. For now, I'm leaving the attend list in the extension, because I'm unsure it has merit in a world where commands have been updated to take advantage of the modern API.
Wed, 15 Feb 2017 17:48:03 -0500 ui: introduce neverpager() call
Augie Fackler <augie@google.com> [Wed, 15 Feb 2017 17:48:03 -0500] rev 30994
ui: introduce neverpager() call I'm about to add direct paging support to some commands, and as a result we need a way to communicate from the higher layers of dispatch that paging is explicitly disabled.
Wed, 15 Feb 2017 17:47:57 -0500 pager: move more behavior into core
Augie Fackler <augie@google.com> [Wed, 15 Feb 2017 17:47:57 -0500] rev 30993
pager: move more behavior into core This moves the global flag and the --pager=yes logic into core. Only functionality change is that users now always get a --pager flag and can enable the pager via the flag without the extension active. Moving the flag into core exposes a defect in the ro localization, which will have to be corrected later.
Wed, 15 Feb 2017 17:47:51 -0500 pager: move pager-initiating code into core
Augie Fackler <augie@google.com> [Wed, 15 Feb 2017 17:47:51 -0500] rev 30992
pager: move pager-initiating code into core No functionality change. A previous version of this API had a category argument on ui.pager(). As I migrated the commands in core, I couldn't come up with good enough consistency in any categorization scheme so I just scrapped the whole idea. It may be worth revisiting in the future.
Thu, 16 Feb 2017 10:33:59 -0800 test-logtoprocess: use cat to wait for outputs
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 10:33:59 -0800] rev 30991
test-logtoprocess: use cat to wait for outputs Commands started by logtoprocess are running asynchronously. To be able to test the output, we need to block and wait for the output. The patch uses "| cat" to wait for such "asynchronous" outputs, to make the test more reliable. I have also written a short notice at the top, hopefully people would be aware of the pitfall when changing the test.
Thu, 16 Feb 2017 23:10:47 -0800 chgserver: move comments in config example
Jun Wu <quark@fb.com> [Thu, 16 Feb 2017 23:10:47 -0800] rev 30990
chgserver: move comments in config example "#" must be the first character of a line to mark the text as comments. So let's change the docstring.
Wed, 15 Feb 2017 19:41:14 -0800 localrepo: move extension loading to a separate method
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 19:41:14 -0800] rev 30989
localrepo: move extension loading to a separate method The stateful chg plan [1] requires a special repo object, where ideally all side effects caused by loading the repo object could be reverted by just dropping (gabbage collect) the loaded repo object. Currently, that is impossible because repo.__init__ calls "extensions.loadall", which may have unpredictable side-effects that cannot be reverted by dropping the repo object. This patch moves "extensions.loadall" to a separate method, so chg could subclass localrepository and make extensions loading a no-op. [1]: mercurial-scm.org/pipermail/mercurial-devel/2017-February/092547.html
Thu, 16 Feb 2017 17:30:35 +0530 py3: convert the mode argument of os.fdopen to unicodes
Pulkit Goyal <7895pulkit@gmail.com> [Thu, 16 Feb 2017 17:30:35 +0530] rev 30988
py3: convert the mode argument of os.fdopen to unicodes Couple of these from the earlier series got lost while rebasing. So this patch converts them again.
Wed, 15 Feb 2017 16:29:58 -0800 runtests: unindent an "if True" block
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 16:29:58 -0800] rev 30987
runtests: unindent an "if True" block The block was left to make review easier. This patch unindents it.
Wed, 15 Feb 2017 16:43:27 -0800 runtests: set web.ipv6 if we use IPv6
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 16:43:27 -0800] rev 30986
runtests: set web.ipv6 if we use IPv6 As explained by the previous patch, we need to set "web.ipv6=True" if we decide to use IPv6. Otherwise "hg serve" will still try to listen on IPv4. This patch makes it so by appending web.ipv6 to "extra configs". This patch was tested in a Linux system with IPv6, by the following steps: 1. Change hgweb/server.py temporarily to write a file if IPv6HTTPServer.__init__ is called. 2. run-tests.py -l --keep-tmpdir test-serve.t 3. Check the generated .hgrc, make sure it sets web.ipv6=1. 4. Check the log file to make sure IPv6HTTPServer.__init__ is called.
Wed, 15 Feb 2017 16:22:22 -0800 runtests: checkportisavailable should only check one family
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 16:22:22 -0800] rev 30985
runtests: checkportisavailable should only check one family As explained by the previous patch, checkportisavailable() should only check the preferred family - either IPv4 or IPv6, not both. This patch makes it so.
Wed, 15 Feb 2017 16:18:31 -0800 runtests: add a function to test if IPv6 is available
Jun Wu <quark@fb.com> [Wed, 15 Feb 2017 16:18:31 -0800] rev 30984
runtests: add a function to test if IPv6 is available Previously, checkportisavailable returns True if the port is free either on IPv4 or IPv6, but the hg server only uses IPv4 by default. That leads to issues when IPv4 port is not free but the IPv6 one is. To address that, run-tests should stick with either IPv4 or IPv6. This patch adds a function similar to checkportisavailable to test if IPv6 is available, and assigns the result to a variable. The new function was tested in a Linux system script with the following steps: 1. Run "ip addr del ::1/128 dev lo" to delete lo's IPv6 address, Confirm checkipv6available() returns False. 2. Run "ip addr add ::1/128 dev lo" to add back lo's IPv6 address. Confirm checkipv6available() returns True. 3. Start a web server taking the 8000 port. Confirm checkipv6available(8000) is still True.
Wed, 15 Feb 2017 13:34:06 -0800 histedit: log the time taken to read in the commands list
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:34:06 -0800] rev 30983
histedit: log the time taken to read in the commands list If we're being fed an external command list from stdin (histedit --commands -), then the time spent reading stdin is outside our control. Log it.
Wed, 15 Feb 2017 13:34:06 -0800 extdiff: log time spent in external diff program
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:34:06 -0800] rev 30982
extdiff: log time spent in external diff program We can't fix the time external diff programs take to run. Log that duration for us to remove from any stats we gather
Wed, 15 Feb 2017 13:34:06 -0800 crecord: log blocked time waiting for curses input
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:34:06 -0800] rev 30981
crecord: log blocked time waiting for curses input We want to know when we're blocked waiting for the user - log the time spent waiting in the curses keyboard handlers
Wed, 15 Feb 2017 13:38:00 -0800 ui: give editor() a tag of its own
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:38:00 -0800] rev 30980
ui: give editor() a tag of its own We know that calls to ui.editor() always block on the user's configured editor. Use a blocking tag that ensures that we don't see a huge variety of editor options in our logging.
Wed, 15 Feb 2017 13:29:12 -0800 ui: time calls to ui.system
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:29:12 -0800] rev 30979
ui: time calls to ui.system We want to know when we're blocked on ui.system, and why. Allow the user to supply a tag - otherwise we record on an unspecific tag derived from cmd.
Wed, 15 Feb 2017 13:50:06 -0800 ui: log time spent blocked on stdio
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:50:06 -0800] rev 30978
ui: log time spent blocked on stdio We use a wrapper around Mercurial at Facebook that logs key statistics (like elpased time) to our standard performance tooling. This is less useful than it could be, because we currently can't tell when a command is slow because we need to fix Mercurial versus when a command is slow because the user isn't interacting quickly. Teach Mercurial to log the time it spends blocked, so that our tooling can pick it up and submit it with the elapsed time - we can then do the math in our tooling to see if Mercurial is slow, or if the user simply failed to interact. Combining this with the command duration log means that we can ensure that we concentrate performance efforts on the things that bite Facebook users. The perfwrite microbenchmark shifts from: Linux: ! wall 3.213560 comb 0.410000 user 0.350000 sys 0.060000 (best of 4) Mac: ! wall 0.342325 comb 0.180000 user 0.110000 sys 0.070000 (best of 20) before this change to: ! wall 3.478070 comb 0.500000 user 0.420000 sys 0.080000 (best of 3) Mac: ! wall 0.218112 comb 0.220000 user 0.150000 sys 0.070000 (best of 15) showing a small hit in comb time, but firmly in the noise on wall time.
Wed, 15 Feb 2017 13:07:26 -0800 contrib: add a write microbenchmark to perf.py
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:07:26 -0800] rev 30977
contrib: add a write microbenchmark to perf.py I'm adding some performance logging to ui.write - this benchmark lets us confirm that the cost of that logging is acceptably low. At this point, the microbenchmark on Linux over SSH shows: ! wall 3.213560 comb 0.410000 user 0.350000 sys 0.060000 (best of 4) while on the Mac locally, it shows: ! wall 0.342325 comb 0.180000 user 0.110000 sys 0.070000 (best of 20)
Wed, 15 Feb 2017 13:17:45 -0800 ui: provide a mechanism to track and log blocked time
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:17:45 -0800] rev 30976
ui: provide a mechanism to track and log blocked time We want to log the time Mercurial spends trapped in things outside programmatic control. Provide a mechanism to give us both command runtime and as many different sources of blocking as we deem useful.
Wed, 15 Feb 2017 13:17:39 -0800 mercurial: switch to util.timer for all interval timings
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 13:17:39 -0800] rev 30975
mercurial: switch to util.timer for all interval timings util.timer is now the best available interval timer, at the expense of not having a known epoch. Let's use it whenever the epoch is irrelevant.
Wed, 15 Feb 2017 11:53:59 -0800 util: introduce timer()
Simon Farnsworth <simonfar@fb.com> [Wed, 15 Feb 2017 11:53:59 -0800] rev 30974
util: introduce timer() As documented for timeit.default_timer, there are better timers available for performance measures on some platforms. These timers don't have a set epoch, and thus are only useful for interval measurements, but have higher resolution, and thus get you a better measurement overall. Use the same selection logic as Python's timeit.default_timer. This is a platform clock on Python 2 and early Python 3, and time.perf_counter on Python 3.3 and later (where time.perf_counter is introduced as the best timer to use).
Thu, 22 Dec 2016 02:38:53 +0100 color: move the '_render_effects' function to the core module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 02:38:53 +0100] rev 30973
color: move the '_render_effects' function to the core module
Thu, 22 Dec 2016 02:37:18 +0100 color: move '_effect_str' function into the core module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 02:37:18 +0100] rev 30972
color: move '_effect_str' function into the core module
Thu, 22 Dec 2016 02:34:22 +0100 color: move configstyles into the core module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 02:34:22 +0100] rev 30971
color: move configstyles into the core module The extension is getting thinner as we speak!
Thu, 22 Dec 2016 02:30:03 +0100 color: rework conditional 'valideffect'
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 02:30:03 +0100] rev 30970
color: rework conditional 'valideffect' Not very important, but the full conditional is not that hard to follow and having it unified make the function role a bit clearer in my opinion.
Thu, 22 Dec 2016 02:26:50 +0100 color: move 'valideffect' function into the core module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 02:26:50 +0100] rev 30969
color: move 'valideffect' function into the core module
Thu, 22 Dec 2016 02:23:23 +0100 color: move '_terminfo_params' into the core 'color' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 22 Dec 2016 02:23:23 +0100] rev 30968
color: move '_terminfo_params' into the core 'color' module On step closer to have color in core.
Fri, 18 Nov 2016 18:48:38 +0100 color: move '_effect' mapping into core
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 18 Nov 2016 18:48:38 +0100] rev 30967
color: move '_effect' mapping into core This is the second things we can move into core safely.
Fri, 18 Nov 2016 18:43:39 +0100 color: spread '_effect' values for readability
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 18 Nov 2016 18:43:39 +0100] rev 30966
color: spread '_effect' values for readability We move to our "usual" one value per line style.
Wed, 15 Feb 2017 11:22:01 -0500 merge with stable
Augie Fackler <augie@google.com> [Wed, 15 Feb 2017 11:22:01 -0500] rev 30965
merge with stable
Mon, 13 Feb 2017 15:04:46 -0800 update: clarify that -C and -c are mutually exclusive
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Feb 2017 15:04:46 -0800] rev 30964
update: clarify that -C and -c are mutually exclusive This makes it clear in both the synopsis and in the verbose output that -C and -c are mutually exclusive. It also restructures the verbose output a little so it's better prepared for a third option (--merge). This patch also reorders the options to match the flag table.
Mon, 13 Feb 2017 11:58:02 -0800 update: move check for dirty wdir into hg.updatetotally()
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Feb 2017 11:58:02 -0800] rev 30963
update: move check for dirty wdir into hg.updatetotally() The function has a "check" parameter that's currently unused, and it makes sense to me to have it honor it. That way other callers than commands.update() could set it if they needed.
Mon, 13 Feb 2017 11:32:09 -0800 destutil: drop now-unused "check" parameter from destupdate()
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Feb 2017 11:32:09 -0800] rev 30962
destutil: drop now-unused "check" parameter from destupdate()
Thu, 09 Feb 2017 09:52:32 -0800 destutil: remove duplicate check and leave it to merge.update()
Martin von Zweigbergk <martinvonz@google.com> [Thu, 09 Feb 2017 09:52:32 -0800] rev 30961
destutil: remove duplicate check and leave it to merge.update() The check is done in merge.update() already and the next few patches will add more checks there. Some of the additional checks will need information about the merge that will not be available in destutil. Since commands.postincoming() catches UpdateAbort(), we need to change merge.update() to raise that more specific exception. This goes directly again 45b86dbabbda (destupdate: move the check related to the "clean" logic in the function, 2015-10-05), but it will simplify the next few patches, and we can always move it out again (preferably move, not copy) after if we still think it's better that way.
Wed, 15 Feb 2017 14:49:33 +0800 make: update .PHONY targets
Anton Shestakov <av6@dwimlabs.net> [Wed, 15 Feb 2017 14:49:33 +0800] rev 30960
make: update .PHONY targets
Thu, 02 Feb 2017 10:07:53 +0100 debugcommands: move 'debugwireargs' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Feb 2017 10:07:53 +0100] rev 30959
debugcommands: move 'debugwireargs' in the new module
Thu, 02 Feb 2017 10:07:28 +0100 debugcommands: move 'debugwalk' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Feb 2017 10:07:28 +0100] rev 30958
debugcommands: move 'debugwalk' in the new module
Thu, 02 Feb 2017 10:06:01 +0100 debugcommands: move 'debugtemplate' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Feb 2017 10:06:01 +0100] rev 30957
debugcommands: move 'debugtemplate' in the new module
Thu, 02 Feb 2017 10:05:22 +0100 debugcommands: move 'debugsuccessorssets' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Feb 2017 10:05:22 +0100] rev 30956
debugcommands: move 'debugsuccessorssets' in the new module
Thu, 02 Feb 2017 10:04:55 +0100 debugcommands: move 'debugsub' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Feb 2017 10:04:55 +0100] rev 30955
debugcommands: move 'debugsub' in the new module
Thu, 02 Feb 2017 10:04:34 +0100 debugcommands: move 'debugstate' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Feb 2017 10:04:34 +0100] rev 30954
debugcommands: move 'debugstate' in the new module
Thu, 02 Feb 2017 10:04:02 +0100 debugcommands: move 'debugsetparents' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Feb 2017 10:04:02 +0100] rev 30953
debugcommands: move 'debugsetparents' in the new module
Thu, 02 Feb 2017 10:03:31 +0100 debugcommands: move 'debugrevspec' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Feb 2017 10:03:31 +0100] rev 30952
debugcommands: move 'debugrevspec' in the new module
Thu, 02 Feb 2017 10:02:40 +0100 debugcommands: move 'debugrevlog' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Feb 2017 10:02:40 +0100] rev 30951
debugcommands: move 'debugrevlog' in the new module
Thu, 02 Feb 2017 10:01:54 +0100 debugcommands: move 'debugrename' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Feb 2017 10:01:54 +0100] rev 30950
debugcommands: move 'debugrename' in the new module
Thu, 02 Feb 2017 10:01:00 +0100 debugcommands: move 'debugrebuildfncache' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Feb 2017 10:01:00 +0100] rev 30949
debugcommands: move 'debugrebuildfncache' in the new module
Thu, 02 Feb 2017 10:00:26 +0100 debugcommands: move 'debugrebuilddirstate' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Feb 2017 10:00:26 +0100] rev 30948
debugcommands: move 'debugrebuilddirstate' in the new module
Thu, 02 Feb 2017 09:59:47 +0100 debugcommands: move 'debugpvec' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Thu, 02 Feb 2017 09:59:47 +0100] rev 30947
debugcommands: move 'debugpvec' in the new module
Wed, 01 Feb 2017 17:48:30 +0100 debugcommands: move 'debugpushkey' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 01 Feb 2017 17:48:30 +0100] rev 30946
debugcommands: move 'debugpushkey' in the new module
Sun, 12 Feb 2017 03:06:38 -0800 ui: remove urllib2 from being imported early
Kyle Lippincott <spectral@google.com> [Sun, 12 Feb 2017 03:06:38 -0800] rev 30945
ui: remove urllib2 from being imported early Before this change, urllib2 was brought in when constructing the ui object, and that added ~5ms on my Linux workstation to the hg startup time for every command, bringing the time for 'HGRCPATH=/dev/null hg root' from 46ms to 40ms. Now, we construct a single proxy object per initial ui creation (so that if the ui is copied they share the object), but defer the actual instantiation of it and the import of urllib2 until it's needed. # no-check-commit
Mon, 06 Feb 2017 23:57:32 -0500 tests: switch "this command isn't paged" example to id
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 23:57:32 -0500] rev 30944
tests: switch "this command isn't paged" example to id I'm about to enable pager support in summary.
Tue, 07 Feb 2017 17:08:41 -0500 tests: update test-i18n.t to not depend on the pager extension
Augie Fackler <augie@google.com> [Tue, 07 Feb 2017 17:08:41 -0500] rev 30943
tests: update test-i18n.t to not depend on the pager extension I'm about to mark that extension as deprecated, and that broke this test.
Mon, 06 Feb 2017 21:15:35 -0500 pager: add a test of --pager=no functionality
Augie Fackler <augie@google.com> [Mon, 06 Feb 2017 21:15:35 -0500] rev 30942
pager: add a test of --pager=no functionality I'm about to upend the pager universe, but I would like to not regress anything.
Tue, 07 Feb 2017 17:33:35 +0100 hg: allow usage of XDG_CONFIG_HOME/hg/hgrc
David Demelier <demelier.david@gmail.com> [Tue, 07 Feb 2017 17:33:35 +0100] rev 30941
hg: allow usage of XDG_CONFIG_HOME/hg/hgrc Modern applications must use the following paths to store configuration files: - $XDG_CONFIG_HOME/hg/hgrc, - $HOME/.config/hg/hgrc (if XDG_CONFIG_HOME is unset or not absolute). For backward compatibility, ~/.hgrc is still created if no hgrc exist using hg config --edit. See https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
Wed, 01 Feb 2017 17:47:35 +0100 debugcommands: move 'debugpathcomplete' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 01 Feb 2017 17:47:35 +0100] rev 30940
debugcommands: move 'debugpathcomplete' in the new module
Wed, 01 Feb 2017 17:46:21 +0100 debugcommands: move 'debugobsolete' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 01 Feb 2017 17:46:21 +0100] rev 30939
debugcommands: move 'debugobsolete' in the new module
Wed, 01 Feb 2017 17:42:49 +0100 debugcommands: move 'debuglocks' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 01 Feb 2017 17:42:49 +0100] rev 30938
debugcommands: move 'debuglocks' in the new module
Wed, 01 Feb 2017 17:41:12 +0100 debugcommands: move 'debugnamecomplete' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 01 Feb 2017 17:41:12 +0100] rev 30937
debugcommands: move 'debugnamecomplete' in the new module
Wed, 01 Feb 2017 17:40:20 +0100 debugcommands: move 'debugmergestate' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 01 Feb 2017 17:40:20 +0100] rev 30936
debugcommands: move 'debugmergestate' in the new module
Wed, 01 Feb 2017 17:39:31 +0100 debugcommands: move 'debuglabelcomplete' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 01 Feb 2017 17:39:31 +0100] rev 30935
debugcommands: move 'debuglabelcomplete' in the new module
Mon, 13 Feb 2017 20:47:41 -0800 dispatch: start profiling earlier
Bryan O'Sullivan <bryano@fb.com> [Mon, 13 Feb 2017 20:47:41 -0800] rev 30934
dispatch: start profiling earlier This makes it possible to profile extension loading and setup, which takes a substantial fraction of overall execution time for fast commands. (99% of this commit is simply changes of indentation to reflect the hoisting of the two calls to maybeprofile to a single one that happens earlier.) # no-check-commit
Mon, 13 Feb 2017 20:44:20 -0800 dispatch: move detection of profiling earlier during startup
Bryan O'Sullivan <bryano@fb.com> [Mon, 13 Feb 2017 20:44:20 -0800] rev 30933
dispatch: move detection of profiling earlier during startup
Mon, 13 Feb 2017 21:00:50 -0800 ui: fix configwith doctest
Jun Wu <quark@fb.com> [Mon, 13 Feb 2017 21:00:50 -0800] rev 30932
ui: fix configwith doctest 4.2 cannot be expressed with IEEE floating point losslessly, and could cause test failure on some platform: File ".../mercurial/ui.py", line 414, in mercurial.ui.ui.configwith Failed example: u.configwith(float, s, 'float2') Expected: -4.2 Got: -4.2000000000000002 This patch fixes that by changing the number to 4.25, which can be expressed by the binary number 100.01.
Tue, 14 Feb 2017 01:52:16 +0530 test-bdiff: move import inside the function to avoid test failure
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 14 Feb 2017 01:52:16 +0530] rev 30931
test-bdiff: move import inside the function to avoid test failure test-check-module-imports.t fails on some systems where the path of home directories is different than sys.prefix and sys.exec_prefix. Importing silenttestrunner will help avoiding that failure.
Sun, 12 Feb 2017 22:28:09 -0800 profiling: add statprof support for Chrome trace viewer rendering
Bryan O'Sullivan <bryano@fb.com> [Sun, 12 Feb 2017 22:28:09 -0800] rev 30930
profiling: add statprof support for Chrome trace viewer rendering We synthesize function call begin/end events from snapshots, and try (configurably) to eliminate "noisy" stack frames. Example invocation: hg --config profiling.output=$HOME/Desktop/clone.json \ --config profiling.statformat=chrome \ --profile clone https://www.mercurial-scm.org/repo/hg
Sun, 12 Feb 2017 22:20:20 -0800 statprof: allow rendering in the Chrome trace viewer format
Bryan O'Sullivan <bryano@fb.com> [Sun, 12 Feb 2017 22:20:20 -0800] rev 30929
statprof: allow rendering in the Chrome trace viewer format
Sun, 12 Feb 2017 22:16:58 -0800 statprof: add a path simplification function
Bryan O'Sullivan <bryano@fb.com> [Sun, 12 Feb 2017 22:16:58 -0800] rev 30928
statprof: add a path simplification function
Sun, 12 Feb 2017 21:44:55 -0800 ui: rewrite configint in terms of configwith
Bryan O'Sullivan <bryano@fb.com> [Sun, 12 Feb 2017 21:44:55 -0800] rev 30927
ui: rewrite configint in terms of configwith
Sun, 12 Feb 2017 21:40:46 -0800 ui: add a configwith method
Bryan O'Sullivan <bryano@fb.com> [Sun, 12 Feb 2017 21:40:46 -0800] rev 30926
ui: add a configwith method This is a long-overdue generalization of the pattern in configint and configbool.
Mon, 13 Feb 2017 22:15:28 +0530 py3: convert the mode argument of os.fdopen to unicodes (2 of 2)
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 13 Feb 2017 22:15:28 +0530] rev 30925
py3: convert the mode argument of os.fdopen to unicodes (2 of 2)
Mon, 13 Feb 2017 20:06:38 +0530 py3: convert the mode argument of os.fdopen to unicodes (1 of 2)
Pulkit Goyal <7895pulkit@gmail.com> [Mon, 13 Feb 2017 20:06:38 +0530] rev 30924
py3: convert the mode argument of os.fdopen to unicodes (1 of 2) os.fdopen() does not accepts bytes as its second argument which represent the mode in which the file is to be opened. This patch makes sure unicodes are passed in py3 by using pycompat.sysstr().
Thu, 09 Feb 2017 15:20:41 -0500 bugzilla: add a rest api backend (usable with bugzilla 5.0+)
John Mulligan <phlogistonjohn@asynchrono.us> [Thu, 09 Feb 2017 15:20:41 -0500] rev 30923
bugzilla: add a rest api backend (usable with bugzilla 5.0+) Add support for the bugzilla rest api documented at https://wiki.mozilla.org/Bugzilla:REST_API and at https://bugzilla.readthedocs.io/en/latest/ This backend has the following benefits: * It supports the bugzilla api keys so hgrc does not need to contain a user's bugzilla password * Works with Mercurial's "hostfingerprints" support making handling bugzilla instances with self-signed certs easier * Does not use xmlrpc ;-) Adds configuration item 'apikey' in [bugzilla] section. My major concern with these patches is if the approach to HTTP access is the right way for an extension and if hooking into request object and the overriding the get_method to perform PUT requests was a sensible approach. # no-check-commit
Mon, 13 Feb 2017 15:12:17 -0500 keepalive: honor urllib2 style get_method overrides
John Mulligan <phlogistonjohn@asynchrono.us> [Mon, 13 Feb 2017 15:12:17 -0500] rev 30922
keepalive: honor urllib2 style get_method overrides In urllib2 docs and discussions it can be found that in order to make a request other than GET or POST the get_method of a Request object can be overriden. Make Mercurial's internal version of this honor the return value of get_method. Please see the followup patch to the bugzilla extension for the reason for this change. Marking RFC because I'm not entirely sure this is the right way make the HTTP requests.
Fri, 10 Feb 2017 13:56:31 -0800 lock: include Linux pid namespace identifier in prefix
Jun Wu <quark@fb.com> [Fri, 10 Feb 2017 13:56:31 -0800] rev 30921
lock: include Linux pid namespace identifier in prefix Previously, the lock only contains a hostname as an attempt to detect pid namespace difference. However, that's not enough on modern Linux - a single hostname could have different pid namespaces. That means if people run hg inside different PID namespaces with a same UTS namespae, the lock would be broken - an hg proccess in pid namespace A will think the lock having a "random" pid in pid namespace B is "dead" and remove it. This patch solves the above issue by appending an PID namespace identifier of the current process to the lock prefix ("hostname"). It depends on /proc being mounted properly. But I don't think there is a better way to get pid namespace identifier reliably.
Fri, 10 Feb 2017 13:35:21 -0800 lock: move lock._host calculation to a function
Jun Wu <quark@fb.com> [Fri, 10 Feb 2017 13:35:21 -0800] rev 30920
lock: move lock._host calculation to a function This allows customization per platform. See the next patch for why.
Wed, 01 Feb 2017 17:33:46 +0100 debugcommands: move 'debugknown' in the new module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 01 Feb 2017 17:33:46 +0100] rev 30919
debugcommands: move 'debugknown' in the new module
Wed, 01 Feb 2017 17:31:05 +0100 debugcommands: extract debuginstall in the debugcommands module
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Wed, 01 Feb 2017 17:31:05 +0100] rev 30918
debugcommands: extract debuginstall in the debugcommands module
Mon, 13 Feb 2017 16:35:49 +0100 dispatch: load debugcommand before extension
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Mon, 13 Feb 2017 16:35:49 +0100] rev 30917
dispatch: load debugcommand before extension Multiple extension will manipulate commands on load, we need the debug command to be loaded before that point.
Mon, 13 Feb 2017 09:44:16 -0800 merge with stable
Martin von Zweigbergk <martinvonz@google.com> [Mon, 13 Feb 2017 09:44:16 -0800] rev 30916
merge with stable
Mon, 13 Feb 2017 11:43:12 -0800 bundle2: fix assertion that 'compression' hasn't been set stable
Siddharth Agarwal <sid0@fb.com> [Mon, 13 Feb 2017 11:43:12 -0800] rev 30915
bundle2: fix assertion that 'compression' hasn't been set `n.lower()` will return `compression`, not `Compression`.
Fri, 10 Feb 2017 18:20:58 +0100 wireproto: properly report server Abort during 'getbundle' stable
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 10 Feb 2017 18:20:58 +0100] rev 30914
wireproto: properly report server Abort during 'getbundle' Previously Abort raised during 'getbundle' call poorly reported (HTTP-500 for http, some scary messages for ssh). Abort error have been properly reported for "push" for a long time, there is not reason to be different for 'getbundle'. We properly catch such error and report them back the best way available. For bundle, we issue a valid bundle2 reply (as expected by the client) with an 'error:abort' part. With bundle1 we do as best as we can depending of http or ssh.
Fri, 10 Feb 2017 18:17:20 +0100 getbundle: cleanly handle remote abort during getbundle stable
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 10 Feb 2017 18:17:20 +0100] rev 30913
getbundle: cleanly handle remote abort during getbundle bundle2 allow the server to report error explicitly. This was initially implemented for push but there is not reason to not use it for pull too. This changeset add logic similar to the one in 'unbundle' to the client side of 'getbundle'. That logic make sure the error is properly reported as "remote". This will allow the server side of getbundle to send clean "Abort" message in the next changeset.
Fri, 10 Feb 2017 18:06:08 +0100 bundle1: fix bundle1-denied reporting for pull over ssh stable
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 10 Feb 2017 18:06:08 +0100] rev 30912
bundle1: fix bundle1-denied reporting for pull over ssh Changeset b288fb2724bf introduced a config option to have the server deny pull using bundle1. The original protocol has not really been design to allow that kind of error reporting so some hack was used. It turned the hack only works on HTTP and that ssh server hangs forever when this is used. After further digging, there is no way to report the error in a unified way. Using `ooberror` freeze ssh and raising 'Abort' makes HTTP return a HTTP-500 without further details. So with sadness we implement a version that dispatch according to the protocol used. Now the error is properly reported, but we still have ungraceful abort after that. The protocol do not allow anything better to happen using bundle1.
Fri, 10 Feb 2017 18:06:12 +0100 bundle-tests: operate from outside a repository stable
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 10 Feb 2017 18:06:12 +0100] rev 30911
bundle-tests: operate from outside a repository We are about to add a test for ssh pull/cloning being denied because of bundle1 usage. For this, it is cleaner to not operate from the clone using http. So we update the test beforehand for clarity. This is more churns that what I'm happy to see on stable, but the rests of the series is worth it in my opinion.
Fri, 10 Feb 2017 17:56:52 +0100 bundle1: display server abort hint during unbundle stable
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 10 Feb 2017 17:56:52 +0100] rev 30910
bundle1: display server abort hint during unbundle The code was printing the abort message but not the hint. This is now fixed.
Fri, 10 Feb 2017 17:56:59 +0100 bundle1: fix bundle1-denied reporting for push over ssh stable
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 10 Feb 2017 17:56:59 +0100] rev 30909
bundle1: fix bundle1-denied reporting for push over ssh Changeset b288fb2724bf introduced a config option to have the server deny push using bundle1. The original protocol has not really be design to allow such kind of error reporting so some hack was used. It turned the hack only works on HTTP and that ssh wire peer hangs forever when the same hack is used. After further digging, there is no way to report the error in a unified way. Using 'ooberror' freeze ssh and raising 'Abort' makes HTTP return a HTTP500 without further details. So with sadness we implement a version that dispatch according to the protocol used. We also add a test for pushing over ssh to make sure we won't regress in the future. That test show that the hint is missing, this is another bug fixed in the next changeset.
Fri, 10 Feb 2017 17:56:47 +0100 bundle2: keep hint close to the primary message when remote abort stable
Pierre-Yves David <pierre-yves.david@ens-lyon.org> [Fri, 10 Feb 2017 17:56:47 +0100] rev 30908
bundle2: keep hint close to the primary message when remote abort The remote hint message was ignored when reporting the remote error and passed to the local generic abort error. I think I might initially have tried to avoid reimplementing logic controlling the hint display depending of the verbosity level. However, first, there does not seems to have such verbosity related logic and second the resulting was wrong as the primary error and the hint were split apart. We now properly print the hint as remote output.
Sun, 12 Feb 2017 02:23:33 +0900 misc: update year in copyright lines stable
FUJIWARA Katsunori <foozy@lares.dti.ne.jp> [Sun, 12 Feb 2017 02:23:33 +0900] rev 30907
misc: update year in copyright lines This patch also makes some expected output lines in tests glob-ed for persistence of them. BTW, files below aren't yet changed in 2017, but this patch also updates copyright of them, because: - mercurial/help/hg.1.txt almost all of "man hg" output comes from online help of hg command, and is already changed in 2017 - mercurial/help/hgignore.5.txt - mercurial/help/hgrc.5 "copyright 2005-201X Matt Mackall" in them mentions about copyright of Mercurial itself
(0) -30000 -10000 -3000 -1000 -240 +240 +1000 +3000 +10000 tip