extdiff: correctly handle deleted subrepositories (issue3153)
Previously, when extdiff was called on two changesets where
a subrepository had been removed, an unexpected KeyError would
be raised.
Now, the missing subrepository will be ignored. This behavior
mirrors the behavior in diffordiffstat from cmdutil.py line
~1138-1153. The KeyError is caught and the revision is
set to None.
try/catch of LookupError around matchmod.narrowmatcher and
sub.status is removed, as LookupError is not raised anywhere
within those methods or deeper calls.
https://bz.mercurial-scm.org/842
$ 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