Siddharth Agarwal <sid0@fb.com> [Fri, 12 Feb 2016 11:34:04 -0800] rev 28106
hook: even fewer parentheses for load errors
Missed this one.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 08 Feb 2016 17:34:32 +0100] rev 28105
destutil: document various failure cases
We document what various conditional branch mean and clarify that they are
exclusive (since they all end up in with exception raised).
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 08 Feb 2016 14:56:28 +0100] rev 28104
destutil: consistently retrieve 'p1' and 'branch'
We already read p1 from the dirstate so let's read the branch from it too.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 08 Feb 2016 14:55:58 +0100] rev 28103
merge: give priority to "not at head" failures for bare 'hg merge'
We refuse to pick a destination for a bare 'hg merge' if the working copy is not
at head. This is meant to prevent strange merge from user who forget to update.
(Moreover, such merge does not reduce actually the number of heads)
However, we were doing that as the last possible failure type. So user were
recommended to merge with an explicit head (from this bad location) if the
branch had too many heads.
We now make "not on branch heads" class of failure the first things to check
and fail on. The one test that change was actually trying to check for these
failure (and did not). The new test output is correct.
Pierre-Yves David <pierre-yves.david@fb.com> [Tue, 09 Feb 2016 21:14:37 +0000] rev 28102
destutil: extract all 'mergedest' abort messages into a dictionary
We plan to be able to reuse this function for rebase. The error
message explicitly refers to "merge" in multiple places. So we'll need
to be able to use different messages. The first step of that is to
extract all messages in a dedicated dictionary and use them
indirectly.
As a side effect it clarifies the actual function and opens the way to
various cleanups and fixes in future changesets.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 08 Feb 2016 14:03:45 +0100] rev 28101
tests: add an explicit destination in some rebase tests
As we will make 'rebase' behave more like 'merge', it will no longer pick
'max(branch(.))' as the default destination. We have to hard code the expected
destination is multiple tests where it matters. After a careful inspection none
of theses tests really cares about the default destination behavior and just
omitted one out of laziness.
Pierre-Yves David <pierre-yves.david@fb.com> [Mon, 08 Feb 2016 14:02:53 +0100] rev 28100
tests: remove third head in some of the 'rebase-parameters' tests
These tests do not care about that extra branch at all. In future changeset we
will make rebase behave like merge and abort in case of an ambiguous destination
(eg: multiple other heads) and that extra branch will make the command
invocation breaks.
We preventively remove this extra branch from the relevant tests in an
independant changeset to reduce noise and increase confidence in the final
change.
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Feb 2016 15:21:39 +0900] rev 28099
run-tests: allow to specify executable of any name by --with-hg
If the executable is not named as "hg", TTest runner inserts alias. This
way, we can run tests with chg. But it is still warned because the alias
does not always work. We do "$BINDIR"/hg in a few places.
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Feb 2016 16:02:41 +0900] rev 28098
run-tests: drop redundant assignment to BINDIR
We do it a few lines after.
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Feb 2016 16:00:05 +0900] rev 28097
run-tests: cast --with-hg option to bytes consistently at parseargs()
parseargs() sets bytes to options.with_hg if --local is specified, so do
the same for --with-hg.
Yuya Nishihara <yuya@tcha.org> [Sun, 07 Feb 2016 15:53:02 +0900] rev 28096
run-tests: do not compare bytes with str while ordering tests
It failed on Python 3.
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:51:44 -0800] rev 28095
clonebundles: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:50:45 -0800] rev 28094
churn: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:34:32 -0800] rev 28093
children: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:33:10 -0800] rev 28092
censor: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:31:50 -0800] rev 28091
bugzilla: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:30:38 -0800] rev 28090
blackbox: use absolute_import
Gregory Szorc <gregory.szorc@gmail.com> [Tue, 09 Feb 2016 17:29:39 -0800] rev 28089
acl: use absolute_import
Continuing the march towards Python 3.
Durham Goode <durham@fb.com> [Thu, 11 Feb 2016 17:23:10 -0800] rev 28088
checkunknown: audit path before checking if it's a file or link
Previously we would lstat the file to see if it was a file or a link before
attempting to process it. If the file happened to exist across a symlink, and if
that symlink was pointing to a network file system, that check could be very
expensive.
The new logic audit's the path to avoid symlinks before performing the lstat on
the file itself.
In our situation, this shaved 10 minutes off of certain hg updates.
300 files * (2 seconds - the network filesystem lookup time)
Durham Goode <durham@fb.com> [Thu, 11 Feb 2016 17:04:33 -0800] rev 28087
pathauditor: change parts verification order to be root first
Previously, when we verified the parts of a path in the auditor, we would
validate the deepest directory first, then it's parent, and so on up to the
root. If there happened to be a symlink in the chain, that meant our first check
would likely traverse that symlink. In some cases that symlink might point to
a network filesystem that is expensive, and therefore this simple check could be
very slow.
The fix is to check the path parts starting at the root and working our way
down.
This has a minor performance difference in that we used to be able to short
circuit from the audit if we reached a directory that had already been checked.
Now we can't, but the cost is N dictionary look ups, where N is the number of
parts in the path, which should be fairly minor.
Yuya Nishihara <yuya@tcha.org> [Tue, 19 Jan 2016 22:31:59 +0900] rev 28086
chg: forward job control signals to worker process (
issue5051)
This is necessary to suspend/resume long pulls, interactive curses session,
etc.
The implementation is based on emacsclient, but our version doesn't test if
chg process is foreground or not before propagating SIGCONT. This is because
chg isn't always an interactive session. If we copy the SIGTTIN/SIGTTOU
emulation from emacsclient, non-interactive session can't be moved to a
background job.
$ chg pull
^Z
suspended
$ bg %1
[1] continued
[1] suspended (tty input) # wrong
https://github.com/emacs-mirror/emacs/blob/0e96320/lib-src/emacsclient.c#L1094
Yuya Nishihara <yuya@tcha.org> [Fri, 29 Jan 2016 22:52:16 +0900] rev 28085
chg: verify return value of sigaction() and sigemptyset()
They should never fail, but it couldn't hurt to be a paranoid.
Yuya Nishihara <yuya@tcha.org> [Fri, 29 Jan 2016 22:42:22 +0900] rev 28084
chg: initialize sigaction fields more reliably
It seems calling memset() and sigemptyset() is common pattern to initialize
sigaction. And strictly speaking, sigset_t must be initialized by sigemptyset()
or sigfillset(). I saw git and uwsgi do that way, so let's follow them.
Simon Farnsworth <simonfar@fb.com> [Fri, 12 Feb 2016 06:25:05 -0800] rev 28083
tests: confirm that a badly documented extension doesn't cause a crash
An external extension whose docstring doesn't conform to Mercurial standards
used to cause crashes. Test that we omit such extensions when you do a
keyword search.