- Jul 01, 2016
-
-
Pulkit Goyal authored
The thread module in py3 is renamed to _thread, but we can use the high level threading module instead.
-
- Jun 28, 2016
-
-
Pulkit Goyal authored
The httplib library is renamed to http.client in python 3. So the import is conditionalized and a test is added in check-code to warn to use util.httplib
-
- Jun 30, 2016
-
-
Gregory Szorc authored
If no CA certificates are loaded, that is almost certainly a/the reason certificate verification fails when connecting to a server. The modern ssl module in Python 2.7.9+ provides an API to access the list of loaded CA certificates. This patch emits a warning on modern Python when certificate verification fails and there are no loaded CA certificates. There is no way to detect the number of loaded CA certificates unless the modern ssl module is present. Hence the differences in test output depending on whether modern ssl is available. It's worth noting that a test which specifies a CA file still renders this warning. That is because the certificate it is loading is a x509 client certificate and not a CA certificate. This test could be updated if anyone is so inclined.
-
Gregory Szorc authored
I'm not a fan of TLS tests not testing both branches of a possible configuration. While we have test coverage of the inability to validate a cert later in this file, I insist that we add this branch so our testing of security code is extra comprehensive.
-
Gregory Szorc authored
Before, we would call SSLContext.load_default_certs() when certificate verification wasn't being used. Since SSLContext.verify_mode == ssl.CERT_NONE, this would ideally no-op. However, there is a slim chance the loading of system certs could cause a failure. Furthermore, this behavior interfered with a future patch that aims to provide a more helpful error message when we're unable to load CAs. The lack of test fallout is hopefully a sign that our security code and tests are in a relatively good state.
-
Gregory Szorc authored
Before, sslcontext.load_verify_locations() would raise a ssl.SSLError which would be caught further up the stack and converted to a urlerror. By that time, we lost track of what actually errored. Trapping the error here gives users a slightly more actionable error message. The behavior between Python <2.7.9 and Python 2.7.9+ differs. This is because our fake SSLContext class installed on <2.7.9 doesn't actually do anything during load_verify_locations: it defers actions until wrap_socket() time. Unfortunately, a number of errors can occur at wrap_socket() time and we're unable to ascertain what the root cause is. But that shouldn't stop us from providing better error messages to people running a modern and secure Python version.
-
Gregory Szorc authored
smf reported that an environment with no loaded CA certs resulted in a weird error. I'd like to detect this a bit better so we can display an actionable error message. The actual error being globbed over in this patch is "unknown error" with a ssl.c line number. That isn't useful at all.
-
- Jun 06, 2016
-
-
Maciej Fijalkowski authored
This is to allow more flexibility with the C sources -- now the bitmanipulation routines can be safely imported without importing Python.h
-
- Jun 24, 2016
-
-
Martijn Pieters authored
Records bookmark locations and shows you where bookmarks were located in the past. This is the first in a planned series of locations to be recorded; a future patch will add working copy (dirstate) tracking, and remote bookmarks will be supported as well, so the journal storage format should be fairly generic to support those use-cases.
-
- Jun 27, 2016
-
-
durin42 authored
As of that revision, httpplus fully supports Python 3, including mimicing all the subtle behavior changes around headers in Python 3's http.client.
-
Yuya Nishihara authored
Before the error was caught at func() as an unknown identifier, and the optimizer failed to detect the syntax error. This patch introduces getsymbol() helper to ensure that a string is not allowed as a function name.
-
- Jun 28, 2016
-
-
Yuya Nishihara authored
-
- Jun 29, 2016
-
-
Anton Shestakov authored
It was mixing tabs and spaces, and not in a good way. Indent style of other atom entries seems to be 1 space per level, so let's apply it here as well.
-
Anton Shestakov authored
filelog in atom style uses changelogentry to show commits, and atom/filelogentry.tmpl doesn't even exist.
-
Anton Shestakov authored
Since content is of type "text" (and is already escaped), using a CDATA section is not required. Looks like this was just an artifact of copying things from rss style in add2f9ddcfb5, because other entries in atom style don't use CDATA in such places.
-
Anton Shestakov authored
It was mixing tabs and spaces, and not in a good way. Indent style of other rss entries seems to be 4 spaces per level, so let's apply it here as well.
-
Anton Shestakov authored
-
- Jun 27, 2016
-
-
Pulkit Goyal authored
The conditionalize imports are added in util.py and now we import modules from there. So adding tests so that someone in future can use that.
-
Pulkit Goyal authored
The SocketServer is renamed to socketserver in python 3
-
Pulkit Goyal authored
The xmlrpclib library is renamed to xmlrpc.client in python 3
-
Pulkit Goyal authored
The urlparse library is renamed to urllib.parse in python 3
-
Pulkit Goyal authored
The lower part of the test runs with python 3 and hence remain unchanged.
-
- Jun 24, 2016
-
-
Jun Wu authored
If the user press 'q' to leave the 'less' pager, it is expected to end the hg process immediately. We currently rely on SIGPIPE for this behavior. But SIGPIPE won't arrive if we don't write anything (like doing heavy computation, reading from network etc). If that happens, the user will feel that the hg process just hangs. The patch address the issue by adding a SIGCHLD signal handler and sends SIGPIPE to the server as soon as the pager exits. This is also an issue with hg's pager implementation.
-
Jun Wu authored
We rely on SIGPIPE to exit when the pager exits. And Python ignores SIGPIPE by default. Explicitly set SIGPIPE handler to SIG_DFL (terminate) just like pager.py.
-
Martin von Zweigbergk authored
The directory argument (for tree manifests) should belong to to the --dir argument. I had mistakenly made --dir a flag. One effect of this was that I had meant for "-m" to be optional, but instead it changed the behavior of --dir, so with "hg debugdata -m --dir dir1 0", the -m took over and the "dir1" got treated as a revision in the root manifest log.
-
Martin von Zweigbergk authored
Before this change, "hg debugdata -c 0 foo" was allowed.
-
- Jun 26, 2016
-
-
Yuya Nishihara authored
Actually there was no additional error checking. It should be caught by "not all(specs)".
-
- Jun 24, 2016
-
-
Martijn Pieters authored
-
- Mar 13, 2016
-
-
Gregory Szorc authored
-
- Jun 27, 2016
-
-
Henrik Stuart authored
When displaying patches from graphical tools where you can browse through individual files, with diff being called separately on each, recomputing the limits of file copy history can become rather expensive on large repositories. Instead, we can compute it once and pass it in for subsequent calls.
-
- Jun 23, 2016
-
-
liscju authored
Problem was files to check were gathered in the repository where the verify was launched but verification was done on the remote store. It was observed when user committed in cloned repository and ran verify before pushing - committed files were marked as non existing. This commit fixes this by checking in the remote store only files that are not existing in the repository store where verify was launched. Solution is similiar to fd288d118074
-
- Jun 27, 2016
-
-
liscju authored
It does not conform to the coding style.
-
- Jun 24, 2016
-
-
liscju authored
Problem in both cases is cache in largefiles has assigned meaning - user cache which is additional place to get/put files. Those two function works on store - the main place to store largefiles in the repository - .hg/largefiles and using "cache" to describe it is misleading.
-
- Jun 26, 2016
-
-
Gregory Szorc authored
match() is the special case of a single element list being passed to matchany() with the additional error checking that the revset spec is defined. Change the implementation to remove the redundant code and have match() call matchany().
-
Gregory Szorc authored
I can never remember the differences between the various revset APIs. I can never remember that scmutil.revrange() is the one I want to use from user-facing commands. Add some documentation to clarify this. While we're here, the argument name for revrange() is changed to "specs" because that's what it actually is.
-
- Jun 25, 2016
-
-
Gregory Szorc authored
The use of __slots__ was added way back in 2006 in 4ec58b157265. __slots__ isn't necessary for this class.
-
- Jun 26, 2016
-
-
Gregory Szorc authored
Other parts of this expression are already using unicode literals. We need this to make Python 3 happy and to avoid an implicit conversion in Python 2.
-
Gregory Szorc authored
Looks like we missed this in 800ec7c048b0.
-
Gregory Szorc authored
Now that we have a mechanism for declaring path sub-options, we can start to pile on features! Many power users have expressed frustration that bare `hg push` attempts to push all local revisions to the remote. This patch introduces the "pushrev" path sub-option to control which revisions are pushed when no "-r" argument is specified. The value of this sub-option is a revset, naturally. A future feature addition could potentially introduce a "pushnames" sub-options that declares the list of names (branches, bookmarks, topics, etc) to push by default. The entire "what to push by default" feature should probably be considered before this patch lands.
-
Gregory Szorc authored
As part of developing a subsequent patch I discovered that sub-option values like "." were getting converted to paths. This is because the [paths] section is treated specially during config loading. This patch prevents post-processing sub-options from the [paths] section.
-