mercurial/cmdutil.py
changeset 24718 a4191e0c728f
parent 24711 ab6e3729747e
child 24720 c560d8c68791
equal deleted inserted replaced
24717:90f2b9de30f2 24718:a4191e0c728f
  2400     # Automation often uses hg cat on single files, so special case it
  2400     # Automation often uses hg cat on single files, so special case it
  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._changeset[0]
  2405         mfnode = ctx.manifestnode()
  2406         if mf.find(mfnode, file)[0]:
  2406         if 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