dispatch: extract stub function to peek boolean command option
We should at least stop parsing at "--". The 'name' argument is passed for
future extension.
dispatch: do not drop unpaired argument at _earlygetopt()
Before, "hg log -R" just worked.
amend: update .hgsubstate before committing a memctx (
issue5677)
This is a minimal copy of localrepo.commit(). As the current amend() function
heavily depends on the wctx API, it wasn't easy to port it to use a separate
status tuple. So for now, wctx._status is updated in-place.
subrepo: extract preprocess of repo.commit() to free function
No code change other than extracting a function. Maybe we should stop mutating
the status argument, but that's out of the scope of stable changes.
tests: demonstrate that .hgsubstate isn't updated on amend
Loosely based on test-amend.t and test-subrepo.t
amend: do not drop missing files (
issue5732)
samefile() can be wrong since wctx.manifest() does not include missing files,
whereas missing files should be preserved on commit.