mercurial/commands.py
changeset 51834 3b8d92f71d92
parent 51664 45ba8416afc4
child 51858 607e94e01851
equal deleted inserted replaced
51833:7933bcb02bfc 51834:3b8d92f71d92
   707     prefix = opts.get('prefix')
   707     prefix = opts.get('prefix')
   708 
   708 
   709     if dest == b'-':
   709     if dest == b'-':
   710         if kind == b'files':
   710         if kind == b'files':
   711             raise error.InputError(_(b'cannot archive plain files to stdout'))
   711             raise error.InputError(_(b'cannot archive plain files to stdout'))
   712         dest = cmdutil.makefileobj(ctx, dest)
   712         realdest = dest
       
   713         dest = lambda: cmdutil.makefileobj(ctx, realdest)
   713         if not prefix:
   714         if not prefix:
   714             prefix = os.path.basename(repo.root) + b'-%h'
   715             prefix = os.path.basename(repo.root) + b'-%h'
   715 
   716 
   716     prefix = cmdutil.makefilename(ctx, prefix)
   717     prefix = cmdutil.makefilename(ctx, prefix)
   717     match = scmutil.match(ctx, [], pycompat.byteskwargs(opts))
   718     match = scmutil.match(ctx, [], pycompat.byteskwargs(opts))