revert: explode the action tuple in the for loop
noop is about to gain a message.
revert: use actions[...] in all disptable cases
1. Special cases are not special enough
2. There are two cases where nothing is done and a message is displayed. This
prepares it.
revset: factorize backup decision
The conditional controlling the creation of backup is fairly big. We move config
related decisions outside of the loop.
revert: use a flat dispatch table
Now that the table is simpler, remove one level of depth from it. This
simplifies its usage in the for loop.
pushbookmark: do not attempt to update bookmarks if the push failed (BC)
Before this patch, there was always an attempt to update bookmark even if prior
steps of the push failed. I cannot see a good semantic reason to do so. We
disable this possibility to simplify the push flow with bundle2. Bookmarks will
be included in the bundle and fail with other steps.
pushbookmark: remove a <cond> and <val> or <other> construct
We make the conditional explicit for the sake of readability.
pushbookmark: stop unrolling ancestors
Now that ancestors has the same boolean property as a list, we can stop unrolling
the set of ancestors. This should provide a significant speedup to this step as
ancestor objects are smart and lazy.
ancestors: add a __nonzero__ method
This allows using the object in a conditional the same way we can use list.
push: update bookmarks within the remote lock
Updating bookmarks is part of the push. It should be done within the same lock
as the other steps of the push.
hgweb: refresh repository using URL not path (
issue4323)
hgweb detects out-of-date repository instances (using a highly
suspect mechanism that should probably be fixed) and obtains a new
repository object if needed.
This patch changes the repository object copy to use the repo URL
(instead of path). This preserves more information about the source
repository and allows bundles to be served through hgweb.
A test verifying that bundles can now be served properly via
`hg serve` has been added.