- Jun 16, 2016
-
-
Martin von Zweigbergk authored
When grafting/rebasing, it is common for multiple changesets to make the same change to a subdirectory. When writing the revlog for the directory, the revlog code already takes care of not writing the entry again. In 0c2a088ffcc5 (changegroup: prune subdirectory dirlogs too, 2016-02-12), I added the corresponding code in changegroup (not sending entries the client already has), but I forgot to avoid sending the entire changegroup if no nodes remained in the pruned set. Although that's harmless besides the wasted network traffic, the receiving side was checking for it (copied from the changegroup code for handling files). This resulted in the client crashing with: abort: received dir revlog group is empty Fix by simply not emitting a changegroup for the directory if there were no changes is it. This matches how files are handled.
-
- Jun 15, 2016
-
-
Yuya Nishihara authored
Otherwise the terminal would be left with unclean state. This is what fcc4b55876c3 does.
-
Yuya Nishihara authored
Our signal handlers forward signals to the server process, but it will disappear soon after hgc_close(). So we should unregister handlers before hgc_close(). Otherwise chg would abort due to kill(perrpid, sig) failure. The problem is spotted by SIGWINCH while waiting pager termination.
-
- Jun 12, 2016
-
-
Katsunori FUJIWARA authored
This is followup for patches below, which add checkambig argument to existing function. - 731ced087a4b - 76f1ea360c7e - ce2d81aafbae - a109bf7e0dc2
-
Yuya Nishihara authored
This will allow us to clear in-memory password storage per runcommand(). I've updated commandserver to call resetstate() of both ui and repo.ui because they may have different states in theory.
-
- Jun 11, 2016
-
-
Yuya Nishihara authored
This function will be used in _optimize() to get rid of noop sort() call while validating its arguments.
-
- Jun 15, 2016
-
-
Yuya Nishihara authored
Prepares for extracting a function that only validates sort options.
-
- Jun 11, 2016
-
-
Yuya Nishihara authored
Prepares for extracting a function that only validates sort options.
-
- Jun 15, 2016
-
-
Yuya Nishihara authored
Make it noop as before 2188f170f5b6. We could change it to an error, but allowing empty key makes some sense for scripting that builds a key string programmatically.
-
- Jun 13, 2016
-
-
Kostia Balytskyi authored
-
Kostia Balytskyi authored
-
Kostia Balytskyi authored
-
Kostia Balytskyi authored
rebaseruntime is a class that will in future contain all of the state necessary to perform rebase operation and have pieces of rebase logic as its methods. This commit introduces the class and moves the following local variables to be its fields: - originalwd - external - state - activebookmark
-
- Jun 15, 2016
-
-
Jun Wu authored
As discussed at https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-June/085290.html The default 10-second timeout is not enough if the machine is overloaded. Let's increase it to 60 seconds.
-
Durham Goode authored
The recently introduced (ecc9b788fd69) test around malformed pem files hard codes an error message which doesn't appear to be cross platform agnostic. On our machines (centos6 if it matters) the test output differs: - abort: error: unknown error* (glob) + abort: error: _ssl.c:330: error:00000000:lib(0):func(0):reason(0) This patch increases the glob to cover the entire error message.
-
- Jun 14, 2016
-
-
liscju authored
In storefactory opening store is the main functionality, so it shouldn't be marked as private with underscore.
-
- Jun 13, 2016
-
-
liscju authored
-
- Jun 12, 2016
-
-
Katsunori FUJIWARA authored
In some cases below, copying from backup is used to restore original contents of a file, which is backuped via addfilegenerator(). If copying keeps ctime, mtime and size of a file, restoring is overlooked, and old contents cached before restoring isn't invalidated as expected. - failure of transaction (from '.hg/journal.backup.*') - rollback of previous transaction (from '.hg/undo.backup.*') To avoid ambiguity of file stat at restoring, this patch invokes util.copyfile() with checkambig=True. This patch is a part of "Exact Cache Validation Plan": https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
-
Katsunori FUJIWARA authored
Rollback of previous transaction restores contents of files below by renaming from 'undo.*' file. If renaming keeps ctime, mtime and size of a file, restoring is overlooked, and old contents cached before restoring isn't invalidated as expected. - .hg/bookmarks - .hg/phaseroots To avoid ambiguity of file stat at restoring, this patch invokes vfs.rename() with checkambig=True. BTW, .hg/dirstate is also restored at rollback. But it is restored by dirstate.restorebackup(), and previous patch already made it invoke vfs.rename() with checkambig=True. This patch is a part of "Exact Cache Validation Plan": https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
-
Katsunori FUJIWARA authored
File .hg/dirstate is restored by renaming from backup in failure inside scopes below. If renaming keeps ctime, mtime and size of a file, restoring is overlooked, and old contents cached before restoring isn't invalidated as expected. - dirstateguard scope (from '.hg/dirstate.SUFFIX') - transaction scope (from '.hg/journal.dirstate') To avoid ambiguity of file stat at restoring, this patch invokes vfs.rename() with checkambig=True. This patch is a part of "Exact Cache Validation Plan": https://www.mercurial-scm.org/wiki/ExactCacheValidationPlan
-
- Jun 11, 2016
-
-
Denis Laxalde authored
-
- Jun 14, 2016
-
-
Matt Mackall authored
-
- Jun 13, 2016
-
-
Martijn Pieters authored
Sort revisions in reverse revision order but grouped by topographical branches. Visualised as a graph, instead of: o 4 | | o 3 | | | o 2 | | o | 1 |/ o 0 revisions on a 'main' branch are emitted before 'side' branches: o 4 | o 1 | | o 3 | | | o 2 |/ o 0 where what constitutes a 'main' branch is configurable, so the sort could also result in: o 3 | o 2 | | o 4 | | | o 1 |/ o 0 This sort was already available as an experimental option in the graphmod module, from which it is now removed. This sort is best used with hg log -G: $ hg log -G "sort(all(), topo)"
-
Martijn Pieters authored
This move is to prepare the adaptation of this function into a toposort predicate.
-
- Jun 14, 2016
-
-
Martijn Pieters authored
A later revision adds actual topographical sorting. Recording if a set is in this order allows hg log -G to avoid re-sorting the revset.
-
- Jun 13, 2016
-
-
Jun Wu authored
Before this patch, chg will give up when it cannot connect to the new server within 10 seconds. If the host has high load during that time, 10 seconds is not enough. This patch makes it adjustable using the CHGTIMEOUT environment variable.
-
- Jun 11, 2016
-
-
Jun Wu authored
Before this patch, chg uses the old pager behavior (pre 369741ef7253), which executes pager in the main process. The user will see the exit code of the pager, instead of the hg command. Like 369741ef7253, this patch fixes the behavior by executing the pager in the child process, and wait for it at the end of the main process.
-
- Jun 13, 2016
-
-
Jun Wu authored
The test is valid for both hg and chg. Since we are adding another chg-related pager test, let's put them together.
-
- Jun 10, 2016
-
-
durin42 authored
This used to be needed to paper over hashlib not being in all Pythons we support, but that's not a problem anymore, so we can simplify things a little bit.
-
durin42 authored
All versions of Python we support or hope to support make the hash functions available in the same way under the same name, so we may as well drop the util forwards.
-
durin42 authored
-
durin42 authored
Also remove module-local _sha alias, which was barely used.
-
durin42 authored
Also remove module-local alias to _sha, since it's not used that much.
-
durin42 authored
Spotted by my emacs config that cleans up extra whitespace.
-
durin42 authored
Spotted by my emacs config that cleans up extra whitespace.
-
- Jun 08, 2016
-
-
Martijn Pieters authored
This is somewhat redundant now, but allows us to add a toposort that should not be re-sorted either.
-
Gregory Szorc authored
Recent work has introduced the [hostsecurity] config section for defining per-host security settings. This patch builds on top of this foundation and implements the ability to define a per-host path to a file containing certificates used for verifying the server certificate. It is logically a per-host web.cacerts setting. This patch also introduces a warning when both per-host certificates and fingerprints are defined. These are mutually exclusive for host verification and I think the user should be alerted when security settings are ambiguous because, well, security is important. Tests validating the new behavior have been added. I decided against putting "ca" in the option name because a non-CA certificate can be specified and used to validate the server certificate (commonly this will be the exact public certificate used by the server). It's worth noting that the underlying Python API used is load_verify_locations(cafile=X) and it calls into OpenSSL's SSL_CTX_load_verify_locations(). Even OpenSSL's documentation seems to omit that the file can contain a non-CA certificate if it matches the server's certificate exactly. I thought a CA certificate was a special kind of x509 certificate. Perhaps I'm wrong and any x509 certificate can be used as a CA certificate [as far as OpenSSL is concerned]. In any case, I thought it best to drop "ca" from the name because this reflects reality.
-
- May 27, 2016
-
-
Yuya Nishihara authored
SSL handling in mail.py wasn't covered by our test suite, therefore it was sometimes broken. This patch introduces pretty minimal tests that only cover the default path. We can extend it later. Tested with python 2.6.9 and 2.7.11 on Debian sid.
-
Yuya Nishihara authored
Currently it only supports SMTP over SSL since SMTPS should be simpler than handling StartTLS. Since we don't need asynchronous server for our tests, it does TLS handshake in blocking way. But asyncore is required by Python smtpd module.
-
Yuya Nishihara authored
They can be reused in SMTPS tests.
-