On Sun, 26 Nov 2017 20:11:25 -0500, Matt Harbison wrote:
> On Sun, 26 Nov 2017 05:38:53 -0500, Yuya Nishihara <y...@tcha.org> wrote:
> > On Sat, 25 Nov 2017 23:53:45 -0500, Matt Harbison wrote:
> >> It's probably beyond the scope of what you were fixing, but should all
> >> subrepo recursion be guarded like this?
> >>
> >> >          sub = ctx.sub(subpath)
> >> >          try:
> >> >              submatch = matchmod.subdirmatcher(subpath, matcher)
> >
> > Maybe we'll need ctx.walksub(matcher) which yields (subrepo, submatcher)  
> > pairs?
> 
> I like it.
> 
> I wonder if the exception handler that prints 'skipping..' can be rolled  
> in too.

I think that's up to a caller whether a missing subrepo can be ignored or not.

> At least cmdutil.add() and cmdutil.cat() catch different things,  
> and I have a vague recollection that there was also some uncaught  
> exception in this area.  (I don't recall what it was, maybe the subrepo  
> being completely missing?)

Perhaps catching error.LookupError is wrong. It's the exception raised when
ambiguous identifier is passed to repo[].
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to