mercurial/cmdutil.py
changeset 37597 d110167610db
parent 37470 d658cbef8041
child 37599 42a91897f090
equal deleted inserted replaced
37596:8c121a9837ca 37597:d110167610db
  2229             # attempt to create the directory if it does not already exist
  2229             # attempt to create the directory if it does not already exist
  2230             try:
  2230             try:
  2231                 os.makedirs(os.path.dirname(filename))
  2231                 os.makedirs(os.path.dirname(filename))
  2232             except OSError:
  2232             except OSError:
  2233                 pass
  2233                 pass
  2234         with formatter.maybereopen(basefm, filename, opts) as fm:
  2234         with formatter.maybereopen(basefm, filename) as fm:
  2235             _updatecatformatter(fm, ctx, matcher, path, opts.get('decode'))
  2235             _updatecatformatter(fm, ctx, matcher, path, opts.get('decode'))
  2236 
  2236 
  2237     # Automation often uses hg cat on single files, so special case it
  2237     # Automation often uses hg cat on single files, so special case it
  2238     # for performance to avoid the cost of parsing the manifest.
  2238     # for performance to avoid the cost of parsing the manifest.
  2239     if len(matcher.files()) == 1 and not matcher.anypats():
  2239     if len(matcher.files()) == 1 and not matcher.anypats():