mercurial/commands.py
changeset 12618 0ae35296fbf4
parent 12613 f365aed7cc5b
child 12688 8c034a825cfe
equal deleted inserted replaced
12617:2063d36b406e 12618:0ae35296fbf4
   632     :``%d``: dirname of file being printed, or '.' if in repository root
   632     :``%d``: dirname of file being printed, or '.' if in repository root
   633     :``%p``: root-relative path name of file being printed
   633     :``%p``: root-relative path name of file being printed
   634 
   634 
   635     Returns 0 on success.
   635     Returns 0 on success.
   636     """
   636     """
   637     ctx = repo[opts.get('rev')]
   637     ctx = cmdutil.revsingle(repo, opts.get('rev'))
   638     err = 1
   638     err = 1
   639     m = cmdutil.match(repo, (file1,) + pats, opts)
   639     m = cmdutil.match(repo, (file1,) + pats, opts)
   640     for abs in ctx.walk(m):
   640     for abs in ctx.walk(m):
   641         fp = cmdutil.make_file(repo, opts.get('output'), ctx.node(), pathname=abs)
   641         fp = cmdutil.make_file(repo, opts.get('output'), ctx.node(), pathname=abs)
   642         data = ctx[abs].data()
   642         data = ctx[abs].data()