comparison mercurial/cmdutil.py @ 28449:3072ce740945

merge with stable
author Matt Mackall <mpm@selenic.com>
date Fri, 11 Mar 2016 15:24:27 -0600
parents 6a4a4ca21907 97175d9bf7cf
children c90cfe76e024
comparison
equal deleted inserted replaced
28448:7108834c76a2 28449:3072ce740945
2372 fm.write('path', fmt, m.rel(f)) 2372 fm.write('path', fmt, m.rel(f))
2373 ret = 0 2373 ret = 0
2374 2374
2375 for subpath in sorted(ctx.substate): 2375 for subpath in sorted(ctx.substate):
2376 def matchessubrepo(subpath): 2376 def matchessubrepo(subpath):
2377 return (m.always() or m.exact(subpath) 2377 return (m.exact(subpath)
2378 or any(f.startswith(subpath + '/') for f in m.files())) 2378 or any(f.startswith(subpath + '/') for f in m.files()))
2379 2379
2380 if subrepos or matchessubrepo(subpath): 2380 if subrepos or matchessubrepo(subpath):
2381 sub = ctx.sub(subpath) 2381 sub = ctx.sub(subpath)
2382 try: 2382 try:
2383 submatch = matchmod.subdirmatcher(subpath, m) 2383 submatch = matchmod.subdirmatcher(subpath, m)
2384 if sub.printfiles(ui, submatch, fm, fmt, subrepos) == 0: 2384 recurse = m.exact(subpath) or subrepos
2385 if sub.printfiles(ui, submatch, fm, fmt, recurse) == 0:
2385 ret = 0 2386 ret = 0
2386 except error.LookupError: 2387 except error.LookupError:
2387 ui.status(_("skipping missing subrepository: %s\n") 2388 ui.status(_("skipping missing subrepository: %s\n")
2388 % m.abs(subpath)) 2389 % m.abs(subpath))
2389 2390