share: add option to share bookmarks

This patch adds the -B/--bookmarks option to the share command added by the
share extension. All it does for now is create a marker, 'bookmarks.shared',
that will be used by future code to implement the sharing functionality.
backout: add --commit option

Mercurial backout command makes a commmit by default only when the backed out
revision is the parent of working directory and doesn't commit in any other
case.

The --commit option changes behaviour of backout to make a commit whenever
possible (i.e. there is no unresolved conflicts). This behaviour seems more
intuitive to many use (especially git users migrating to hg).
context: return dirstate parents in workingctx.ancestors()

workingctx.ancestors() was not returning the dirstate parents as part of the
result set. The only place this function is used is for copy detection when
committing a file, and that code already checks the parents manually, so this
change has no affect at the moment.

I found it while playing around with changing how copy detection works.
branches: deprecate -a
keyword: update test file syntax
keyword: handle resolve to either parent

Merged files are considered modified at commit time even if only 1 parent
differs. In this case we must use the change context of this parent for
expansion.

The issue went unnoticed for long because it is only apparent until the next
update to the merge revision - except in test-keyword where it was always
staring us in the face.
test-check-commit-hg: clarify misleading "commit message rules" error

The test case doesn't only check the commit message, but also the
patch, which can result in confusing output like

  +  Revision df6f06d17100 does not comply to commit message rules
  +  ------------------------------------------------------
  +  32: adds double empty line
  +
  +

even when there are no double blank lines in the commit message. Drop
the "commit message" part to make it less confusing.
help: suggest '-v -e' to get built-in aliases for extensions (issue4461)

If extension name matches one of command names, suggest user to type
'hg help -v -e <extension>' to get full list of built-in aliases

--HG--
extra : rebase_source : 5969e85ca85be8b7a1416d2cc810395cd50bacb7
share: fix source repo lookup on Windows

The stored path contains platform specific separators, so splitting on '/.hg'
returned the string unmodified on Windows.  The source was then looked for in
$source/.hg/.hg, which obviously fails.  This caused cascading errors in
test-share.t relating to the recent bookmark support.

--HG--
extra : rebase_source : 0fcb3c160d0a1dc7315608d2e7f71b697eeb94b9
share: use the 'sharedpath' attr on repo instead of reloading from the file

Seems like a useful optimization, and now the exact file content is not a
concern.

--HG--
extra : rebase_source : 6601e97f0b9ac53a1567ac6cea9e35356a58b173
tests: add missing globs for Windows

I couldn't figure out how to glob the first chunk for Windows, so it's been
conditionalized.

--HG--
extra : rebase_source : b0800f794b0865f75e3fe6d023ad867214fafefd
test-hgignore: add testing for ui.ignore

I couldn't find any tests for this, and we're going to make changes here in
upcoming patches.

--HG--
extra : rebase_source : 1921c04d86dd2a1d35084c25a56bd2c0a4963843
ignore: resolve ignore files relative to repo root (issue4473) (BC)

Previously these would be considered to be relative to the current working
directory. That behavior is both undocumented and doesn't really make sense.
There are two reasonable options for how to resolve relative paths:
- relative to the repo root
- relative to the config file

Resolving these files relative to the repo root matches existing behavior with
hooks. An earlier discussion about this is available at
http://mercurial.markmail.org/thread/tvu7yhzsiywgkjzl.

Thanks to Isaac Jurado <diptongo@gmail.com> for the initial patchset that
spurred the discussion.

--HG--
extra : rebase_source : 4facc8157777fa0e4223d51a72ecf631d291e27c
localrepo.__getitem__: add slicing support

This allows the python slice syntax to be used with revision numbers when
indexing into a repository, such as repo[8:]

--HG--
extra : rebase_source : 85e7a308d881d2b14cb44be04794936304af4760
bundlerepo: implement safe phasecache

This patch makes bundlerepo use a subclass of phasecache that will allow phase
boundaries to be moved around, but will never write them to the underlying
repository.

--HG--
extra : rebase_source : 599f86e7c72eeeb6fa78ddf8e4598f0fc8f225f1
bundlerepo: retract phase boundary

This patch makes bundrepo retract the phase boundary for new commits to 'draft'
status, which is consistent with the behavior of 'hg unbundle'.  The old
behavior was for commits to appear with the same phase as their nearest
ancestor in the base repository.

This affects several classes of operation:

* Inspecting a bundle with the -B flag
* Treating a bundle file as a peer (old: everything public, new: everything draft)
* Incoming command (neither old or new behavior is sensible -- fixed in next patch)

--HG--
extra : rebase_source : a97e13a970a21cd81d6dc38f02604961818c9669
incoming: handle phases the same as pull

Now that bundlerepo can move phases safely, 'hg incoming' can share its phase
handling code with pull to better reflect what would actually show up.

--HG--
extra : rebase_source : 77e86b16273eb46603989f345e978ec346399cbc
largefile: backout ca54fb3d71ce

The hack for method monkey patching on repoview has been ruled out as
fragile, so we are rolling it back. We'll expand the explanation in the next
changeset.

--HG--
extra : rebase_source : 88e9d27fda8c5593bf2b669961a2195c4fa66eed
largefile: explain why no monkey patching on a repoview

The comment requested for investigations, here they are.

--HG--
extra : rebase_source : 4b273df45a1f4584e5ee0a955075f880abe68c5e
repoview: backout ced3ecfc2e57

Monkey patching repoview does not really work and making it really work will
be really hard. So we better have it broken without complexity than broken with
extra complexity.

--HG--
extra : rebase_source : 57248c211e7421dca9077573af1e79e810346e26