revset: optimize building large lists in formatrevspec
The large or-expressions we used to build required a substantial
amount of subset filtering in orset() which was inefficient. Instead we build a
single string which we process in one go with a special internal predicate.
hg-ssh: use shlex for shell-like parsing of SSH_ORIGINAL_COMMAND
The Mercurial ssh protocol is defined as if it was ssh-ing to a shell account on
an ordinary ssh server, and where hg was available in $PATH and it executed
the command "hg -R REPOPATH serve --stdio".
The Mercurial ssh client can in most cases just pass REPOPATH to the shell, but
if it contains unsafe characters the client will have to quote it so the shell
will pass the right -R value to hg. Correct quoting of repopaths was introduced
in
d8fa35c28335 and tweaked in
86fc364ca5f8.
hg-ssh doesn't create the command via a shell and used a simple parser instead.
It worked fine for simple paths without any quoting, but if any kind of quoting
was used it failed to parse the command like the shell would do it.
This makes hg-ssh behave more like a normal shell with hg in the path would do.
hooks: prioritize run order of hooks
As of Mercurial 1.3, hooks are sorted in the order they are read into
Mercurial. There are many instances when someone may want the hooks
sorted in a specific order; this patch allows prioritizing hooks, while
maintaining the existing enumeration for hooks without a priority.
merge: report all files in _checkunknown
When doing hg up, if there is a file conflict with untracked files,
currently only the first such conflict is reported. With this patch,
all of them are listed.
With this patch error message is now reported as
a: untracked file differs
b: untracked file differs
abort: untracked files in working directory conflict with files in
requested revision
instead of
abort: untracked file in working directory differs from file in
requested revision: 'a'
This is a follow up to an old attempt to do this here:
http://selenic.com/pipermail/mercurial-devel/2011-August/033625.html
discovery: fix prepush documentation
The prepush documentation claim that when we refuse to push, the second element
of the returng tuple is an "outgoing" integer. value should be 0 when no
outgoing changeset and 1 otherwise. In pratice if there are no outgoing
changeset, "outgoing" value is alway 1 and util.Abort is raised on other error.
the stable branch also include this error so it wasn't introduced by a recent
refactoring.
phases: simplify phase exchange and movement over pushkey
The code now only exchange draft root and only care about movement related to
public//draft boundary.
There is multiple reason to simplify this code:
* Secret are never discovered anymore
* We decided to not support more the three existing phase
Removing phase index from pushkey (if ever decided) will be made in another commit.
phases: move phase according what was pushed not only what was added added
This fix the lack phase movement when a locally secret changeset without added
children was pushed to the repository. In such case, this changeset would be
present in the bundle source, but not in the ``added`` variable.