fancyopts: use getopt.gnu_getopt()
The issue described in the docstring has been fixed since Python
20ab2260dc93,
which is in 2.7.
https://hg.python.org/cpython/rev/
20ab2260dc93
https://bugs.python.org/
issue4458
This fixes the handling of '--' value.
dispatch: replace _earlygetopt(strip=True) with new parser
The execution order in cmdalias.__init__() is adjusted to set stripped args
to self.givenargs, which is no longer updated in place.
dispatch: alias --repo to --repository while parsing early options
This prepares for replacing old _early*opt() functions. My initial attempt
was to extend options table to support 'repository|repo' syntax. It worked,
but seemed too invasive. So I decided to add an optional argument to
fancyopts() instead.
This also changes the nevernegate dict to be keyed by a canonical_name,
not by an option-name for clarity.