revert: handle subrepos missing in the given --rev
The list of subrepos to revert is currently based on the given --rev, so there
is currently no way for this to fail. Using the --rev context is wrong though,
because if the subrepo doesn't exist in --rev, it is skipped, so it won't be
changed. This change makes it so that the revert aborts, which is what happens
if a plain file is reverted to -1. Finding matches based on --rev is also
inconsistent with evaluating files against the working directory (
5b85a5bc5bbb).
This change is made now, so as to not cause breakage when the context is
switched in an upcoming patch.
http://mercurial.selenic.com/bts/issue842
$ hg init
$ echo foo > a
$ hg ci -Ama
adding a
$ hg up -r0000
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo bar > a
Should issue new head warning:
$ hg ci -Amb
adding a
created new head
$ hg up -r0000
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo stuffy > a
Should not issue new head warning:
$ hg ci -q -Amc
$ hg up -r0000
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ echo crap > a
$ hg branch testing
marked working directory as branch testing
(branches are permanent and global, did you want a bookmark?)
Should not issue warning:
$ hg ci -q -Amd