log: make "slowpath" condition slightly more readable
Before
8e0e334bad42 and
6c76c42a5893, the condition was "anypats() or
(files() and --removed)". This can be read as "<match is actually slow>
or <walk files including removed revs>". So "not always()" (i.e. walk
file revs) seems more appropriate here.
The logic should be unchanged:
not anypats() => always() or isexact() or prefix()
isexact() => not always()
prefix() => not always()
completion: add support for new "amend" command
The command is now shipped with Mercurial, but completion should be
helpful (and accurate) for users of the amend command shipped with the
evolve extension too.
Differential Revision: https://phab.mercurial-scm.org/D1716
completion: don't suggest clean files to revert
It looks like we used to suggest only modified, added, removed and
deleted files to revert until
a821ec835223 (completion: selectively
use debugpathcomplete in bash_completion, 2013-03-21). The reasoning
in that commit was that getting the status was too slow and the
replacement (debugpathcomplete) seems to make sense for the other two
commands (remove and forget), but I'm not sure it was intentional to
change the behavior of completion for revert. Note that "add" and
"diff" already use status-based completion.
Differential Revision: https://phab.mercurial-scm.org/D1715
split: new extension to split changesets
This diff introduces an experimental split extension to split changesets.
The implementation is largely inspired by Laurent Charignon's implementation
for mutable-history (changeset
9603aa1ecdfd54b0d86e262318a72e0a2ffeb6cc [1])
This version contains various improvements:
- Rebase by default.
This is more friendly for new users. Split won't lead to merge conflicts
so a rebase won't give the user more trouble.
This has been on by default at Facebook for months now and seems to be a
good UX improvement.
The rebase skips obsoleted or orphaned changesets, which can avoid
issues like allowdivergence, merge conflicts, etc. This is more flexible
because the user can decide what to do next (see the last test case in
test-split.t)
- Remove "Done split? [y/n]" prompt.
That could be detected by checking `repo.status()` instead.
- Works with obsstore disabled.
Without obsstore, split uses strip to clean up old nodes, and it can
even handle split a non-head changeset with "allowunstable" disabled,
since it runs a rebase to solve the "unstable" issue in a same
transaction.
- More friendly editor text.
Put what has been already split into the editor text so users won't lost
track about where they are.
[1]: https://bitbucket.org/marmoute/mutable-history/commits/
9603aa1ecdfd54b
Differential Revision: https://phab.mercurial-scm.org/D1082
worker: handle interrupt on windows
After applying suggestions from https://phab.mercurial-scm.org/D1564
to catch all exceptions in the same way I actually broke the handling of
KeyboardInterrupt on windows. The reason is that KeyboardInterrupt doesn't
dervie from Exception, but BaseException:
https://docs.python.org/2/library/exceptions.html starting from python 2.5
Test Plan:
Run hg on windows and ctrl-c during a large update. No random
exceptions from threads surface in the shell. Previously we'd nearly always get
stack traces from some of threads
Run tests ./run-tests.py
[...]
Failed test-convert-svn-encoding.t: output changed
# Ran 622 tests, 41 skipped, 1 failed.
python hash seed:
2962682116
The test failing seems to have nothing to do with the change and fails on base
revision as well
Differential Revision: https://phab.mercurial-scm.org/D1718
lfs: fix committing deleted files caused by
e0a1b9ee93cd
e0a1b9ee93cd (lfs: add a repo requirement for this extension once an lfs
file is committed) introduced a regression that prevents committing file
deletion. This patch fixes that.
Differential Revision: https://phab.mercurial-scm.org/D1717
tests: update expected output of svn encoding test
The changes I see on the buildbot match the ones I see on my laptop,
and all look reasonable.
Differential Revision: https://phab.mercurial-scm.org/D1713