keyword: make main class and hg command accessible
Switch from global vars to top level dictionary.
Goal: make it easier for external tools (like tortoisehg)
to hook into keyword extension.
keyword: move expand/shrink decisions into kwtemplater
- do not clobber wrapper code
- get rid of clumsy kwtemplater attributes
try to fix test-inherit-mode on HFS+
HFS+ doesn't like setgid directories, so avoid them in most
of the test and do a quick check that doesn't change the
output when everything's OK.
cmdutil.commit: use relative paths in the error messages
This is more consistent with other error messages and requires
less makeup in test-commit and test-symlink-basic.
util.pathto: return '.' instead of an empty string
This could happen with something like
pathto(repo.root, 'foo/bar', 'foo/bar')
status: put added files that have disappeared in the deleted list
This gives the user an indication that something went wrong with this file:
$ hg add foo
$ rm foo
$ hg status foo
! foo
Fixes
issue212.
revert: unify forget and remove lists
This doesn't make a difference right now, but after the next revision
some files in state 'a' may end up in the deleted list, and revert
won't be able to just remove all files in that list.
commands.revert: don't call hg.revert
commands.revert calculates everything that has to be done and then
calls hg.revert to checkout and remove files. Unfortunately,
hg.revert has to recalculate everything and that can take a long
while, since it always operates on the whole working dir.
Changing commands.revert to manually checkout and remove files
makes things considerably faster, especially if we're reverting
a single file in a repo with a huge number of files.
This should be enough to close
issue857.