mercurial/commands.py
changeset 12173 5b849148b620
parent 12167 d2c5b0927c28
child 12177 80399b5b5f13
equal deleted inserted replaced
12172:74f54b7775f2 12173:5b849148b620
    57         if exact or f not in repo.dirstate:
    57         if exact or f not in repo.dirstate:
    58             names.append(f)
    58             names.append(f)
    59             if ui.verbose or not exact:
    59             if ui.verbose or not exact:
    60                 ui.status(_('adding %s\n') % m.rel(f))
    60                 ui.status(_('adding %s\n') % m.rel(f))
    61     if not opts.get('dry_run'):
    61     if not opts.get('dry_run'):
    62         bad += [f for f in repo[None].add(names) if f in m.files()]
    62         rejected = repo[None].add(names)
       
    63         bad += [f for f in rejected if f in m.files()]
    63     return bad and 1 or 0
    64     return bad and 1 or 0
    64 
    65 
    65 def addremove(ui, repo, *pats, **opts):
    66 def addremove(ui, repo, *pats, **opts):
    66     """add all new files, delete all missing files
    67     """add all new files, delete all missing files
    67 
    68