repoview: do not crash when localtags refers to non existing revisions

This fixes a crash that may happen when using mercurial 3.0.x.

The _gethiddenblockers function assumed that the output of tags.readlocaltags()
was a dict mapping tags to of valid nodes. However this was not necessarily the
case. When a repository had obsolete revisions and had local tag pointing to a
non existing revision was found, many mercurial commands would crash.

This revision fixes the problem by removing any tags from the output of
tags.readlocaltags() which point to invalid nodes.

We may want to add a warning when this happens (although it might be
annoying to get that warning for every command, possibly even more than once per
command).

A test for this problem has been added to test-obsolete.t. Without this fix the
test would output:

  $ hg tags
  abort: 00changelog.i@3816541e5485: no node!
  [255]

Instead of:

  $ hg tags
  tiptag                             2:3816541e5485
  tip                                2:3816541e5485
  visible                            0:193e9254ce7e

--HG--
branch : stable
cmdutil: add copy-filtering support to duplicatecopies

In order to fix issue 4192 we need to be able to skip some copies
while doing duplicatecopies.

--HG--
branch : stable
extra : rebase_source : a2c66343cd5b3517d2522bdd060162859a5a30c2
rebase: fix bug that caused transitive copy records to disappear (issue4192)

The defect was that copies were always duplicated against the target
revision, rather than the first parent of the revision being
rebased. This produced nominally correct results if changes were
rebased one at a time (or with --collapse), but was wrong if we
rebased a sequence of changesets which contained a sequence of copies.

--HG--
branch : stable
extra : rebase_source : 353c5f3b7061da2acccbe607e9d65e59ada19cce
i18n-ja: synchronized with a4b67bf1f0a5

--HG--
branch : stable
i18n-pt_BR: synchronized with a4b67bf1f0a5

--HG--
branch : stable
merge with i18n

--HG--
branch : stable
Added tag 3.0.2 for changeset 2d8cd3d0e83c

--HG--
branch : stable
Added signature for changeset 2d8cd3d0e83c

--HG--
branch : stable
merge with stable