# HG changeset patch # User Martin Geisler # Date 2010-09-07 08:30:29 # Node ID 5b849148b62078005dab250cce99bacbab671668 # Parent 74f54b7775f2fac7283f6f674822da0145e18dd1 add: clarify that repo[None].add returns rejected filenames diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -59,7 +59,8 @@ def add(ui, repo, *pats, **opts): if ui.verbose or not exact: ui.status(_('adding %s\n') % m.rel(f)) if not opts.get('dry_run'): - bad += [f for f in repo[None].add(names) if f in m.files()] + rejected = repo[None].add(names) + bad += [f for f in rejected if f in m.files()] return bad and 1 or 0 def addremove(ui, repo, *pats, **opts):