340 %s basename of file being printed |
340 %s basename of file being printed |
341 %d dirname of file being printed, or '.' if in repo root |
341 %d dirname of file being printed, or '.' if in repo root |
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 |
352 |
355 |
353 Create a copy of an existing repository in a new directory. |
356 Create a copy of an existing repository in a new directory. |