Mercurial > hg
changeset 4697:5b2d986de0f8
cat: return an error on failure
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 24 Jun 2007 09:47:54 -0500 |
parents | 59b8f9361545 |
children | 30e826bd8ed1 |
files | mercurial/commands.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Sat Jun 23 22:43:46 2007 -0500 +++ b/mercurial/commands.py Sun Jun 24 09:47:54 2007 -0500 @@ -342,10 +342,13 @@ %p root-relative path name of file being printed """ ctx = repo.changectx(opts['rev']) + err = 1 for src, abs, rel, exact in cmdutil.walk(repo, (file1,) + pats, opts, ctx.node()): fp = cmdutil.make_file(repo, opts['output'], ctx.node(), pathname=abs) fp.write(ctx.filectx(abs).data()) + err = 0 + return err def clone(ui, source, dest=None, **opts): """make a copy of an existing repository