equal
deleted
inserted
replaced
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(): |