mercurial/commands.py
changeset 2411 734df6333ca4
parent 2410 1e80d47b8581
child 2412 e5cb39577b9f
equal deleted inserted replaced
2410:1e80d47b8581 2411:734df6333ca4
   639                 ui.status(_('adding %s\n') % rel)
   639                 ui.status(_('adding %s\n') % rel)
   640             names.append(abs)
   640             names.append(abs)
   641         elif repo.dirstate.state(abs) == '?':
   641         elif repo.dirstate.state(abs) == '?':
   642             ui.status(_('adding %s\n') % rel)
   642             ui.status(_('adding %s\n') % rel)
   643             names.append(abs)
   643             names.append(abs)
   644     repo.add(names)
   644     if not opts['dry_run']:
       
   645         repo.add(names)
   645 
   646 
   646 def addremove(ui, repo, *pats, **opts):
   647 def addremove(ui, repo, *pats, **opts):
   647     """add all new files, delete all missing files (DEPRECATED)
   648     """add all new files, delete all missing files (DEPRECATED)
   648 
   649 
   649     (DEPRECATED)
   650     (DEPRECATED)
  2799 
  2800 
  2800 table = {
  2801 table = {
  2801     "^add":
  2802     "^add":
  2802         (add,
  2803         (add,
  2803          [('I', 'include', [], _('include names matching the given patterns')),
  2804          [('I', 'include', [], _('include names matching the given patterns')),
  2804           ('X', 'exclude', [], _('exclude names matching the given patterns'))],
  2805           ('X', 'exclude', [], _('exclude names matching the given patterns')),
       
  2806           ('n', 'dry-run', None, _('print what would be done'))],
  2805          _('hg add [OPTION]... [FILE]...')),
  2807          _('hg add [OPTION]... [FILE]...')),
  2806     "debugaddremove|addremove":
  2808     "debugaddremove|addremove":
  2807         (addremove,
  2809         (addremove,
  2808          [('I', 'include', [], _('include names matching the given patterns')),
  2810          [('I', 'include', [], _('include names matching the given patterns')),
  2809           ('X', 'exclude', [], _('exclude names matching the given patterns'))],
  2811           ('X', 'exclude', [], _('exclude names matching the given patterns'))],