Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/subrepo.py Wed Dec 31 18:24:32 2014 -0500 +++ b/mercurial/subrepo.py Mon Jan 12 20:59:17 2015 -0500 @@ -621,9 +621,10 @@ fp.close() @annotatesubrepoerror - def add(self, ui, match, dryrun, listsubrepos, prefix, explicitonly): - return cmdutil.add(ui, self._repo, match, dryrun, listsubrepos, - os.path.join(prefix, self._path), explicitonly) + def add(self, ui, match, prefix, explicitonly, **opts): + return cmdutil.add(ui, self._repo, match, + os.path.join(prefix, self._path), explicitonly, + **opts) def addremove(self, m, prefix, opts, dry_run, similarity): # In the same way as sub directories are processed, once in a subrepo,