comparison mercurial/subrepo.py @ 23885:9994f45ba714

add: pass options via keyword args The largefiles extensions needs to be able to pass --large, --normal and --lfsize to subrepos via cmdutil.add() and hgsubrepo.add(). Rather than add additional special purpose arguments, stop extracting the existing args from the **opts passed to commands.add() and just pass them along.
author Matt Harbison <matt_harbison@yahoo.com>
date Mon, 12 Jan 2015 20:59:17 -0500
parents 7cc77030c557
children de519517f597
comparison
equal deleted inserted replaced
23884:ec2c2e1400f0 23885:9994f45ba714
619 fp.write(''.join(lines)) 619 fp.write(''.join(lines))
620 finally: 620 finally:
621 fp.close() 621 fp.close()
622 622
623 @annotatesubrepoerror 623 @annotatesubrepoerror
624 def add(self, ui, match, dryrun, listsubrepos, prefix, explicitonly): 624 def add(self, ui, match, prefix, explicitonly, **opts):
625 return cmdutil.add(ui, self._repo, match, dryrun, listsubrepos, 625 return cmdutil.add(ui, self._repo, match,
626 os.path.join(prefix, self._path), explicitonly) 626 os.path.join(prefix, self._path), explicitonly,
627 **opts)
627 628
628 def addremove(self, m, prefix, opts, dry_run, similarity): 629 def addremove(self, m, prefix, opts, dry_run, similarity):
629 # In the same way as sub directories are processed, once in a subrepo, 630 # In the same way as sub directories are processed, once in a subrepo,
630 # always entry any of its subrepos. Don't corrupt the options that will 631 # always entry any of its subrepos. Don't corrupt the options that will
631 # be used to process sibling subrepos however. 632 # be used to process sibling subrepos however.