Mercurial > hg-stable
comparison mercurial/commands.py @ 15911:c654eac03452
add: fix subrepo recursion for explicit path handling
When support for handling explicit paths in subrepos was added to the add
command (9e99d2bbb1b1), subrepo recursion wasn't taken into account. This
change adds an explicitonly argument to cmdutil.add to allow controlling which
levels of recursion should include only explicit paths versus all matched
paths.
author | David M. Carr <david@carrclan.us> |
---|---|
date | Tue, 17 Jan 2012 19:10:58 -0500 |
parents | aad565319fa3 |
children | 2bd54ffaa27e |
comparison
equal
deleted
inserted
replaced
15910:2b8d5c55ae67 | 15911:c654eac03452 |
---|---|
172 Returns 0 if all files are successfully added. | 172 Returns 0 if all files are successfully added. |
173 """ | 173 """ |
174 | 174 |
175 m = scmutil.match(repo[None], pats, opts) | 175 m = scmutil.match(repo[None], pats, opts) |
176 rejected = cmdutil.add(ui, repo, m, opts.get('dry_run'), | 176 rejected = cmdutil.add(ui, repo, m, opts.get('dry_run'), |
177 opts.get('subrepos'), prefix="") | 177 opts.get('subrepos'), prefix="", explicitonly=False) |
178 return rejected and 1 or 0 | 178 return rejected and 1 or 0 |
179 | 179 |
180 @command('addremove', | 180 @command('addremove', |
181 similarityopts + walkopts + dryrunopts, | 181 similarityopts + walkopts + dryrunopts, |
182 _('[OPTION]... [FILE]...')) | 182 _('[OPTION]... [FILE]...')) |