dirstate: remove obsolete comment from setbranch

This comment should have been removed in e689b0d91546, when the call
to scmutil.checknewlabel was removed.
rebase: fix pull --rev options clashing with --rebase (issue3619)

Rebase also have a plain `--rev` option used to select the rebase set (as
`--base` or `--source` would). But the content of the --rev option was intended
for the remote repo and is irrelevant for the local rebase operation. We expect
`hg pull --rebase` to stick with the default behavior here:

    hg rebase --base . --dest tip(branch(.))

The `rev` option is dropped from the option passed to rebase.

--HG--
branch : stable
extra : amend_source : f0a88fe072222fe9e458203c4cd4f3d6ece5527e
Merge with stable.
branch: add missing repo argument to checknewlabel

scmutil.checknewlabel takes a repo object as its first argument.
When the call to this function was added in e689b0d91546, the
first argument was mistakenly set to 'None'.
hgweb: display diff for a changeset against any parents (issue2810)

During merge of branches, it is useful to compare merge results against
the two parents.  This change adds this support to hgweb.  To specify
which parent to compare to, use rev/12300:12345 where 12300 is a
parent changeset number.  Two links are added to changeset web page so
that one can choose which parent to compare to.

--HG--
extra : amend_source : e22584de12703f2b0f1a8f8379e221edc28835f1
clfilter: remove usage of `range` and `xrange` in scmutil.revrange

For changelog level filtering to take effect it need to be used for any
iteration.

This changeset removes usage of `range` and `xrange` that survived the first
pass.

--HG--
extra : rebase_source : 7735cad68bd65a1a006d0937a963fc356e53d85d
extra : amend_source : b64ae3a0ef3cfb175e668118fa7e64af5978df2f
clfilter: introduce an "unfiltered" method on localrepo

This commit is part of the changelog level filtering effort. It returns
the main "unfiltered" version of a repo-like object. For localrepo this
means the same localrepo object. But this method will be overwritten
by the filtered versions of a repository to return the core unfiltered
version of the repo.

Introducing this simple method first allows later commits to prepare
for the use of a filtered version of a repository.

A new repo method is added because a lot of users may call it. At the
end of this series of commits, about 40 calls exist in core and hgext.
clfilter: introduce an `unfilteredmethod` decorator

This decorator ensure the method in run on an unfiltered version of the
repository. See follow-up commit for details.

This decorator is not named `unfiltered` because it would clash with the
`unfilteredmethod` on `localrepo` itself.
clfilter: ensure `branchcache` logic runs unfiltered

The current branchcache construction is not aware of filtering. We keep
the status quo, ensuring that the branch cache logic is computed as
before: without any filtering.
clfilter: ensure that tag logic runs unfiltered

The current tag logic is not aware of filtering. We keep the status quo,
ensuring that the tag cache is computed as before: without any filtering.
clfilter: ensure cache invalidation is done on the main unfiltered repo

The proxy version will not hold any cache for now. But we have to ensure
all cache operations are done on the unfiltered version.
clfilter: ensure `rollback` is run unfiltered

Rollback logic needs to be aware of the whole repository to work properly.
clfilter: ensure changegroup generation is run unfiltered

Changegroup generation logic needs to be aware of the whole repository
to work properly.
clfilter: ensure changeset creation in the repo is run unfiltered

This applies to both creation of new commits and application of
changegroups.
clfilter: unfilter computation of obsolescence related computation

All obsolescence related sets need to be computed on the full unfiltered
version of the repository, in particular because several of them
(obsolete, extinct) are used to compute the hidden revisions.

On a filtered repo, revset predicates related to these sets will be
properly filtered because of revset's own pre-filtering.
clfilter: phases logic should be unfiltered

Phase computations and boundary movements need to be aware of all
revisions that exist in the repository to return correct results.
clfilter: verify logic should be unfiltered

To verify a changelog obviously needs all of it. The verify logic now
ensures it works on an unfiltered repository.
clfilter: strip logic should be unfiltered

Strip is a "write" operation that needs to be aware of the whole repo's
content before destroying changesets.

Only the low level function is altered. The top level command will still
process its argument filtered (if any filtering is in place).
clfilter: prevent unwanted warning about filtered parents as unknown

During changectx __init__ the dirstate's parents MAY be checked. If
the repo is filtered, this check will complain "working directory has
unknown parents" even if the parents are perfectly known.

This may happen when the repo is used for serving and the dirstate has
parents that are secret, as those secret changesets will be filtered.
clfilter: unfilter some parts of the push logic

Computation of common changesets during push needs to be done on the
widest set possible. An unfiltered version of the repo is kept for
discovery and various revset calls. The discovery code itself enforces
the filtering of unserved outgoing changeset.