##// END OF EJS Templates
cat: return an error on failure
Matt Mackall -
r4697:5b2d986d default
parent child Browse files
Show More
@@ -342,10 +342,13 b' def cat(ui, repo, file1, *pats, **opts):'
342 %p root-relative path name of file being printed
342 %p root-relative path name of file being printed
343 """
343 """
344 ctx = repo.changectx(opts['rev'])
344 ctx = repo.changectx(opts['rev'])
345 err = 1
345 for src, abs, rel, exact in cmdutil.walk(repo, (file1,) + pats, opts,
346 for src, abs, rel, exact in cmdutil.walk(repo, (file1,) + pats, opts,
346 ctx.node()):
347 ctx.node()):
347 fp = cmdutil.make_file(repo, opts['output'], ctx.node(), pathname=abs)
348 fp = cmdutil.make_file(repo, opts['output'], ctx.node(), pathname=abs)
348 fp.write(ctx.filectx(abs).data())
349 fp.write(ctx.filectx(abs).data())
350 err = 0
351 return err
349
352
350 def clone(ui, source, dest=None, **opts):
353 def clone(ui, source, dest=None, **opts):
351 """make a copy of an existing repository
354 """make a copy of an existing repository
General Comments 0
You need to be logged in to leave comments. Login now