- Aug 12, 2016
-
-
Augie Fackler authored
This is required for tools like https://github.com/munki/munki, and is also more semantically correct.
-
- Jul 28, 2016
-
-
Maciej Fijalkowski authored
Since disabling the gc does things worse for pypy and the bug was fixed in 2.7, let's only enable it in <2.7
-
- Aug 12, 2016
-
-
Simon Farnsworth authored
Now that we store and display merge labels in user prompts (not just conflict markets), we should rely on labels to clarify the two sides of a merge operation (hg merge, hg update, hg rebase etc). "remote" is not a great name here, as it conflates "remote" as in "remote server" with "remote" as in "the side of the merge that's further away". In cases where you're merging the "wrong way" around, remote can even be the "local" commit that you're merging with something pulled from the remote server.
-
Simon Farnsworth authored
Now that we persist the labels, we can consistently use the labels in prompts for the user without risk of confusion. This changes a huge amount of command output: This means that merge prompts like: no tool found to merge a keep (l)ocal, take (o)ther, or leave (u)nresolved? u and remote changed a which local deleted use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c become: no tool found to merge a keep (l)ocal [working copy], take (o)ther [destination], or leave (u)nresolved? u and remote [source] changed a which local [dest] deleted use (c)hanged version, leave (d)eleted, or leave (u)nresolved? c where "working copy" and "destination" were supplied by the command that requested the merge as labels for conflict markers, and thus should be human-friendly.
-
- Aug 09, 2016
-
-
Mateusz Kwapich authored
Instead of hacking into dirstate internals let's use the callbacks to be notified about wd parent change.
-
- Aug 11, 2016
-
-
Mateusz Kwapich authored
The journal extension had to touch the dirstate internals to be notified about wd parent change. To make that detection cleaner and reusable let's move it core. Now the extension can register to be notified about parent changes.
-
- Aug 06, 2016
-
-
Yuya Nishihara authored
At cc3a30ff9490, we had to optimize a parsed tree to resolve x^:y ambiguity. Since we've moved the resolution of x^:y to parse(), we no longer have to call optimize(). Therefore, (x:y) can be taken as a single expression, not an odd range expression x:y.
-
Yuya Nishihara authored
Given x^:y is (x^):y, this seems sensible.
-
Yuya Nishihara authored
This is purely a parsing problem, which should be resolved before alias expansion.
-
Yuya Nishihara authored
This is the test for 805651777188, and I'm going to fix the failure of 'x^A' where 'revsetalias.A=:y'.
-
- Jul 05, 2015
-
-
Yuya Nishihara authored
Because a suffix action never takes subsequent tokens, it should have no binding strength nor closing character. I've tried if this value could be used to resolve infix/suffix ambiguity of x^:y, but it appears not. So I decided to resend this patch.
-
- Aug 10, 2016
-
-
Jun Wu authored
Before this patch, we don't have a safe way to undo a wrapfunction because other extensions may wrap the same function and calling setattr will undo them accidentally. This patch adds an "unwrapfunction" to address the issue. It removes the wrapper from the wrapper chain, and re-wraps everything, which is not the most efficient but short and easy to understand. We can revisit the code if we have perf issues with long chains. The "undo" feature is useful in cases like wrapping a function just in a scope. Like, having a "select" command to interactively (using arrow keys) select content from some output (ex. smartlog). It could wrap "ui.label" to extract interesting texts just in the "select" command.
-
Jun Wu authored
The getwrapperchain returns a list of wrappers + the original function, making it easier to understand what has been wrapped by whom. For example: In : mercurial.extensions.getwrapperchain(mercurial.dispatch, '_runcommand') Out: [<function hgext.pager.pagecmd>, <function hgext.color.colorcmd>, <function hgext.zeroconf.cleanupafterdispatch>, <function mercurial.dispatch._runcommand>] It will also be useful to safely unwrap a function. See the next patch.
-
Jun Wu authored
This patch adds two attributes about the original function and the unbound wrapper. It allows us to get a chain of wrappers. See the next patch.
-
Jun Wu authored
"f = inspect.currentframe()" instantly creates a cycle because "f.f_locals['f']" is "f" itself. This patch explicitly sets those frame objects to None to avoid cycles.
-
- Aug 09, 2016
-
-
Jun Wu authored
We may want a similar error handling at worker.py. This patch extracts the error handling logic to "callcatch" so it can be reused.
-
Pulkit Goyal authored
_winreg module is renamed to winreg in python 3. Added the conditionalize statements in the respective file because adding this in pycompat will result in pycompat throwing error as this is a windows registry module and we have buildbots and most of the contributors on linux.
-
- Aug 08, 2016
-
-
Pulkit Goyal authored
raise E,V,T is not acceptable in Python 3, thats is conditionalized. Moreover this will result in syntax error so we have to use exec() to execute this. Related PEP- https://www.python.org/dev/peps/pep-3109/#id14 My implementation is motivated from the six implementation except they are defining a new function exec_() to prevent adding an extra frame AFAIK :) https://bitbucket.org/gutworth/six/src/ca4580a5a648/six.py#six.py-680
-
- Aug 09, 2016
-
-
Hannes Oldenburg authored
Previously there were three local implementations of this function in cmdutil.files, cmdutil.remove and scmutil.addremove.
-
Gregory Szorc authored
Before, we logged about performing a branch cache update when we weren't actually doing it. Fix that.
-
- Aug 08, 2016
-
-
Pierre-Yves David authored
As we did for the shared extension itself, we add some locking around the write of the 'shared' file.
-
- Aug 07, 2016
-
-
Pierre-Yves David authored
This debug command can write local tags. local tags are in the .hg directory and should be covered by the 'wlock'. This is now covered.
-
- Aug 08, 2016
-
-
Pierre-Yves David authored
The merge state is supposed to be covered by the wlock. We fix the test extensions to comply to that.
-
- Aug 07, 2016
-
-
Pierre-Yves David authored
I do not see a reason why this should not be covered by the wlock.
-
Pierre-Yves David authored
Apparently when this command was added, the locking was forgotten. No code changes beside the indentation from the locking context.
-
- Aug 08, 2016
-
-
Katsunori FUJIWARA authored
Before this patch, check-py3-compat.py implies unintentional ".pure" sub-package name at loading pure modules, because module name is composed by just replacing "/" in the path to actual ".py" file by ".". This makes pure modules belong to "mercurial.pure" package, and prevents them from importing a module belonging to "mercurial" package relatively by "from . import foo" or so. This is reason why pure modules fail to import another module relatively only at examination by check-py3-compat.py.
-
Katsunori FUJIWARA authored
Recent work on mercurial/pure/mpatch.py made it import mercurial.policy, and changed output of check-py3-compat.py with python3 in test-check-py3-compat.t. But test-check-py3-compat.t isn't yet updated.
-
- Aug 07, 2016
-
-
Yuya Nishihara authored
MemoryError is handled differently in dispatch._runcatch(). Since mpatch_errors[] isn't that useful now, I've changed it to a simple switch statement.
-
- Aug 08, 2016
-
-
Gregory Szorc authored
Before this patch, the HTTP transport protocol would always zlib compress certain responses (notably "getbundle" wire protocol commands) at zlib compression level 6. zlib can be a massive CPU resource sink for servers. Some server operators may wish to reduce server-side CPU requirements while requiring more bandwidth. This is common on corporate intranets, for example. Others may wish to use more CPU but reduce bandwidth. This patch introduces a config option to allow server operators to control the zlib compression level. On the "mozilla-unified" generaldelta repository, setting this value to "0" (disable compression) results in server-side CPU utilization for a `hg clone` going from ~180s to ~124s CPU time on my i7-6700K. A level of "1" (which increases the transfer size from ~1,074 MB at level 6 to ~1,222 MB) utilizes ~132s CPU time.
-
- Aug 07, 2016
-
-
Gregory Szorc authored
This patch subtly changes the behavior of the parsing of "X.Y" values to not set the "section" variable when rendering a known sub-topic. Previously, "section" would be the same as the sub-topic name. This required the sub-topic RST to have a section named the same as the sub-topic name. When I made this change, the descriptions from help.internalstable started being rendered in command line output. This didn't look correct to me, as it didn't match the formatting of main help pages. I corrected this by moving the top section to help.internalstable and changing the section levels of all the "internals" topics. The end result is that "internals" topics now match the rendering of main topics on both the CLI and HTML. And, "internals" topics no longer require a main section matching the name of the topic.
-
- Aug 05, 2016
-
-
Pierre-Yves David authored
This clean up the rest of the previous changeset.
-
Pierre-Yves David authored
Now that we have a general try except, we can move the error handling from the individual writes in it. Code will be reindented in the next changeset to help this on readability.
-
Pierre-Yves David authored
We now attempt to acquire a lock and write the branch cache within that lock. This would prevent cache corruption when multiple processes try to write the cache at the same time.
-
Pierre-Yves David authored
The rev branch cache is written without a lock, we are going to fix this but we indent the code beforehand to make the next changeset clearer.
-
- Aug 07, 2016
-
-
Yuya Nishihara authored
It's false positive, but it wouldn't be possible for gcc to know PyBytes_FromStringAndSize() sets PyErr_Occurred(). mercurial/mpatch_module.c:105:47: warning: 'r' may be used uninitialized in this function [-Wmaybe-uninitialized] PyErr_SetString(mpatch_Error, mpatch_errors[-r]);
-
Yuya Nishihara authored
It was mistakenly made public at b9b9f9a92481.
-
Yuya Nishihara authored
-
Hannes Oldenburg authored
Subrepo logic is handled in ctx.walk().
-
- Aug 05, 2016
-
-
Pierre-Yves David authored
The static http repository are read only, there is no hope in any cache writing attempt.
-
- Aug 06, 2016
-
-
Katsunori FUJIWARA authored
This makes construction of _demandmod require explicit level value, and helps to avoid issues like issue5208 in the future.
-