filemerge: give some variables in _xmerge more descriptive names
Differential Revision: https://phab.mercurial-scm.org/D2886
rebase: allow in-memory merge of the working copy parent
Before this patch and when the rebase involved the working copy parent
(and thus the working copy too), we would not do in-memory rebase even
if requested to. The in-code comment explains that the reason had
something to do with avoiding an extra update, but I don't know which
update that refers to. Perhaps an earlier version of the code used to
update to the destination before rebasing even if in-memory rebase was
requested? That seems to not be done at least since
aa660c1203a9
(rebase: do not bail on uncomitted changes if rebasing in-memory,
2017-12-07).
To see if this still made it slower, I create a single tiny commit on
top of one branch of the mozilla-unified repo (commit
a1098c82 to be
exact) and rebased it to another branch (commit
d4e9a7be). Before this
patch that took 11.8s and after this patch it took 8.6s (I only did
two runs each, but the timings were very consistent).
Differential Revision: https://phab.mercurial-scm.org/D2876
uncommit: simplify condition for keeping commit
We used to keep the commit if it would have become empty and --keep
was not passed. Since we just changed it so we also keep it if any
patterns were passed on the command line, the only remaining case
where we prune the commit is when no arguments were passed and --keep
was not passed either, we can simplify the "not files and not
allowempty" to just "not allowempty". Let's also rename "allowempty"
to "keepcommit" since it's no longer about allowing an empty commit.
Differential Revision: https://phab.mercurial-scm.org/D2891
uncommit: document when the commit will be pruned
Differential Revision: https://phab.mercurial-scm.org/D2890
uncommit: leave empty commit if all files are uncommitted
We had instructions for our internal users to add copy information
after commit like this:
hg uncommit <srcfile> <dstfile>
hg cp --after <srcfile> <dstfile>
hg amend
That usually works, but if the rename was the only change in that
commit, then the commit would get pruned. It's easy to fix the recipe:
just pass the --keep option. However, it seems too subtle, so I think
this is an indication that the commit should not be pruned if any
patterns were given.
Differential Revision: https://phab.mercurial-scm.org/D2862
test-template-engine: do not evaluate unused keywords by custom engine
If the custom engine, "mytemplater", were installed as the default, it would
enter to an infinite recursion at stringify(v) because template keywords may
generate a nested mapping containing the same keywords.
Spotted by a future patch which will replace context.resource('templ')(...)
with context.process(...).
revbranchcache: advertise and use 'rbc' exchange capability
The feature is now advertised and use.
Updating the branchmap cache can be very expensive (up to minutes on large
repository) and fetching revision branch data is about 80% of that. Exchanging
the rev branch cache over the wire really help to recover from branch map
invalidation.
(There is a good chance other in flight chance would conflict on
test-http-bad-server.t and other. So here is a small note to help update that
test again: capabilities=19bytes, part-107bytes)
revbranchcache: disable the new part for narrow hg bundle
The lack of some revisions confuses the new cache part. To simplify things, we
disable it for now.