bookmarks: further flatten code

This hopefully clarifies the behavior when no NAME is passed, by
separating the branches for listing bookmarks vs. deactivating the
current bookmark.
largefiles: fix a traceback in lfconvert if a largefile is missing (issue3519)

The largefile may be missing for various reasons, including that a remote
repository was cloned without the --all-largefiles option.  Therefore, it seems
reasonable to attempt to download the missing files and failing that, abort and
indicate the affected file and revision so the user can manually fix the
problem.
largefiles: always create the cache and standin directories when cloning

The standin matcher only works if the .hglf directory exists (and it won't exist
if 'clone -U' is used, unless --all-largefiles is also specified).  Since not
even 'update -r null' will get rid of the standin directory, this ensures that
the standin directory always exists if the repo has the 'largefiles'
requirement.  This requirement is only set after a largefile is committed, so
these directories will not be created for repos that have the extension enabled
but have not committed a largefile.

With the standin directory in place, 'lfconvert --to-normal' will now be able to
download the required largefiles when converting a repo that was created with
'clone -U', and whose files are not in the usercache.

The downloadlfiles command could probably be put inside the 'largefiles'
requirement conditional too, but given that the user specified --all-largefiles,
there is likely an expectation to print out the number of largefiles downloaded,
even if it is 0.
obsolete: rename `getobscache` into `getrevs`

The old name was not very good for two reasons:
- caller does not care about "cache",
- set of revision returned may not be obsolete at all.

The new name was suggested by Kevin Bullock.
obsolete: rename `anysuccessors` into `allsuccessors`

The "any" prefix looks like it returned a boolean. `allsuccessors` is more
accurate.
obsolete: have `allsuccessors` takes a list of nodes

Additional logic, used to detect mutable history troubles, will need to quickly
compute successors of a whole set of changeset.
obsolete: add the detection of bumped changeset.

Bumped changesets are non-public changesets that tries to succeed a public()
changeset.
revset: add a bumped revset

Select bumped changesets.
debugobsolete: add --flags option

This options allows to specify the `flag` part of obsolete markers. For details
about marker flags, check the `mercurial/obsolete.py` documentation. Some random
flag are added to a marker to test this feature.
obsolete: add a flag that allows fixing "bumped" changeset

The first obsolescence flag is introduced to allows for fixing the "bumped"
changeset situation.

    bumpedfix == 1.

Creator of new changesets intended to fix "bumped" situation should not forget
to add this flag to the marker. Otherwise the newly created changeset will be
bumped too. See inlined documentation for details.
context: add a `bumped` method to `changectx`

Same as `unstable()`, returns true if the changeset is bumped.
obsolete: simplify push abort message

to:   push includes xxx changeset: yyyyyyyyyy
push: refuse to push bumped changeset

This applies the same logic as used for `obsolete` and `unstable` changesets.
Refuse to push them without force.

We'll probably want to factor this logic with two new functions
`pctx.troubled()` and `ctx.troubles()`. But I'm waiting for the third
"trouble" to make it into core.
largefiles: distinguish "no remote repo" from "no files to upload" (issue3651)

Before this patch, when no files to upload, "hg outgoing --large" and
"hg summary --large" show "no remote repo", even though valid remote
repository is specified.

It is because that "getoutgoinglfiles()" returns None, not only if no
valid remote repository is specified, but also if no files to upload.

This patch makes "getoutgoinglfiles()" return empty list when no files
to upload, and makes largefiles show "no files to upload" message at
that time.

This patch doesn't test "if toupload is None" route in
"overrideoutgoing()", because this route is not executed unless remote
repository becomes inaccessible just before largefiles specific
processing: successful execution of "orig()" means that at least one
of "default", "default-push" or dest is valid one, and that
"getoutgoinglfiles()" never returns None in such cases.

At "hg summary --large" invocation, this patch shows message below:

    largefiles: (no files to upload)

This follows the message shown by "hg summary" with MQ:

    mq:     (empty queue)