comparison mercurial/cmdutil.py @ 24720:c560d8c68791

cat: disable optimization of single file case for workingctx It crashes because workingctx has no manifest.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 05 Apr 2015 13:16:46 +0900
parents a4191e0c728f
children edf907bd8144
comparison
equal deleted inserted replaced
24719:11e8fec00234 24720:c560d8c68791
2401 # for performance to avoid the cost of parsing the manifest. 2401 # for performance to avoid the cost of parsing the manifest.
2402 if len(matcher.files()) == 1 and not matcher.anypats(): 2402 if len(matcher.files()) == 1 and not matcher.anypats():
2403 file = matcher.files()[0] 2403 file = matcher.files()[0]
2404 mf = repo.manifest 2404 mf = repo.manifest
2405 mfnode = ctx.manifestnode() 2405 mfnode = ctx.manifestnode()
2406 if mf.find(mfnode, file)[0]: 2406 if mfnode and mf.find(mfnode, file)[0]:
2407 write(file) 2407 write(file)
2408 return 0 2408 return 0
2409 2409
2410 # Don't warn about "missing" files that are really in subrepos 2410 # Don't warn about "missing" files that are really in subrepos
2411 bad = matcher.bad 2411 bad = matcher.bad