These patches implement 'hg add --subrepos'. The two first patches are the ones I would like you to look at the most since it's a bit unclear how the narrowmatcher should react in each case.